From e87dfcf09588d7098793aea8f10ca3695e945055 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 21 Dec 2021 12:39:37 -0800 Subject: [PATCH] Paginator Improvements (#1531) --- .../accessanalyzer/api_op_ListAccessPreviewFindings.go | 8 ++++++-- service/accessanalyzer/api_op_ListAccessPreviews.go | 8 ++++++-- service/accessanalyzer/api_op_ListAnalyzedResources.go | 8 ++++++-- service/accessanalyzer/api_op_ListAnalyzers.go | 8 ++++++-- service/accessanalyzer/api_op_ListArchiveRules.go | 8 ++++++-- service/accessanalyzer/api_op_ListFindings.go | 8 ++++++-- service/accessanalyzer/api_op_ListPolicyGenerations.go | 8 ++++++-- service/accessanalyzer/api_op_ValidatePolicy.go | 8 ++++++-- service/acm/api_op_ListCertificates.go | 8 ++++++-- service/acmpca/api_op_ListCertificateAuthorities.go | 8 ++++++-- service/acmpca/api_op_ListPermissions.go | 8 ++++++-- service/acmpca/api_op_ListTags.go | 8 ++++++-- .../api_op_ListBusinessReportSchedules.go | 8 ++++++-- .../alexaforbusiness/api_op_ListConferenceProviders.go | 8 ++++++-- service/alexaforbusiness/api_op_ListDeviceEvents.go | 8 ++++++-- service/alexaforbusiness/api_op_ListGatewayGroups.go | 8 ++++++-- service/alexaforbusiness/api_op_ListGateways.go | 8 ++++++-- service/alexaforbusiness/api_op_ListSkills.go | 8 ++++++-- .../alexaforbusiness/api_op_ListSkillsStoreCategories.go | 8 ++++++-- .../api_op_ListSkillsStoreSkillsByCategory.go | 8 ++++++-- .../alexaforbusiness/api_op_ListSmartHomeAppliances.go | 8 ++++++-- service/alexaforbusiness/api_op_ListTags.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchAddressBooks.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchContacts.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchDevices.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchNetworkProfiles.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchProfiles.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchRooms.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchSkillGroups.go | 8 ++++++-- service/alexaforbusiness/api_op_SearchUsers.go | 8 ++++++-- service/amp/api_op_ListRuleGroupsNamespaces.go | 8 ++++++-- service/amp/api_op_ListWorkspaces.go | 8 ++++++-- service/amplifyuibuilder/api_op_ListComponents.go | 8 ++++++-- service/amplifyuibuilder/api_op_ListThemes.go | 8 ++++++-- service/apigateway/api_op_GetApiKeys.go | 8 ++++++-- service/apigateway/api_op_GetBasePathMappings.go | 8 ++++++-- service/apigateway/api_op_GetClientCertificates.go | 8 ++++++-- service/apigateway/api_op_GetDeployments.go | 8 ++++++-- service/apigateway/api_op_GetDomainNames.go | 8 ++++++-- service/apigateway/api_op_GetModels.go | 8 ++++++-- service/apigateway/api_op_GetResources.go | 8 ++++++-- service/apigateway/api_op_GetRestApis.go | 8 ++++++-- service/apigateway/api_op_GetUsage.go | 8 ++++++-- service/apigateway/api_op_GetUsagePlanKeys.go | 8 ++++++-- service/apigateway/api_op_GetUsagePlans.go | 8 ++++++-- service/apigateway/api_op_GetVpcLinks.go | 8 ++++++-- service/appconfig/api_op_ListApplications.go | 8 ++++++-- service/appconfig/api_op_ListConfigurationProfiles.go | 8 ++++++-- service/appconfig/api_op_ListDeploymentStrategies.go | 8 ++++++-- service/appconfig/api_op_ListDeployments.go | 8 ++++++-- service/appconfig/api_op_ListEnvironments.go | 8 ++++++-- .../appconfig/api_op_ListHostedConfigurationVersions.go | 8 ++++++-- service/appflow/api_op_DescribeConnectorProfiles.go | 8 ++++++-- service/appflow/api_op_DescribeConnectors.go | 8 ++++++-- service/appflow/api_op_DescribeFlowExecutionRecords.go | 8 ++++++-- service/appflow/api_op_ListFlows.go | 8 ++++++-- .../api_op_DescribeScalableTargets.go | 8 ++++++-- .../api_op_DescribeScalingActivities.go | 8 ++++++-- .../api_op_DescribeScalingPolicies.go | 8 ++++++-- .../api_op_DescribeScheduledActions.go | 8 ++++++-- .../api_op_ListReportDefinitions.go | 8 ++++++-- .../api_op_DescribeContinuousExports.go | 8 ++++++-- .../api_op_DescribeImportTasks.go | 8 ++++++-- service/applicationinsights/api_op_ListApplications.go | 8 ++++++-- service/applicationinsights/api_op_ListComponents.go | 8 ++++++-- .../api_op_ListConfigurationHistory.go | 8 ++++++-- service/applicationinsights/api_op_ListLogPatternSets.go | 8 ++++++-- service/applicationinsights/api_op_ListLogPatterns.go | 8 ++++++-- service/applicationinsights/api_op_ListProblems.go | 8 ++++++-- service/appmesh/api_op_ListGatewayRoutes.go | 8 ++++++-- service/appmesh/api_op_ListMeshes.go | 8 ++++++-- service/appmesh/api_op_ListRoutes.go | 8 ++++++-- service/appmesh/api_op_ListTagsForResource.go | 8 ++++++-- service/appmesh/api_op_ListVirtualGateways.go | 8 ++++++-- service/appmesh/api_op_ListVirtualNodes.go | 8 ++++++-- service/appmesh/api_op_ListVirtualRouters.go | 8 ++++++-- service/appmesh/api_op_ListVirtualServices.go | 8 ++++++-- service/apprunner/api_op_DescribeCustomDomains.go | 8 ++++++-- service/apprunner/api_op_ListAutoScalingConfigurations.go | 8 ++++++-- service/apprunner/api_op_ListConnections.go | 8 ++++++-- service/apprunner/api_op_ListOperations.go | 8 ++++++-- service/apprunner/api_op_ListServices.go | 8 ++++++-- service/appstream/api_op_DescribeImagePermissions.go | 8 ++++++-- service/appstream/api_op_DescribeImages.go | 8 ++++++-- service/athena/api_op_GetQueryResults.go | 8 ++++++-- service/athena/api_op_ListDataCatalogs.go | 8 ++++++-- service/athena/api_op_ListDatabases.go | 8 ++++++-- service/athena/api_op_ListNamedQueries.go | 8 ++++++-- service/athena/api_op_ListPreparedStatements.go | 8 ++++++-- service/athena/api_op_ListQueryExecutions.go | 8 ++++++-- service/athena/api_op_ListTableMetadata.go | 8 ++++++-- service/athena/api_op_ListTagsForResource.go | 8 ++++++-- service/athena/api_op_ListWorkGroups.go | 8 ++++++-- service/auditmanager/api_op_GetChangeLogs.go | 8 ++++++-- service/auditmanager/api_op_GetDelegations.go | 8 ++++++-- .../auditmanager/api_op_GetEvidenceByEvidenceFolder.go | 8 ++++++-- .../auditmanager/api_op_GetEvidenceFoldersByAssessment.go | 8 ++++++-- .../api_op_GetEvidenceFoldersByAssessmentControl.go | 8 ++++++-- ...api_op_ListAssessmentControlInsightsByControlDomain.go | 8 ++++++-- .../api_op_ListAssessmentFrameworkShareRequests.go | 8 ++++++-- service/auditmanager/api_op_ListAssessmentFrameworks.go | 8 ++++++-- service/auditmanager/api_op_ListAssessmentReports.go | 8 ++++++-- service/auditmanager/api_op_ListAssessments.go | 8 ++++++-- service/auditmanager/api_op_ListControlDomainInsights.go | 8 ++++++-- .../api_op_ListControlDomainInsightsByAssessment.go | 8 ++++++-- .../api_op_ListControlInsightsByControlDomain.go | 8 ++++++-- service/auditmanager/api_op_ListControls.go | 8 ++++++-- service/auditmanager/api_op_ListKeywordsForDataSource.go | 8 ++++++-- service/auditmanager/api_op_ListNotifications.go | 8 ++++++-- service/autoscaling/api_op_DescribeAutoScalingGroups.go | 8 ++++++-- .../autoscaling/api_op_DescribeAutoScalingInstances.go | 8 ++++++-- .../autoscaling/api_op_DescribeLaunchConfigurations.go | 8 ++++++-- .../api_op_DescribeNotificationConfigurations.go | 8 ++++++-- service/autoscaling/api_op_DescribePolicies.go | 8 ++++++-- service/autoscaling/api_op_DescribeScalingActivities.go | 8 ++++++-- service/autoscaling/api_op_DescribeScheduledActions.go | 8 ++++++-- service/autoscaling/api_op_DescribeTags.go | 8 ++++++-- service/backup/api_op_ListBackupJobs.go | 8 ++++++-- service/backup/api_op_ListBackupPlanTemplates.go | 8 ++++++-- service/backup/api_op_ListBackupPlanVersions.go | 8 ++++++-- service/backup/api_op_ListBackupPlans.go | 8 ++++++-- service/backup/api_op_ListBackupSelections.go | 8 ++++++-- service/backup/api_op_ListBackupVaults.go | 8 ++++++-- service/backup/api_op_ListCopyJobs.go | 8 ++++++-- service/backup/api_op_ListFrameworks.go | 8 ++++++-- service/backup/api_op_ListProtectedResources.go | 8 ++++++-- service/backup/api_op_ListRecoveryPointsByBackupVault.go | 8 ++++++-- service/backup/api_op_ListRecoveryPointsByResource.go | 8 ++++++-- service/backup/api_op_ListReportJobs.go | 8 ++++++-- service/backup/api_op_ListReportPlans.go | 8 ++++++-- service/backup/api_op_ListRestoreJobs.go | 8 ++++++-- service/backup/api_op_ListTags.go | 8 ++++++-- service/backupgateway/api_op_ListGateways.go | 8 ++++++-- service/backupgateway/api_op_ListHypervisors.go | 8 ++++++-- service/backupgateway/api_op_ListVirtualMachines.go | 8 ++++++-- service/batch/api_op_DescribeComputeEnvironments.go | 8 ++++++-- service/batch/api_op_DescribeJobDefinitions.go | 8 ++++++-- service/batch/api_op_DescribeJobQueues.go | 8 ++++++-- service/batch/api_op_ListJobs.go | 8 ++++++-- service/batch/api_op_ListSchedulingPolicies.go | 8 ++++++-- service/braket/api_op_SearchDevices.go | 8 ++++++-- service/braket/api_op_SearchJobs.go | 8 ++++++-- service/braket/api_op_SearchQuantumTasks.go | 8 ++++++-- service/budgets/api_op_DescribeBudgetActionHistories.go | 8 ++++++-- service/budgets/api_op_DescribeBudgetActionsForAccount.go | 8 ++++++-- service/budgets/api_op_DescribeBudgetActionsForBudget.go | 8 ++++++-- .../budgets/api_op_DescribeBudgetPerformanceHistory.go | 8 ++++++-- service/budgets/api_op_DescribeBudgets.go | 8 ++++++-- service/budgets/api_op_DescribeNotificationsForBudget.go | 8 ++++++-- .../budgets/api_op_DescribeSubscribersForNotification.go | 8 ++++++-- service/chime/api_op_ListAccounts.go | 8 ++++++-- service/chime/api_op_ListAppInstanceAdmins.go | 8 ++++++-- service/chime/api_op_ListAppInstanceUsers.go | 8 ++++++-- service/chime/api_op_ListAppInstances.go | 8 ++++++-- service/chime/api_op_ListAttendees.go | 8 ++++++-- service/chime/api_op_ListBots.go | 8 ++++++-- service/chime/api_op_ListChannelBans.go | 8 ++++++-- service/chime/api_op_ListChannelMemberships.go | 8 ++++++-- .../api_op_ListChannelMembershipsForAppInstanceUser.go | 8 ++++++-- service/chime/api_op_ListChannelMessages.go | 8 ++++++-- service/chime/api_op_ListChannelModerators.go | 8 ++++++-- service/chime/api_op_ListChannels.go | 8 ++++++-- .../api_op_ListChannelsModeratedByAppInstanceUser.go | 8 ++++++-- service/chime/api_op_ListMediaCapturePipelines.go | 8 ++++++-- service/chime/api_op_ListMeetings.go | 8 ++++++-- service/chime/api_op_ListPhoneNumberOrders.go | 8 ++++++-- service/chime/api_op_ListPhoneNumbers.go | 8 ++++++-- service/chime/api_op_ListProxySessions.go | 8 ++++++-- service/chime/api_op_ListRoomMemberships.go | 8 ++++++-- service/chime/api_op_ListRooms.go | 8 ++++++-- service/chime/api_op_ListSipMediaApplications.go | 8 ++++++-- service/chime/api_op_ListSipRules.go | 8 ++++++-- service/chime/api_op_ListUsers.go | 8 ++++++-- service/chime/api_op_ListVoiceConnectorGroups.go | 8 ++++++-- service/chime/api_op_ListVoiceConnectors.go | 8 ++++++-- service/chime/api_op_SearchAvailablePhoneNumbers.go | 8 ++++++-- service/chimesdkidentity/api_op_ListAppInstanceAdmins.go | 8 ++++++-- .../api_op_ListAppInstanceUserEndpoints.go | 8 ++++++-- service/chimesdkidentity/api_op_ListAppInstanceUsers.go | 8 ++++++-- service/chimesdkidentity/api_op_ListAppInstances.go | 8 ++++++-- service/chimesdkmeetings/api_op_ListAttendees.go | 8 ++++++-- service/chimesdkmessaging/api_op_ListChannelBans.go | 8 ++++++-- service/chimesdkmessaging/api_op_ListChannelFlows.go | 8 ++++++-- .../chimesdkmessaging/api_op_ListChannelMemberships.go | 8 ++++++-- .../api_op_ListChannelMembershipsForAppInstanceUser.go | 8 ++++++-- service/chimesdkmessaging/api_op_ListChannelMessages.go | 8 ++++++-- service/chimesdkmessaging/api_op_ListChannelModerators.go | 8 ++++++-- service/chimesdkmessaging/api_op_ListChannels.go | 8 ++++++-- .../api_op_ListChannelsAssociatedWithChannelFlow.go | 8 ++++++-- .../api_op_ListChannelsModeratedByAppInstanceUser.go | 8 ++++++-- service/cloud9/api_op_DescribeEnvironmentMemberships.go | 8 ++++++-- service/cloud9/api_op_ListEnvironments.go | 8 ++++++-- service/cloudcontrol/api_op_ListResourceRequests.go | 8 ++++++-- service/cloudcontrol/api_op_ListResources.go | 8 ++++++-- service/clouddirectory/api_op_ListAppliedSchemaArns.go | 8 ++++++-- service/clouddirectory/api_op_ListAttachedIndices.go | 8 ++++++-- .../clouddirectory/api_op_ListDevelopmentSchemaArns.go | 8 ++++++-- service/clouddirectory/api_op_ListDirectories.go | 8 ++++++-- service/clouddirectory/api_op_ListFacetAttributes.go | 8 ++++++-- service/clouddirectory/api_op_ListFacetNames.go | 8 ++++++-- service/clouddirectory/api_op_ListIndex.go | 8 ++++++-- service/clouddirectory/api_op_ListManagedSchemaArns.go | 8 ++++++-- service/clouddirectory/api_op_ListObjectAttributes.go | 8 ++++++-- service/clouddirectory/api_op_ListObjectChildren.go | 8 ++++++-- service/clouddirectory/api_op_ListObjectParentPaths.go | 8 ++++++-- service/clouddirectory/api_op_ListObjectParents.go | 8 ++++++-- service/clouddirectory/api_op_ListObjectPolicies.go | 8 ++++++-- service/clouddirectory/api_op_ListPolicyAttachments.go | 8 ++++++-- service/clouddirectory/api_op_ListPublishedSchemaArns.go | 8 ++++++-- service/clouddirectory/api_op_ListTagsForResource.go | 8 ++++++-- .../clouddirectory/api_op_ListTypedLinkFacetAttributes.go | 8 ++++++-- service/clouddirectory/api_op_ListTypedLinkFacetNames.go | 8 ++++++-- service/clouddirectory/api_op_LookupPolicy.go | 8 ++++++-- service/cloudformation/api_op_DescribeAccountLimits.go | 8 ++++++-- service/cloudformation/api_op_DescribeStackEvents.go | 8 ++++++-- .../cloudformation/api_op_DescribeStackResourceDrifts.go | 8 ++++++-- service/cloudformation/api_op_DescribeStacks.go | 8 ++++++-- service/cloudformation/api_op_ListChangeSets.go | 8 ++++++-- service/cloudformation/api_op_ListExports.go | 8 ++++++-- service/cloudformation/api_op_ListImports.go | 8 ++++++-- service/cloudformation/api_op_ListStackInstances.go | 8 ++++++-- service/cloudformation/api_op_ListStackResources.go | 8 ++++++-- .../cloudformation/api_op_ListStackSetOperationResults.go | 8 ++++++-- service/cloudformation/api_op_ListStackSetOperations.go | 8 ++++++-- service/cloudformation/api_op_ListStackSets.go | 8 ++++++-- service/cloudformation/api_op_ListStacks.go | 8 ++++++-- service/cloudformation/api_op_ListTypeRegistrations.go | 8 ++++++-- service/cloudformation/api_op_ListTypeVersions.go | 8 ++++++-- service/cloudformation/api_op_ListTypes.go | 8 ++++++-- .../api_op_ListCloudFrontOriginAccessIdentities.go | 8 ++++++-- service/cloudfront/api_op_ListDistributions.go | 8 ++++++-- service/cloudfront/api_op_ListInvalidations.go | 8 ++++++-- service/cloudfront/api_op_ListStreamingDistributions.go | 8 ++++++-- service/cloudhsmv2/api_op_DescribeBackups.go | 8 ++++++-- service/cloudhsmv2/api_op_DescribeClusters.go | 8 ++++++-- service/cloudhsmv2/api_op_ListTags.go | 8 ++++++-- service/cloudtrail/api_op_ListPublicKeys.go | 8 ++++++-- service/cloudtrail/api_op_ListTags.go | 8 ++++++-- service/cloudtrail/api_op_ListTrails.go | 8 ++++++-- service/cloudtrail/api_op_LookupEvents.go | 8 ++++++-- service/cloudwatch/api_op_DescribeAlarmHistory.go | 8 ++++++-- service/cloudwatch/api_op_DescribeAlarms.go | 8 ++++++-- service/cloudwatch/api_op_DescribeInsightRules.go | 8 ++++++-- service/cloudwatch/api_op_GetMetricData.go | 8 ++++++-- service/cloudwatch/api_op_ListDashboards.go | 8 ++++++-- service/cloudwatch/api_op_ListMetricStreams.go | 8 ++++++-- service/cloudwatch/api_op_ListMetrics.go | 8 ++++++-- service/cloudwatchlogs/api_op_DescribeDestinations.go | 8 ++++++-- service/cloudwatchlogs/api_op_DescribeLogGroups.go | 8 ++++++-- service/cloudwatchlogs/api_op_DescribeLogStreams.go | 8 ++++++-- service/cloudwatchlogs/api_op_DescribeMetricFilters.go | 8 ++++++-- .../cloudwatchlogs/api_op_DescribeSubscriptionFilters.go | 8 ++++++-- service/cloudwatchlogs/api_op_FilterLogEvents.go | 8 ++++++-- service/cloudwatchlogs/api_op_GetLogEvents.go | 8 ++++++-- service/codeartifact/api_op_ListDomains.go | 8 ++++++-- service/codeartifact/api_op_ListPackageVersionAssets.go | 8 ++++++-- service/codeartifact/api_op_ListPackageVersions.go | 8 ++++++-- service/codeartifact/api_op_ListPackages.go | 8 ++++++-- service/codeartifact/api_op_ListRepositories.go | 8 ++++++-- service/codeartifact/api_op_ListRepositoriesInDomain.go | 8 ++++++-- service/codebuild/api_op_DescribeCodeCoverages.go | 8 ++++++-- service/codebuild/api_op_DescribeTestCases.go | 8 ++++++-- service/codebuild/api_op_ListBuildBatches.go | 8 ++++++-- service/codebuild/api_op_ListBuildBatchesForProject.go | 8 ++++++-- service/codebuild/api_op_ListBuilds.go | 8 ++++++-- service/codebuild/api_op_ListBuildsForProject.go | 8 ++++++-- service/codebuild/api_op_ListProjects.go | 8 ++++++-- service/codebuild/api_op_ListReportGroups.go | 8 ++++++-- service/codebuild/api_op_ListReports.go | 8 ++++++-- service/codebuild/api_op_ListReportsForReportGroup.go | 8 ++++++-- service/codebuild/api_op_ListSharedProjects.go | 8 ++++++-- service/codebuild/api_op_ListSharedReportGroups.go | 8 ++++++-- service/codecommit/api_op_DescribeMergeConflicts.go | 8 ++++++-- service/codecommit/api_op_DescribePullRequestEvents.go | 8 ++++++-- service/codecommit/api_op_GetCommentReactions.go | 8 ++++++-- service/codecommit/api_op_GetCommentsForComparedCommit.go | 8 ++++++-- service/codecommit/api_op_GetCommentsForPullRequest.go | 8 ++++++-- service/codecommit/api_op_GetDifferences.go | 8 ++++++-- service/codecommit/api_op_GetMergeConflicts.go | 8 ++++++-- service/codecommit/api_op_ListApprovalRuleTemplates.go | 8 ++++++-- ...op_ListAssociatedApprovalRuleTemplatesForRepository.go | 8 ++++++-- service/codecommit/api_op_ListBranches.go | 8 ++++++-- service/codecommit/api_op_ListPullRequests.go | 8 ++++++-- service/codecommit/api_op_ListRepositories.go | 8 ++++++-- .../api_op_ListRepositoriesForApprovalRuleTemplate.go | 8 ++++++-- service/codedeploy/api_op_ListApplicationRevisions.go | 8 ++++++-- service/codedeploy/api_op_ListApplications.go | 8 ++++++-- service/codedeploy/api_op_ListDeploymentConfigs.go | 8 ++++++-- service/codedeploy/api_op_ListDeploymentGroups.go | 8 ++++++-- service/codedeploy/api_op_ListDeploymentInstances.go | 8 ++++++-- service/codedeploy/api_op_ListDeployments.go | 8 ++++++-- .../api_op_GetFindingsReportAccountSummary.go | 8 ++++++-- service/codeguruprofiler/api_op_ListFindingsReports.go | 8 ++++++-- service/codeguruprofiler/api_op_ListProfileTimes.go | 8 ++++++-- service/codeguruprofiler/api_op_ListProfilingGroups.go | 8 ++++++-- service/codegurureviewer/api_op_ListCodeReviews.go | 8 ++++++-- .../codegurureviewer/api_op_ListRecommendationFeedback.go | 8 ++++++-- service/codegurureviewer/api_op_ListRecommendations.go | 8 ++++++-- .../codegurureviewer/api_op_ListRepositoryAssociations.go | 8 ++++++-- service/codepipeline/api_op_ListActionExecutions.go | 8 ++++++-- service/codepipeline/api_op_ListActionTypes.go | 8 ++++++-- service/codepipeline/api_op_ListPipelineExecutions.go | 8 ++++++-- service/codepipeline/api_op_ListPipelines.go | 8 ++++++-- service/codepipeline/api_op_ListTagsForResource.go | 8 ++++++-- service/codepipeline/api_op_ListWebhooks.go | 8 ++++++-- service/codestarconnections/api_op_ListConnections.go | 8 ++++++-- service/codestarconnections/api_op_ListHosts.go | 8 ++++++-- service/codestarnotifications/api_op_ListEventTypes.go | 8 ++++++-- .../codestarnotifications/api_op_ListNotificationRules.go | 8 ++++++-- service/codestarnotifications/api_op_ListTargets.go | 8 ++++++-- service/cognitoidentity/api_op_ListIdentityPools.go | 8 ++++++-- .../api_op_AdminListGroupsForUser.go | 8 ++++++-- .../api_op_AdminListUserAuthEvents.go | 8 ++++++-- service/cognitoidentityprovider/api_op_ListGroups.go | 8 ++++++-- .../api_op_ListIdentityProviders.go | 8 ++++++-- .../cognitoidentityprovider/api_op_ListResourceServers.go | 8 ++++++-- .../cognitoidentityprovider/api_op_ListUserPoolClients.go | 8 ++++++-- service/cognitoidentityprovider/api_op_ListUserPools.go | 8 ++++++-- service/cognitoidentityprovider/api_op_ListUsers.go | 8 ++++++-- .../cognitoidentityprovider/api_op_ListUsersInGroup.go | 8 ++++++-- .../comprehend/api_op_ListDocumentClassificationJobs.go | 8 ++++++-- .../comprehend/api_op_ListDocumentClassifierSummaries.go | 8 ++++++-- service/comprehend/api_op_ListDocumentClassifiers.go | 8 ++++++-- .../api_op_ListDominantLanguageDetectionJobs.go | 8 ++++++-- service/comprehend/api_op_ListEntitiesDetectionJobs.go | 8 ++++++-- .../comprehend/api_op_ListEntityRecognizerSummaries.go | 8 ++++++-- service/comprehend/api_op_ListEntityRecognizers.go | 8 ++++++-- service/comprehend/api_op_ListEventsDetectionJobs.go | 8 ++++++-- service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go | 8 ++++++-- service/comprehend/api_op_ListSentimentDetectionJobs.go | 8 ++++++-- service/comprehend/api_op_ListTopicsDetectionJobs.go | 8 ++++++-- .../api_op_DescribeAggregateComplianceByConfigRules.go | 8 ++++++-- ...pi_op_DescribeAggregateComplianceByConformancePacks.go | 8 ++++++-- .../api_op_DescribeAggregationAuthorizations.go | 8 ++++++-- .../api_op_DescribeComplianceByConfigRule.go | 8 ++++++-- .../configservice/api_op_DescribeComplianceByResource.go | 8 ++++++-- .../api_op_DescribeConfigRuleEvaluationStatus.go | 8 ++++++-- service/configservice/api_op_DescribeConfigRules.go | 8 ++++++-- ...api_op_DescribeConfigurationAggregatorSourcesStatus.go | 8 ++++++-- .../api_op_DescribeConfigurationAggregators.go | 8 ++++++-- .../api_op_DescribeConformancePackCompliance.go | 8 ++++++-- .../configservice/api_op_DescribeConformancePackStatus.go | 8 ++++++-- service/configservice/api_op_DescribeConformancePacks.go | 8 ++++++-- .../api_op_DescribeOrganizationConfigRuleStatuses.go | 8 ++++++-- .../api_op_DescribeOrganizationConfigRules.go | 8 ++++++-- .../api_op_DescribeOrganizationConformancePackStatuses.go | 8 ++++++-- .../api_op_DescribeOrganizationConformancePacks.go | 8 ++++++-- .../api_op_DescribePendingAggregationRequests.go | 8 ++++++-- .../configservice/api_op_DescribeRemediationExceptions.go | 8 ++++++-- .../api_op_DescribeRemediationExecutionStatus.go | 8 ++++++-- .../api_op_DescribeRetentionConfigurations.go | 8 ++++++-- .../api_op_GetAggregateComplianceDetailsByConfigRule.go | 8 ++++++-- .../api_op_GetAggregateConfigRuleComplianceSummary.go | 8 ++++++-- ...api_op_GetAggregateConformancePackComplianceSummary.go | 8 ++++++-- .../api_op_GetAggregateDiscoveredResourceCounts.go | 8 ++++++-- .../api_op_GetComplianceDetailsByConfigRule.go | 8 ++++++-- .../api_op_GetComplianceDetailsByResource.go | 8 ++++++-- .../api_op_GetConformancePackComplianceDetails.go | 8 ++++++-- .../api_op_GetConformancePackComplianceSummary.go | 8 ++++++-- .../configservice/api_op_GetDiscoveredResourceCounts.go | 8 ++++++-- .../api_op_GetOrganizationConfigRuleDetailedStatus.go | 8 ++++++-- ...api_op_GetOrganizationConformancePackDetailedStatus.go | 8 ++++++-- service/configservice/api_op_GetResourceConfigHistory.go | 8 ++++++-- .../api_op_ListAggregateDiscoveredResources.go | 8 ++++++-- service/configservice/api_op_ListDiscoveredResources.go | 8 ++++++-- service/configservice/api_op_ListStoredQueries.go | 8 ++++++-- service/configservice/api_op_ListTagsForResource.go | 8 ++++++-- .../configservice/api_op_SelectAggregateResourceConfig.go | 8 ++++++-- service/configservice/api_op_SelectResourceConfig.go | 8 ++++++-- service/connect/api_op_GetCurrentMetricData.go | 8 ++++++-- service/connect/api_op_GetMetricData.go | 8 ++++++-- service/connect/api_op_ListAgentStatuses.go | 8 ++++++-- service/connect/api_op_ListApprovedOrigins.go | 8 ++++++-- service/connect/api_op_ListBots.go | 8 ++++++-- service/connect/api_op_ListContactFlowModules.go | 8 ++++++-- service/connect/api_op_ListContactFlows.go | 8 ++++++-- service/connect/api_op_ListContactReferences.go | 8 ++++++-- service/connect/api_op_ListHoursOfOperations.go | 8 ++++++-- service/connect/api_op_ListInstanceAttributes.go | 8 ++++++-- service/connect/api_op_ListInstanceStorageConfigs.go | 8 ++++++-- service/connect/api_op_ListInstances.go | 8 ++++++-- service/connect/api_op_ListIntegrationAssociations.go | 8 ++++++-- service/connect/api_op_ListLambdaFunctions.go | 8 ++++++-- service/connect/api_op_ListLexBots.go | 8 ++++++-- service/connect/api_op_ListPhoneNumbers.go | 8 ++++++-- service/connect/api_op_ListPrompts.go | 8 ++++++-- service/connect/api_op_ListQueueQuickConnects.go | 8 ++++++-- service/connect/api_op_ListQueues.go | 8 ++++++-- service/connect/api_op_ListQuickConnects.go | 8 ++++++-- service/connect/api_op_ListRoutingProfileQueues.go | 8 ++++++-- service/connect/api_op_ListRoutingProfiles.go | 8 ++++++-- service/connect/api_op_ListSecurityKeys.go | 8 ++++++-- service/connect/api_op_ListSecurityProfilePermissions.go | 8 ++++++-- service/connect/api_op_ListSecurityProfiles.go | 8 ++++++-- service/connect/api_op_ListUseCases.go | 8 ++++++-- service/connect/api_op_ListUserHierarchyGroups.go | 8 ++++++-- service/connect/api_op_ListUsers.go | 8 ++++++-- .../api_op_ListRealtimeContactAnalysisSegments.go | 8 ++++++-- service/connectparticipant/api_op_GetTranscript.go | 8 ++++++-- .../api_op_DescribeReportDefinitions.go | 8 ++++++-- service/costexplorer/api_op_GetSavingsPlansCoverage.go | 8 ++++++-- .../api_op_GetSavingsPlansUtilizationDetails.go | 8 ++++++-- .../costexplorer/api_op_ListCostCategoryDefinitions.go | 8 ++++++-- .../api_op_DescribeApplicableIndividualAssessments.go | 8 ++++++-- .../api_op_DescribeCertificates.go | 8 ++++++-- .../api_op_DescribeConnections.go | 8 ++++++-- .../api_op_DescribeEndpointSettings.go | 8 ++++++-- .../api_op_DescribeEndpointTypes.go | 8 ++++++-- .../databasemigrationservice/api_op_DescribeEndpoints.go | 8 ++++++-- .../api_op_DescribeEventSubscriptions.go | 8 ++++++-- service/databasemigrationservice/api_op_DescribeEvents.go | 8 ++++++-- .../api_op_DescribeOrderableReplicationInstances.go | 8 ++++++-- .../api_op_DescribePendingMaintenanceActions.go | 8 ++++++-- .../api_op_DescribeReplicationInstanceTaskLogs.go | 8 ++++++-- .../api_op_DescribeReplicationInstances.go | 8 ++++++-- .../api_op_DescribeReplicationSubnetGroups.go | 8 ++++++-- .../api_op_DescribeReplicationTaskAssessmentResults.go | 8 ++++++-- .../api_op_DescribeReplicationTaskAssessmentRuns.go | 8 ++++++-- ...api_op_DescribeReplicationTaskIndividualAssessments.go | 8 ++++++-- .../api_op_DescribeReplicationTasks.go | 8 ++++++-- .../databasemigrationservice/api_op_DescribeSchemas.go | 8 ++++++-- .../api_op_DescribeTableStatistics.go | 8 ++++++-- service/databrew/api_op_ListDatasets.go | 8 ++++++-- service/databrew/api_op_ListJobRuns.go | 8 ++++++-- service/databrew/api_op_ListJobs.go | 8 ++++++-- service/databrew/api_op_ListProjects.go | 8 ++++++-- service/databrew/api_op_ListRecipeVersions.go | 8 ++++++-- service/databrew/api_op_ListRecipes.go | 8 ++++++-- service/databrew/api_op_ListRulesets.go | 8 ++++++-- service/databrew/api_op_ListSchedules.go | 8 ++++++-- service/dataexchange/api_op_ListDataSetRevisions.go | 8 ++++++-- service/dataexchange/api_op_ListDataSets.go | 8 ++++++-- service/dataexchange/api_op_ListEventActions.go | 8 ++++++-- service/dataexchange/api_op_ListJobs.go | 8 ++++++-- service/dataexchange/api_op_ListRevisionAssets.go | 8 ++++++-- service/datapipeline/api_op_DescribeObjects.go | 8 ++++++-- service/datapipeline/api_op_ListPipelines.go | 8 ++++++-- service/datapipeline/api_op_QueryObjects.go | 8 ++++++-- service/datasync/api_op_ListAgents.go | 8 ++++++-- service/datasync/api_op_ListLocations.go | 8 ++++++-- service/datasync/api_op_ListTagsForResource.go | 8 ++++++-- service/datasync/api_op_ListTaskExecutions.go | 8 ++++++-- service/datasync/api_op_ListTasks.go | 8 ++++++-- service/detective/api_op_ListGraphs.go | 8 ++++++-- service/detective/api_op_ListInvitations.go | 8 ++++++-- service/detective/api_op_ListMembers.go | 8 ++++++-- service/devicefarm/api_op_GetOfferingStatus.go | 8 ++++++-- service/devicefarm/api_op_ListArtifacts.go | 8 ++++++-- service/devicefarm/api_op_ListDevicePools.go | 8 ++++++-- service/devicefarm/api_op_ListDevices.go | 8 ++++++-- service/devicefarm/api_op_ListJobs.go | 8 ++++++-- service/devicefarm/api_op_ListOfferingTransactions.go | 8 ++++++-- service/devicefarm/api_op_ListOfferings.go | 8 ++++++-- service/devicefarm/api_op_ListProjects.go | 8 ++++++-- service/devicefarm/api_op_ListRuns.go | 8 ++++++-- service/devicefarm/api_op_ListSamples.go | 8 ++++++-- service/devicefarm/api_op_ListSuites.go | 8 ++++++-- service/devicefarm/api_op_ListTestGridProjects.go | 8 ++++++-- service/devicefarm/api_op_ListTestGridSessionActions.go | 8 ++++++-- service/devicefarm/api_op_ListTestGridSessionArtifacts.go | 8 ++++++-- service/devicefarm/api_op_ListTestGridSessions.go | 8 ++++++-- service/devicefarm/api_op_ListTests.go | 8 ++++++-- service/devicefarm/api_op_ListUniqueProblems.go | 8 ++++++-- service/devicefarm/api_op_ListUploads.go | 8 ++++++-- ...api_op_DescribeOrganizationResourceCollectionHealth.go | 8 ++++++-- .../devopsguru/api_op_DescribeResourceCollectionHealth.go | 8 ++++++-- service/devopsguru/api_op_GetCostEstimation.go | 8 ++++++-- service/devopsguru/api_op_GetResourceCollection.go | 8 ++++++-- service/devopsguru/api_op_ListAnomaliesForInsight.go | 8 ++++++-- service/devopsguru/api_op_ListEvents.go | 8 ++++++-- service/devopsguru/api_op_ListInsights.go | 8 ++++++-- service/devopsguru/api_op_ListNotificationChannels.go | 8 ++++++-- service/devopsguru/api_op_ListOrganizationInsights.go | 8 ++++++-- service/devopsguru/api_op_ListRecommendations.go | 8 ++++++-- service/devopsguru/api_op_SearchInsights.go | 8 ++++++-- service/devopsguru/api_op_SearchOrganizationInsights.go | 8 ++++++-- .../directoryservice/api_op_DescribeDomainControllers.go | 8 ++++++-- service/docdb/api_op_DescribeCertificates.go | 8 ++++++-- service/docdb/api_op_DescribeDBClusterParameterGroups.go | 8 ++++++-- service/docdb/api_op_DescribeDBClusterParameters.go | 8 ++++++-- service/docdb/api_op_DescribeDBClusterSnapshots.go | 8 ++++++-- service/docdb/api_op_DescribeDBClusters.go | 8 ++++++-- service/docdb/api_op_DescribeDBEngineVersions.go | 8 ++++++-- service/docdb/api_op_DescribeDBInstances.go | 8 ++++++-- service/docdb/api_op_DescribeDBSubnetGroups.go | 8 ++++++-- service/docdb/api_op_DescribeEventSubscriptions.go | 8 ++++++-- service/docdb/api_op_DescribeEvents.go | 8 ++++++-- service/docdb/api_op_DescribeGlobalClusters.go | 8 ++++++-- .../docdb/api_op_DescribeOrderableDBInstanceOptions.go | 8 ++++++-- service/docdb/api_op_DescribePendingMaintenanceActions.go | 8 ++++++-- service/drs/api_op_DescribeJobLogItems.go | 8 ++++++-- service/drs/api_op_DescribeJobs.go | 8 ++++++-- service/drs/api_op_DescribeRecoveryInstances.go | 8 ++++++-- service/drs/api_op_DescribeRecoverySnapshots.go | 8 ++++++-- .../api_op_DescribeReplicationConfigurationTemplates.go | 8 ++++++-- service/drs/api_op_DescribeSourceServers.go | 8 ++++++-- service/dynamodb/api_op_ListContributorInsights.go | 8 ++++++-- service/dynamodb/api_op_ListExports.go | 8 ++++++-- service/dynamodb/api_op_ListTables.go | 8 ++++++-- service/dynamodb/api_op_Query.go | 1 + service/dynamodb/api_op_Scan.go | 1 + service/ebs/api_op_ListChangedBlocks.go | 8 ++++++-- service/ebs/api_op_ListSnapshotBlocks.go | 8 ++++++-- service/ec2/api_op_DescribeAddressesAttribute.go | 8 ++++++-- service/ec2/api_op_DescribeByoipCidrs.go | 8 ++++++-- service/ec2/api_op_DescribeCapacityReservationFleets.go | 8 ++++++-- service/ec2/api_op_DescribeCapacityReservations.go | 8 ++++++-- service/ec2/api_op_DescribeCarrierGateways.go | 8 ++++++-- service/ec2/api_op_DescribeClassicLinkInstances.go | 8 ++++++-- service/ec2/api_op_DescribeClientVpnAuthorizationRules.go | 8 ++++++-- service/ec2/api_op_DescribeClientVpnConnections.go | 8 ++++++-- service/ec2/api_op_DescribeClientVpnEndpoints.go | 8 ++++++-- service/ec2/api_op_DescribeClientVpnRoutes.go | 8 ++++++-- service/ec2/api_op_DescribeClientVpnTargetNetworks.go | 8 ++++++-- service/ec2/api_op_DescribeCoipPools.go | 8 ++++++-- service/ec2/api_op_DescribeDhcpOptions.go | 8 ++++++-- service/ec2/api_op_DescribeEgressOnlyInternetGateways.go | 8 ++++++-- service/ec2/api_op_DescribeExportImageTasks.go | 8 ++++++-- service/ec2/api_op_DescribeFastSnapshotRestores.go | 8 ++++++-- service/ec2/api_op_DescribeFleets.go | 8 ++++++-- service/ec2/api_op_DescribeFlowLogs.go | 8 ++++++-- service/ec2/api_op_DescribeFpgaImages.go | 8 ++++++-- service/ec2/api_op_DescribeHostReservationOfferings.go | 8 ++++++-- service/ec2/api_op_DescribeHostReservations.go | 8 ++++++-- service/ec2/api_op_DescribeHosts.go | 8 ++++++-- .../ec2/api_op_DescribeIamInstanceProfileAssociations.go | 8 ++++++-- service/ec2/api_op_DescribeImportImageTasks.go | 8 ++++++-- service/ec2/api_op_DescribeImportSnapshotTasks.go | 8 ++++++-- .../ec2/api_op_DescribeInstanceCreditSpecifications.go | 8 ++++++-- service/ec2/api_op_DescribeInstanceEventWindows.go | 8 ++++++-- service/ec2/api_op_DescribeInstanceStatus.go | 8 ++++++-- service/ec2/api_op_DescribeInstanceTypeOfferings.go | 8 ++++++-- service/ec2/api_op_DescribeInstanceTypes.go | 8 ++++++-- service/ec2/api_op_DescribeInstances.go | 8 ++++++-- service/ec2/api_op_DescribeInternetGateways.go | 8 ++++++-- service/ec2/api_op_DescribeIpamPools.go | 8 ++++++-- service/ec2/api_op_DescribeIpamScopes.go | 8 ++++++-- service/ec2/api_op_DescribeIpams.go | 8 ++++++-- service/ec2/api_op_DescribeIpv6Pools.go | 8 ++++++-- service/ec2/api_op_DescribeLaunchTemplateVersions.go | 8 ++++++-- service/ec2/api_op_DescribeLaunchTemplates.go | 8 ++++++-- ...lGatewayRouteTableVirtualInterfaceGroupAssociations.go | 8 ++++++-- ...pi_op_DescribeLocalGatewayRouteTableVpcAssociations.go | 8 ++++++-- service/ec2/api_op_DescribeLocalGatewayRouteTables.go | 8 ++++++-- .../api_op_DescribeLocalGatewayVirtualInterfaceGroups.go | 8 ++++++-- .../ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go | 8 ++++++-- service/ec2/api_op_DescribeLocalGateways.go | 8 ++++++-- service/ec2/api_op_DescribeManagedPrefixLists.go | 8 ++++++-- service/ec2/api_op_DescribeMovingAddresses.go | 8 ++++++-- service/ec2/api_op_DescribeNatGateways.go | 8 ++++++-- service/ec2/api_op_DescribeNetworkAcls.go | 8 ++++++-- .../api_op_DescribeNetworkInsightsAccessScopeAnalyses.go | 8 ++++++-- service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go | 8 ++++++-- service/ec2/api_op_DescribeNetworkInsightsAnalyses.go | 8 ++++++-- service/ec2/api_op_DescribeNetworkInsightsPaths.go | 8 ++++++-- service/ec2/api_op_DescribeNetworkInterfacePermissions.go | 8 ++++++-- service/ec2/api_op_DescribeNetworkInterfaces.go | 8 ++++++-- service/ec2/api_op_DescribePrefixLists.go | 8 ++++++-- service/ec2/api_op_DescribePrincipalIdFormat.go | 8 ++++++-- service/ec2/api_op_DescribePublicIpv4Pools.go | 8 ++++++-- service/ec2/api_op_DescribeReplaceRootVolumeTasks.go | 8 ++++++-- .../ec2/api_op_DescribeReservedInstancesModifications.go | 8 ++++++-- service/ec2/api_op_DescribeReservedInstancesOfferings.go | 8 ++++++-- service/ec2/api_op_DescribeRouteTables.go | 8 ++++++-- .../ec2/api_op_DescribeScheduledInstanceAvailability.go | 8 ++++++-- service/ec2/api_op_DescribeScheduledInstances.go | 8 ++++++-- service/ec2/api_op_DescribeSecurityGroupRules.go | 8 ++++++-- service/ec2/api_op_DescribeSecurityGroups.go | 8 ++++++-- service/ec2/api_op_DescribeSnapshotTierStatus.go | 8 ++++++-- service/ec2/api_op_DescribeSnapshots.go | 8 ++++++-- service/ec2/api_op_DescribeSpotFleetRequests.go | 8 ++++++-- service/ec2/api_op_DescribeSpotInstanceRequests.go | 8 ++++++-- service/ec2/api_op_DescribeSpotPriceHistory.go | 8 ++++++-- service/ec2/api_op_DescribeStaleSecurityGroups.go | 8 ++++++-- service/ec2/api_op_DescribeStoreImageTasks.go | 8 ++++++-- service/ec2/api_op_DescribeSubnets.go | 8 ++++++-- service/ec2/api_op_DescribeTags.go | 8 ++++++-- service/ec2/api_op_DescribeTrafficMirrorFilters.go | 8 ++++++-- service/ec2/api_op_DescribeTrafficMirrorSessions.go | 8 ++++++-- service/ec2/api_op_DescribeTrafficMirrorTargets.go | 8 ++++++-- service/ec2/api_op_DescribeTransitGatewayAttachments.go | 8 ++++++-- service/ec2/api_op_DescribeTransitGatewayConnectPeers.go | 8 ++++++-- service/ec2/api_op_DescribeTransitGatewayConnects.go | 8 ++++++-- .../ec2/api_op_DescribeTransitGatewayMulticastDomains.go | 8 ++++++-- .../api_op_DescribeTransitGatewayPeeringAttachments.go | 8 ++++++-- service/ec2/api_op_DescribeTransitGatewayRouteTables.go | 8 ++++++-- .../ec2/api_op_DescribeTransitGatewayVpcAttachments.go | 8 ++++++-- service/ec2/api_op_DescribeTransitGateways.go | 8 ++++++-- service/ec2/api_op_DescribeTrunkInterfaceAssociations.go | 8 ++++++-- service/ec2/api_op_DescribeVolumeStatus.go | 8 ++++++-- service/ec2/api_op_DescribeVolumes.go | 8 ++++++-- service/ec2/api_op_DescribeVolumesModifications.go | 8 ++++++-- service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go | 8 ++++++-- .../api_op_DescribeVpcEndpointConnectionNotifications.go | 8 ++++++-- service/ec2/api_op_DescribeVpcEndpointConnections.go | 8 ++++++-- .../api_op_DescribeVpcEndpointServiceConfigurations.go | 8 ++++++-- .../ec2/api_op_DescribeVpcEndpointServicePermissions.go | 8 ++++++-- service/ec2/api_op_DescribeVpcEndpoints.go | 8 ++++++-- service/ec2/api_op_DescribeVpcPeeringConnections.go | 8 ++++++-- service/ec2/api_op_DescribeVpcs.go | 8 ++++++-- service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go | 8 ++++++-- service/ec2/api_op_GetGroupsForCapacityReservation.go | 8 ++++++-- .../api_op_GetInstanceTypesFromInstanceRequirements.go | 8 ++++++-- service/ec2/api_op_GetIpamAddressHistory.go | 8 ++++++-- service/ec2/api_op_GetIpamPoolAllocations.go | 8 ++++++-- service/ec2/api_op_GetIpamPoolCidrs.go | 8 ++++++-- service/ec2/api_op_GetIpamResourceCidrs.go | 8 ++++++-- service/ec2/api_op_GetManagedPrefixListAssociations.go | 8 ++++++-- service/ec2/api_op_GetManagedPrefixListEntries.go | 8 ++++++-- service/ec2/api_op_GetSpotPlacementScores.go | 8 ++++++-- .../ec2/api_op_GetTransitGatewayAttachmentPropagations.go | 8 ++++++-- ...api_op_GetTransitGatewayMulticastDomainAssociations.go | 8 ++++++-- .../ec2/api_op_GetTransitGatewayPrefixListReferences.go | 8 ++++++-- .../ec2/api_op_GetTransitGatewayRouteTableAssociations.go | 8 ++++++-- .../ec2/api_op_GetTransitGatewayRouteTablePropagations.go | 8 ++++++-- service/ec2/api_op_GetVpnConnectionDeviceTypes.go | 8 ++++++-- service/ec2/api_op_ListSnapshotsInRecycleBin.go | 8 ++++++-- service/ec2/api_op_SearchLocalGatewayRoutes.go | 8 ++++++-- service/ec2/api_op_SearchTransitGatewayMulticastGroups.go | 8 ++++++-- service/ecr/api_op_DescribeImageScanFindings.go | 8 ++++++-- service/ecr/api_op_DescribeImages.go | 8 ++++++-- service/ecr/api_op_DescribePullThroughCacheRules.go | 8 ++++++-- service/ecr/api_op_DescribeRepositories.go | 8 ++++++-- service/ecr/api_op_GetLifecyclePolicyPreview.go | 8 ++++++-- service/ecr/api_op_ListImages.go | 8 ++++++-- service/ecrpublic/api_op_DescribeImageTags.go | 8 ++++++-- service/ecrpublic/api_op_DescribeImages.go | 8 ++++++-- service/ecrpublic/api_op_DescribeRegistries.go | 8 ++++++-- service/ecrpublic/api_op_DescribeRepositories.go | 8 ++++++-- service/ecs/api_op_ListAccountSettings.go | 8 ++++++-- service/ecs/api_op_ListAttributes.go | 8 ++++++-- service/ecs/api_op_ListClusters.go | 8 ++++++-- service/ecs/api_op_ListContainerInstances.go | 8 ++++++-- service/ecs/api_op_ListServices.go | 8 ++++++-- service/ecs/api_op_ListTaskDefinitionFamilies.go | 8 ++++++-- service/ecs/api_op_ListTaskDefinitions.go | 8 ++++++-- service/ecs/api_op_ListTasks.go | 8 ++++++-- service/efs/api_op_DescribeAccessPoints.go | 8 ++++++-- service/efs/api_op_DescribeFileSystems.go | 8 ++++++-- service/efs/api_op_DescribeTags.go | 8 ++++++-- service/efs/api_op_ListTagsForResource.go | 8 ++++++-- service/eks/api_op_DescribeAddonVersions.go | 8 ++++++-- service/eks/api_op_ListAddons.go | 8 ++++++-- service/eks/api_op_ListClusters.go | 8 ++++++-- service/eks/api_op_ListFargateProfiles.go | 8 ++++++-- service/eks/api_op_ListIdentityProviderConfigs.go | 8 ++++++-- service/eks/api_op_ListNodegroups.go | 8 ++++++-- service/eks/api_op_ListUpdates.go | 8 ++++++-- service/elasticache/api_op_DescribeCacheClusters.go | 8 ++++++-- service/elasticache/api_op_DescribeCacheEngineVersions.go | 8 ++++++-- .../elasticache/api_op_DescribeCacheParameterGroups.go | 8 ++++++-- service/elasticache/api_op_DescribeCacheParameters.go | 8 ++++++-- service/elasticache/api_op_DescribeCacheSecurityGroups.go | 8 ++++++-- service/elasticache/api_op_DescribeCacheSubnetGroups.go | 8 ++++++-- .../elasticache/api_op_DescribeEngineDefaultParameters.go | 8 ++++++-- service/elasticache/api_op_DescribeEvents.go | 8 ++++++-- .../elasticache/api_op_DescribeGlobalReplicationGroups.go | 8 ++++++-- service/elasticache/api_op_DescribeReplicationGroups.go | 8 ++++++-- service/elasticache/api_op_DescribeReservedCacheNodes.go | 8 ++++++-- .../api_op_DescribeReservedCacheNodesOfferings.go | 8 ++++++-- service/elasticache/api_op_DescribeServiceUpdates.go | 8 ++++++-- service/elasticache/api_op_DescribeSnapshots.go | 8 ++++++-- service/elasticache/api_op_DescribeUpdateActions.go | 8 ++++++-- service/elasticache/api_op_DescribeUserGroups.go | 8 ++++++-- service/elasticache/api_op_DescribeUsers.go | 8 ++++++-- .../api_op_DescribeEnvironmentManagedActionHistory.go | 8 ++++++-- service/elasticbeanstalk/api_op_DescribeEvents.go | 8 ++++++-- service/elasticbeanstalk/api_op_ListPlatformBranches.go | 8 ++++++-- service/elasticbeanstalk/api_op_ListPlatformVersions.go | 8 ++++++-- service/elasticinference/api_op_DescribeAccelerators.go | 8 ++++++-- .../elasticloadbalancing/api_op_DescribeLoadBalancers.go | 8 ++++++-- .../elasticloadbalancingv2/api_op_DescribeListeners.go | 8 ++++++-- .../api_op_DescribeLoadBalancers.go | 8 ++++++-- .../elasticloadbalancingv2/api_op_DescribeTargetGroups.go | 8 ++++++-- .../api_op_DescribeDomainAutoTunes.go | 8 ++++++-- ...api_op_DescribeInboundCrossClusterSearchConnections.go | 8 ++++++-- ...pi_op_DescribeOutboundCrossClusterSearchConnections.go | 8 ++++++-- service/elasticsearchservice/api_op_DescribePackages.go | 8 ++++++-- ...i_op_DescribeReservedElasticsearchInstanceOfferings.go | 8 ++++++-- .../api_op_DescribeReservedElasticsearchInstances.go | 8 ++++++-- .../api_op_GetPackageVersionHistory.go | 8 ++++++-- service/elasticsearchservice/api_op_GetUpgradeHistory.go | 8 ++++++-- .../elasticsearchservice/api_op_ListDomainsForPackage.go | 8 ++++++-- .../api_op_ListElasticsearchInstanceTypes.go | 8 ++++++-- .../api_op_ListElasticsearchVersions.go | 8 ++++++-- .../elasticsearchservice/api_op_ListPackagesForDomain.go | 8 ++++++-- service/elastictranscoder/api_op_ListJobsByPipeline.go | 8 ++++++-- service/elastictranscoder/api_op_ListJobsByStatus.go | 8 ++++++-- service/elastictranscoder/api_op_ListPipelines.go | 8 ++++++-- service/elastictranscoder/api_op_ListPresets.go | 8 ++++++-- service/emr/api_op_ListBootstrapActions.go | 8 ++++++-- service/emr/api_op_ListClusters.go | 8 ++++++-- service/emr/api_op_ListInstanceFleets.go | 8 ++++++-- service/emr/api_op_ListInstanceGroups.go | 8 ++++++-- service/emr/api_op_ListInstances.go | 8 ++++++-- service/emr/api_op_ListNotebookExecutions.go | 8 ++++++-- service/emr/api_op_ListReleaseLabels.go | 8 ++++++-- service/emr/api_op_ListSecurityConfigurations.go | 8 ++++++-- service/emr/api_op_ListSteps.go | 8 ++++++-- service/emr/api_op_ListStudioSessionMappings.go | 8 ++++++-- service/emr/api_op_ListStudios.go | 8 ++++++-- service/emrcontainers/api_op_ListJobRuns.go | 8 ++++++-- service/emrcontainers/api_op_ListManagedEndpoints.go | 8 ++++++-- service/emrcontainers/api_op_ListVirtualClusters.go | 8 ++++++-- service/evidently/api_op_ListExperiments.go | 8 ++++++-- service/evidently/api_op_ListFeatures.go | 8 ++++++-- service/evidently/api_op_ListLaunches.go | 8 ++++++-- service/evidently/api_op_ListProjects.go | 8 ++++++-- service/finspacedata/api_op_ListChangesets.go | 8 ++++++-- service/finspacedata/api_op_ListDataViews.go | 8 ++++++-- service/finspacedata/api_op_ListDatasets.go | 8 ++++++-- service/fis/api_op_ListActions.go | 8 ++++++-- service/fis/api_op_ListExperimentTemplates.go | 8 ++++++-- service/fis/api_op_ListExperiments.go | 8 ++++++-- service/fms/api_op_ListAppsLists.go | 8 ++++++-- service/fms/api_op_ListComplianceStatus.go | 8 ++++++-- service/fms/api_op_ListMemberAccounts.go | 8 ++++++-- service/fms/api_op_ListPolicies.go | 8 ++++++-- service/fms/api_op_ListProtocolsLists.go | 8 ++++++-- service/forecast/api_op_ListDatasetGroups.go | 8 ++++++-- service/forecast/api_op_ListDatasetImportJobs.go | 8 ++++++-- service/forecast/api_op_ListDatasets.go | 8 ++++++-- service/forecast/api_op_ListForecastExportJobs.go | 8 ++++++-- service/forecast/api_op_ListForecasts.go | 8 ++++++-- .../forecast/api_op_ListPredictorBacktestExportJobs.go | 8 ++++++-- service/forecast/api_op_ListPredictors.go | 8 ++++++-- service/frauddetector/api_op_DescribeModelVersions.go | 8 ++++++-- service/frauddetector/api_op_GetBatchImportJobs.go | 8 ++++++-- service/frauddetector/api_op_GetBatchPredictionJobs.go | 8 ++++++-- service/frauddetector/api_op_GetDetectors.go | 8 ++++++-- service/frauddetector/api_op_GetEntityTypes.go | 8 ++++++-- service/frauddetector/api_op_GetEventTypes.go | 8 ++++++-- service/frauddetector/api_op_GetExternalModels.go | 8 ++++++-- service/frauddetector/api_op_GetLabels.go | 8 ++++++-- service/frauddetector/api_op_GetModels.go | 8 ++++++-- service/frauddetector/api_op_GetOutcomes.go | 8 ++++++-- service/frauddetector/api_op_GetRules.go | 8 ++++++-- service/frauddetector/api_op_GetVariables.go | 8 ++++++-- service/frauddetector/api_op_ListTagsForResource.go | 8 ++++++-- service/fsx/api_op_DescribeBackups.go | 8 ++++++-- service/fsx/api_op_DescribeDataRepositoryAssociations.go | 8 ++++++-- service/fsx/api_op_DescribeDataRepositoryTasks.go | 8 ++++++-- service/fsx/api_op_DescribeFileSystemAliases.go | 8 ++++++-- service/fsx/api_op_DescribeFileSystems.go | 8 ++++++-- service/fsx/api_op_DescribeSnapshots.go | 8 ++++++-- service/fsx/api_op_DescribeStorageVirtualMachines.go | 8 ++++++-- service/fsx/api_op_DescribeVolumes.go | 8 ++++++-- service/fsx/api_op_ListTagsForResource.go | 8 ++++++-- service/gamelift/api_op_DescribeFleetAttributes.go | 8 ++++++-- service/gamelift/api_op_DescribeFleetCapacity.go | 8 ++++++-- service/gamelift/api_op_DescribeFleetEvents.go | 8 ++++++-- .../gamelift/api_op_DescribeFleetLocationAttributes.go | 8 ++++++-- service/gamelift/api_op_DescribeFleetUtilization.go | 8 ++++++-- service/gamelift/api_op_DescribeGameServerInstances.go | 8 ++++++-- service/gamelift/api_op_DescribeGameSessionDetails.go | 8 ++++++-- service/gamelift/api_op_DescribeGameSessionQueues.go | 8 ++++++-- service/gamelift/api_op_DescribeGameSessions.go | 8 ++++++-- service/gamelift/api_op_DescribeInstances.go | 8 ++++++-- .../gamelift/api_op_DescribeMatchmakingConfigurations.go | 8 ++++++-- service/gamelift/api_op_DescribeMatchmakingRuleSets.go | 8 ++++++-- service/gamelift/api_op_DescribePlayerSessions.go | 8 ++++++-- service/gamelift/api_op_DescribeScalingPolicies.go | 8 ++++++-- service/gamelift/api_op_ListAliases.go | 8 ++++++-- service/gamelift/api_op_ListBuilds.go | 8 ++++++-- service/gamelift/api_op_ListFleets.go | 8 ++++++-- service/gamelift/api_op_ListGameServerGroups.go | 8 ++++++-- service/gamelift/api_op_ListGameServers.go | 8 ++++++-- service/gamelift/api_op_ListScripts.go | 8 ++++++-- service/gamelift/api_op_SearchGameSessions.go | 8 ++++++-- service/glacier/api_op_ListJobs.go | 8 ++++++-- service/glacier/api_op_ListMultipartUploads.go | 8 ++++++-- service/glacier/api_op_ListParts.go | 8 ++++++-- service/glacier/api_op_ListVaults.go | 8 ++++++-- service/globalaccelerator/api_op_ListAccelerators.go | 8 ++++++-- service/globalaccelerator/api_op_ListByoipCidrs.go | 8 ++++++-- .../api_op_ListCustomRoutingAccelerators.go | 8 ++++++-- .../api_op_ListCustomRoutingEndpointGroups.go | 8 ++++++-- .../api_op_ListCustomRoutingListeners.go | 8 ++++++-- .../api_op_ListCustomRoutingPortMappings.go | 8 ++++++-- .../api_op_ListCustomRoutingPortMappingsByDestination.go | 8 ++++++-- service/globalaccelerator/api_op_ListEndpointGroups.go | 8 ++++++-- service/globalaccelerator/api_op_ListListeners.go | 8 ++++++-- service/glue/api_op_GetBlueprintRuns.go | 8 ++++++-- service/glue/api_op_GetClassifiers.go | 8 ++++++-- service/glue/api_op_GetConnections.go | 8 ++++++-- service/glue/api_op_GetCrawlerMetrics.go | 8 ++++++-- service/glue/api_op_GetCrawlers.go | 8 ++++++-- service/glue/api_op_GetDatabases.go | 8 ++++++-- service/glue/api_op_GetDevEndpoints.go | 8 ++++++-- service/glue/api_op_GetJobRuns.go | 8 ++++++-- service/glue/api_op_GetJobs.go | 8 ++++++-- service/glue/api_op_GetMLTaskRuns.go | 8 ++++++-- service/glue/api_op_GetMLTransforms.go | 8 ++++++-- service/glue/api_op_GetPartitionIndexes.go | 8 ++++++-- service/glue/api_op_GetPartitions.go | 8 ++++++-- service/glue/api_op_GetResourcePolicies.go | 8 ++++++-- service/glue/api_op_GetSecurityConfigurations.go | 8 ++++++-- service/glue/api_op_GetTableVersions.go | 8 ++++++-- service/glue/api_op_GetTables.go | 8 ++++++-- service/glue/api_op_GetTriggers.go | 8 ++++++-- service/glue/api_op_GetUserDefinedFunctions.go | 8 ++++++-- service/glue/api_op_GetWorkflowRuns.go | 8 ++++++-- service/glue/api_op_ListBlueprints.go | 8 ++++++-- service/glue/api_op_ListCrawlers.go | 8 ++++++-- service/glue/api_op_ListDevEndpoints.go | 8 ++++++-- service/glue/api_op_ListJobs.go | 8 ++++++-- service/glue/api_op_ListMLTransforms.go | 8 ++++++-- service/glue/api_op_ListRegistries.go | 8 ++++++-- service/glue/api_op_ListSchemaVersions.go | 8 ++++++-- service/glue/api_op_ListSchemas.go | 8 ++++++-- service/glue/api_op_ListTriggers.go | 8 ++++++-- service/glue/api_op_ListWorkflows.go | 8 ++++++-- service/glue/api_op_SearchTables.go | 8 ++++++-- service/grafana/api_op_ListPermissions.go | 8 ++++++-- service/grafana/api_op_ListWorkspaces.go | 8 ++++++-- .../api_op_ListClientDevicesAssociatedWithCoreDevice.go | 8 ++++++-- service/greengrassv2/api_op_ListComponentVersions.go | 8 ++++++-- service/greengrassv2/api_op_ListComponents.go | 8 ++++++-- service/greengrassv2/api_op_ListCoreDevices.go | 8 ++++++-- service/greengrassv2/api_op_ListDeployments.go | 8 ++++++-- service/greengrassv2/api_op_ListEffectiveDeployments.go | 8 ++++++-- service/greengrassv2/api_op_ListInstalledComponents.go | 8 ++++++-- service/groundstation/api_op_ListConfigs.go | 8 ++++++-- service/groundstation/api_op_ListContacts.go | 8 ++++++-- .../groundstation/api_op_ListDataflowEndpointGroups.go | 8 ++++++-- service/groundstation/api_op_ListGroundStations.go | 8 ++++++-- service/groundstation/api_op_ListMissionProfiles.go | 8 ++++++-- service/groundstation/api_op_ListSatellites.go | 8 ++++++-- service/guardduty/api_op_GetUsageStatistics.go | 8 ++++++-- service/guardduty/api_op_ListDetectors.go | 8 ++++++-- service/guardduty/api_op_ListFilters.go | 8 ++++++-- service/guardduty/api_op_ListFindings.go | 8 ++++++-- service/guardduty/api_op_ListIPSets.go | 8 ++++++-- service/guardduty/api_op_ListInvitations.go | 8 ++++++-- service/guardduty/api_op_ListMembers.go | 8 ++++++-- service/guardduty/api_op_ListOrganizationAdminAccounts.go | 8 ++++++-- service/guardduty/api_op_ListPublishingDestinations.go | 8 ++++++-- service/guardduty/api_op_ListThreatIntelSets.go | 8 ++++++-- .../api_op_DescribeAffectedAccountsForOrganization.go | 8 ++++++-- service/health/api_op_DescribeAffectedEntities.go | 8 ++++++-- .../api_op_DescribeAffectedEntitiesForOrganization.go | 8 ++++++-- service/health/api_op_DescribeEventAggregates.go | 8 ++++++-- service/health/api_op_DescribeEventTypes.go | 8 ++++++-- service/health/api_op_DescribeEvents.go | 8 ++++++-- service/health/api_op_DescribeEventsForOrganization.go | 8 ++++++-- service/healthlake/api_op_ListFHIRDatastores.go | 8 ++++++-- service/healthlake/api_op_ListFHIRExportJobs.go | 8 ++++++-- service/healthlake/api_op_ListFHIRImportJobs.go | 8 ++++++-- service/honeycode/api_op_ListTableColumns.go | 8 ++++++-- service/honeycode/api_op_ListTableRows.go | 8 ++++++-- service/honeycode/api_op_ListTables.go | 8 ++++++-- service/honeycode/api_op_QueryTableRows.go | 8 ++++++-- service/iam/api_op_GetAccountAuthorizationDetails.go | 8 ++++++-- service/iam/api_op_GetGroup.go | 8 ++++++-- service/iam/api_op_ListAccessKeys.go | 8 ++++++-- service/iam/api_op_ListAccountAliases.go | 8 ++++++-- service/iam/api_op_ListAttachedGroupPolicies.go | 8 ++++++-- service/iam/api_op_ListAttachedRolePolicies.go | 8 ++++++-- service/iam/api_op_ListAttachedUserPolicies.go | 8 ++++++-- service/iam/api_op_ListEntitiesForPolicy.go | 8 ++++++-- service/iam/api_op_ListGroupPolicies.go | 8 ++++++-- service/iam/api_op_ListGroups.go | 8 ++++++-- service/iam/api_op_ListGroupsForUser.go | 8 ++++++-- service/iam/api_op_ListInstanceProfiles.go | 8 ++++++-- service/iam/api_op_ListInstanceProfilesForRole.go | 8 ++++++-- service/iam/api_op_ListMFADevices.go | 8 ++++++-- service/iam/api_op_ListPolicies.go | 8 ++++++-- service/iam/api_op_ListPolicyVersions.go | 8 ++++++-- service/iam/api_op_ListRolePolicies.go | 8 ++++++-- service/iam/api_op_ListRoles.go | 8 ++++++-- service/iam/api_op_ListSSHPublicKeys.go | 8 ++++++-- service/iam/api_op_ListServerCertificates.go | 8 ++++++-- service/iam/api_op_ListSigningCertificates.go | 8 ++++++-- service/iam/api_op_ListUserPolicies.go | 8 ++++++-- service/iam/api_op_ListUserTags.go | 8 ++++++-- service/iam/api_op_ListUsers.go | 8 ++++++-- service/iam/api_op_ListVirtualMFADevices.go | 8 ++++++-- service/iam/api_op_SimulateCustomPolicy.go | 8 ++++++-- service/iam/api_op_SimulatePrincipalPolicy.go | 8 ++++++-- service/identitystore/api_op_ListGroups.go | 8 ++++++-- service/identitystore/api_op_ListUsers.go | 8 ++++++-- service/imagebuilder/api_op_ListComponentBuildVersions.go | 8 ++++++-- service/imagebuilder/api_op_ListComponents.go | 8 ++++++-- service/imagebuilder/api_op_ListContainerRecipes.go | 8 ++++++-- .../imagebuilder/api_op_ListDistributionConfigurations.go | 8 ++++++-- service/imagebuilder/api_op_ListImageBuildVersions.go | 8 ++++++-- service/imagebuilder/api_op_ListImagePackages.go | 8 ++++++-- service/imagebuilder/api_op_ListImagePipelineImages.go | 8 ++++++-- service/imagebuilder/api_op_ListImagePipelines.go | 8 ++++++-- service/imagebuilder/api_op_ListImageRecipes.go | 8 ++++++-- service/imagebuilder/api_op_ListImages.go | 8 ++++++-- .../api_op_ListInfrastructureConfigurations.go | 8 ++++++-- service/inspector/api_op_GetExclusionsPreview.go | 8 ++++++-- service/inspector/api_op_ListAssessmentRunAgents.go | 8 ++++++-- service/inspector/api_op_ListAssessmentRuns.go | 8 ++++++-- service/inspector/api_op_ListAssessmentTargets.go | 8 ++++++-- service/inspector/api_op_ListAssessmentTemplates.go | 8 ++++++-- service/inspector/api_op_ListEventSubscriptions.go | 8 ++++++-- service/inspector/api_op_ListExclusions.go | 8 ++++++-- service/inspector/api_op_ListFindings.go | 8 ++++++-- service/inspector/api_op_ListRulesPackages.go | 8 ++++++-- service/inspector/api_op_PreviewAgents.go | 8 ++++++-- service/inspector2/api_op_ListAccountPermissions.go | 8 ++++++-- service/inspector2/api_op_ListCoverage.go | 8 ++++++-- service/inspector2/api_op_ListCoverageStatistics.go | 8 ++++++-- service/inspector2/api_op_ListDelegatedAdminAccounts.go | 8 ++++++-- service/inspector2/api_op_ListFilters.go | 8 ++++++-- service/inspector2/api_op_ListFindingAggregations.go | 8 ++++++-- service/inspector2/api_op_ListFindings.go | 8 ++++++-- service/inspector2/api_op_ListMembers.go | 8 ++++++-- service/inspector2/api_op_ListUsageTotals.go | 8 ++++++-- service/iot/api_op_GetBehaviorModelTrainingSummaries.go | 8 ++++++-- service/iot/api_op_ListActiveViolations.go | 8 ++++++-- service/iot/api_op_ListAttachedPolicies.go | 8 ++++++-- service/iot/api_op_ListAuditFindings.go | 8 ++++++-- .../iot/api_op_ListAuditMitigationActionsExecutions.go | 8 ++++++-- service/iot/api_op_ListAuditMitigationActionsTasks.go | 8 ++++++-- service/iot/api_op_ListAuditSuppressions.go | 8 ++++++-- service/iot/api_op_ListAuditTasks.go | 8 ++++++-- service/iot/api_op_ListAuthorizers.go | 8 ++++++-- service/iot/api_op_ListBillingGroups.go | 8 ++++++-- service/iot/api_op_ListCACertificates.go | 8 ++++++-- service/iot/api_op_ListCertificates.go | 8 ++++++-- service/iot/api_op_ListCertificatesByCA.go | 8 ++++++-- service/iot/api_op_ListCustomMetrics.go | 8 ++++++-- .../iot/api_op_ListDetectMitigationActionsExecutions.go | 8 ++++++-- service/iot/api_op_ListDetectMitigationActionsTasks.go | 8 ++++++-- service/iot/api_op_ListDimensions.go | 8 ++++++-- service/iot/api_op_ListDomainConfigurations.go | 8 ++++++-- service/iot/api_op_ListFleetMetrics.go | 8 ++++++-- service/iot/api_op_ListIndices.go | 8 ++++++-- service/iot/api_op_ListJobExecutionsForJob.go | 8 ++++++-- service/iot/api_op_ListJobExecutionsForThing.go | 8 ++++++-- service/iot/api_op_ListJobTemplates.go | 8 ++++++-- service/iot/api_op_ListJobs.go | 8 ++++++-- service/iot/api_op_ListMitigationActions.go | 8 ++++++-- service/iot/api_op_ListOTAUpdates.go | 8 ++++++-- service/iot/api_op_ListOutgoingCertificates.go | 8 ++++++-- service/iot/api_op_ListPolicies.go | 8 ++++++-- service/iot/api_op_ListPolicyPrincipals.go | 8 ++++++-- service/iot/api_op_ListPrincipalPolicies.go | 8 ++++++-- service/iot/api_op_ListPrincipalThings.go | 8 ++++++-- service/iot/api_op_ListProvisioningTemplateVersions.go | 8 ++++++-- service/iot/api_op_ListProvisioningTemplates.go | 8 ++++++-- service/iot/api_op_ListRoleAliases.go | 8 ++++++-- service/iot/api_op_ListScheduledAudits.go | 8 ++++++-- service/iot/api_op_ListSecurityProfiles.go | 8 ++++++-- service/iot/api_op_ListSecurityProfilesForTarget.go | 8 ++++++-- service/iot/api_op_ListStreams.go | 8 ++++++-- service/iot/api_op_ListTagsForResource.go | 8 ++++++-- service/iot/api_op_ListTargetsForPolicy.go | 8 ++++++-- service/iot/api_op_ListTargetsForSecurityProfile.go | 8 ++++++-- service/iot/api_op_ListThingGroups.go | 8 ++++++-- service/iot/api_op_ListThingGroupsForThing.go | 8 ++++++-- service/iot/api_op_ListThingPrincipals.go | 8 ++++++-- service/iot/api_op_ListThingRegistrationTaskReports.go | 8 ++++++-- service/iot/api_op_ListThingRegistrationTasks.go | 8 ++++++-- service/iot/api_op_ListThingTypes.go | 8 ++++++-- service/iot/api_op_ListThings.go | 8 ++++++-- service/iot/api_op_ListThingsInBillingGroup.go | 8 ++++++-- service/iot/api_op_ListThingsInThingGroup.go | 8 ++++++-- service/iot/api_op_ListTopicRuleDestinations.go | 8 ++++++-- service/iot/api_op_ListTopicRules.go | 8 ++++++-- service/iot/api_op_ListV2LoggingLevels.go | 8 ++++++-- service/iot/api_op_ListViolationEvents.go | 8 ++++++-- service/iot1clickprojects/api_op_ListPlacements.go | 8 ++++++-- service/iot1clickprojects/api_op_ListProjects.go | 8 ++++++-- service/iotanalytics/api_op_ListChannels.go | 8 ++++++-- service/iotanalytics/api_op_ListDatasetContents.go | 8 ++++++-- service/iotanalytics/api_op_ListDatasets.go | 8 ++++++-- service/iotanalytics/api_op_ListDatastores.go | 8 ++++++-- service/iotanalytics/api_op_ListPipelines.go | 8 ++++++-- service/iotdataplane/api_op_ListRetainedMessages.go | 8 ++++++-- service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go | 8 ++++++-- service/iotdeviceadvisor/api_op_ListSuiteRuns.go | 8 ++++++-- service/iotfleethub/api_op_ListApplications.go | 8 ++++++-- service/iotsecuretunneling/api_op_ListTunnels.go | 8 ++++++-- service/iotsitewise/api_op_GetAssetPropertyAggregates.go | 8 ++++++-- .../iotsitewise/api_op_GetAssetPropertyValueHistory.go | 8 ++++++-- .../api_op_GetInterpolatedAssetPropertyValues.go | 8 ++++++-- service/iotsitewise/api_op_ListAccessPolicies.go | 8 ++++++-- service/iotsitewise/api_op_ListAssetModels.go | 8 ++++++-- service/iotsitewise/api_op_ListAssetRelationships.go | 8 ++++++-- service/iotsitewise/api_op_ListAssets.go | 8 ++++++-- service/iotsitewise/api_op_ListAssociatedAssets.go | 8 ++++++-- service/iotsitewise/api_op_ListDashboards.go | 8 ++++++-- service/iotsitewise/api_op_ListGateways.go | 8 ++++++-- service/iotsitewise/api_op_ListPortals.go | 8 ++++++-- service/iotsitewise/api_op_ListProjectAssets.go | 8 ++++++-- service/iotsitewise/api_op_ListProjects.go | 8 ++++++-- service/iotsitewise/api_op_ListTimeSeries.go | 8 ++++++-- service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go | 8 ++++++-- .../iotthingsgraph/api_op_GetSystemTemplateRevisions.go | 8 ++++++-- .../iotthingsgraph/api_op_ListFlowExecutionMessages.go | 8 ++++++-- service/iotthingsgraph/api_op_ListTagsForResource.go | 8 ++++++-- service/iotthingsgraph/api_op_SearchEntities.go | 8 ++++++-- service/iotthingsgraph/api_op_SearchFlowExecutions.go | 8 ++++++-- service/iotthingsgraph/api_op_SearchFlowTemplates.go | 8 ++++++-- service/iotthingsgraph/api_op_SearchSystemInstances.go | 8 ++++++-- service/iotthingsgraph/api_op_SearchSystemTemplates.go | 8 ++++++-- service/iotthingsgraph/api_op_SearchThings.go | 8 ++++++-- service/iottwinmaker/api_op_GetPropertyValueHistory.go | 8 ++++++-- service/iottwinmaker/api_op_ListComponentTypes.go | 8 ++++++-- service/iottwinmaker/api_op_ListEntities.go | 8 ++++++-- service/iottwinmaker/api_op_ListScenes.go | 8 ++++++-- service/iottwinmaker/api_op_ListWorkspaces.go | 8 ++++++-- service/iotwireless/api_op_ListDestinations.go | 8 ++++++-- service/iotwireless/api_op_ListDeviceProfiles.go | 8 ++++++-- service/iotwireless/api_op_ListFuotaTasks.go | 8 ++++++-- service/iotwireless/api_op_ListMulticastGroups.go | 8 ++++++-- .../iotwireless/api_op_ListMulticastGroupsByFuotaTask.go | 8 ++++++-- service/iotwireless/api_op_ListServiceProfiles.go | 8 ++++++-- service/iotwireless/api_op_ListWirelessDevices.go | 8 ++++++-- service/iotwireless/api_op_ListWirelessGateways.go | 8 ++++++-- service/ivs/api_op_ListChannels.go | 8 ++++++-- service/ivs/api_op_ListPlaybackKeyPairs.go | 8 ++++++-- service/ivs/api_op_ListRecordingConfigurations.go | 8 ++++++-- service/ivs/api_op_ListStreamKeys.go | 8 ++++++-- service/ivs/api_op_ListStreamSessions.go | 8 ++++++-- service/ivs/api_op_ListStreams.go | 8 ++++++-- service/kafka/api_op_ListClusterOperations.go | 8 ++++++-- service/kafka/api_op_ListClusters.go | 8 ++++++-- service/kafka/api_op_ListClustersV2.go | 8 ++++++-- service/kafka/api_op_ListConfigurationRevisions.go | 8 ++++++-- service/kafka/api_op_ListConfigurations.go | 8 ++++++-- service/kafka/api_op_ListKafkaVersions.go | 8 ++++++-- service/kafka/api_op_ListNodes.go | 8 ++++++-- service/kafka/api_op_ListScramSecrets.go | 8 ++++++-- service/kafkaconnect/api_op_ListConnectors.go | 8 ++++++-- service/kafkaconnect/api_op_ListCustomPlugins.go | 8 ++++++-- service/kafkaconnect/api_op_ListWorkerConfigurations.go | 8 ++++++-- service/kendra/api_op_ListDataSourceSyncJobs.go | 8 ++++++-- service/kendra/api_op_ListDataSources.go | 8 ++++++-- service/kendra/api_op_ListEntityPersonas.go | 8 ++++++-- service/kendra/api_op_ListExperienceEntities.go | 8 ++++++-- service/kendra/api_op_ListExperiences.go | 8 ++++++-- service/kendra/api_op_ListIndices.go | 8 ++++++-- service/kinesis/api_op_ListStreamConsumers.go | 8 ++++++-- service/kinesisvideo/api_op_ListSignalingChannels.go | 8 ++++++-- service/kinesisvideo/api_op_ListStreams.go | 8 ++++++-- service/kms/api_op_ListAliases.go | 8 ++++++-- service/kms/api_op_ListGrants.go | 8 ++++++-- service/kms/api_op_ListKeyPolicies.go | 8 ++++++-- service/kms/api_op_ListKeys.go | 8 ++++++-- .../api_op_GetEffectivePermissionsForPath.go | 8 ++++++-- service/lakeformation/api_op_GetTableObjects.go | 8 ++++++-- service/lakeformation/api_op_GetWorkUnits.go | 8 ++++++-- service/lakeformation/api_op_ListDataCellsFilter.go | 8 ++++++-- service/lakeformation/api_op_ListLFTags.go | 8 ++++++-- service/lakeformation/api_op_ListPermissions.go | 8 ++++++-- service/lakeformation/api_op_ListResources.go | 8 ++++++-- .../lakeformation/api_op_ListTableStorageOptimizers.go | 8 ++++++-- service/lakeformation/api_op_ListTransactions.go | 8 ++++++-- service/lakeformation/api_op_SearchDatabasesByLFTags.go | 8 ++++++-- service/lakeformation/api_op_SearchTablesByLFTags.go | 8 ++++++-- service/lambda/api_op_ListAliases.go | 8 ++++++-- service/lambda/api_op_ListCodeSigningConfigs.go | 8 ++++++-- service/lambda/api_op_ListEventSourceMappings.go | 8 ++++++-- service/lambda/api_op_ListFunctionEventInvokeConfigs.go | 8 ++++++-- service/lambda/api_op_ListFunctions.go | 8 ++++++-- service/lambda/api_op_ListFunctionsByCodeSigningConfig.go | 8 ++++++-- service/lambda/api_op_ListLayerVersions.go | 8 ++++++-- service/lambda/api_op_ListLayers.go | 8 ++++++-- .../lambda/api_op_ListProvisionedConcurrencyConfigs.go | 8 ++++++-- service/lambda/api_op_ListVersionsByFunction.go | 8 ++++++-- service/lexmodelbuildingservice/api_op_GetBotAliases.go | 8 ++++++-- .../api_op_GetBotChannelAssociations.go | 8 ++++++-- service/lexmodelbuildingservice/api_op_GetBotVersions.go | 8 ++++++-- service/lexmodelbuildingservice/api_op_GetBots.go | 8 ++++++-- .../lexmodelbuildingservice/api_op_GetBuiltinIntents.go | 8 ++++++-- .../lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go | 8 ++++++-- .../lexmodelbuildingservice/api_op_GetIntentVersions.go | 8 ++++++-- service/lexmodelbuildingservice/api_op_GetIntents.go | 8 ++++++-- service/lexmodelbuildingservice/api_op_GetMigrations.go | 8 ++++++-- .../lexmodelbuildingservice/api_op_GetSlotTypeVersions.go | 8 ++++++-- service/lexmodelbuildingservice/api_op_GetSlotTypes.go | 8 ++++++-- service/lexmodelsv2/api_op_ListAggregatedUtterances.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBotAliases.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBotLocales.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBotRecommendations.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBotVersions.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBots.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBuiltInIntents.go | 8 ++++++-- service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go | 8 ++++++-- service/lexmodelsv2/api_op_ListExports.go | 8 ++++++-- service/lexmodelsv2/api_op_ListImports.go | 8 ++++++-- service/lexmodelsv2/api_op_ListIntents.go | 8 ++++++-- service/lexmodelsv2/api_op_ListRecommendedIntents.go | 8 ++++++-- service/lexmodelsv2/api_op_ListSlotTypes.go | 8 ++++++-- service/lexmodelsv2/api_op_ListSlots.go | 8 ++++++-- service/location/api_op_GetDevicePositionHistory.go | 8 ++++++-- service/location/api_op_ListDevicePositions.go | 8 ++++++-- service/location/api_op_ListGeofenceCollections.go | 8 ++++++-- service/location/api_op_ListGeofences.go | 8 ++++++-- service/location/api_op_ListMaps.go | 8 ++++++-- service/location/api_op_ListPlaceIndexes.go | 8 ++++++-- service/location/api_op_ListRouteCalculators.go | 8 ++++++-- service/location/api_op_ListTrackerConsumers.go | 8 ++++++-- service/location/api_op_ListTrackers.go | 8 ++++++-- service/lookoutequipment/api_op_ListDataIngestionJobs.go | 8 ++++++-- service/lookoutequipment/api_op_ListDatasets.go | 8 ++++++-- .../lookoutequipment/api_op_ListInferenceExecutions.go | 8 ++++++-- .../lookoutequipment/api_op_ListInferenceSchedulers.go | 8 ++++++-- service/lookoutequipment/api_op_ListModels.go | 8 ++++++-- .../api_op_DescribeAnomalyDetectionExecutions.go | 8 ++++++-- service/lookoutmetrics/api_op_GetFeedback.go | 8 ++++++-- service/lookoutmetrics/api_op_ListAlerts.go | 8 ++++++-- service/lookoutmetrics/api_op_ListAnomalyDetectors.go | 8 ++++++-- .../lookoutmetrics/api_op_ListAnomalyGroupSummaries.go | 8 ++++++-- .../lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go | 8 ++++++-- service/lookoutmetrics/api_op_ListMetricSets.go | 8 ++++++-- service/lookoutvision/api_op_ListDatasetEntries.go | 8 ++++++-- service/lookoutvision/api_op_ListModels.go | 8 ++++++-- service/lookoutvision/api_op_ListProjects.go | 8 ++++++-- .../machinelearning/api_op_DescribeBatchPredictions.go | 8 ++++++-- service/machinelearning/api_op_DescribeDataSources.go | 8 ++++++-- service/machinelearning/api_op_DescribeEvaluations.go | 8 ++++++-- service/machinelearning/api_op_DescribeMLModels.go | 8 ++++++-- service/macie/api_op_ListMemberAccounts.go | 8 ++++++-- service/macie/api_op_ListS3Resources.go | 8 ++++++-- service/macie2/api_op_DescribeBuckets.go | 8 ++++++-- service/macie2/api_op_GetUsageStatistics.go | 8 ++++++-- service/macie2/api_op_ListClassificationJobs.go | 8 ++++++-- service/macie2/api_op_ListCustomDataIdentifiers.go | 8 ++++++-- service/macie2/api_op_ListFindings.go | 8 ++++++-- service/macie2/api_op_ListFindingsFilters.go | 8 ++++++-- service/macie2/api_op_ListInvitations.go | 8 ++++++-- service/macie2/api_op_ListMembers.go | 8 ++++++-- service/macie2/api_op_ListOrganizationAdminAccounts.go | 8 ++++++-- service/macie2/api_op_SearchResources.go | 8 ++++++-- service/managedblockchain/api_op_ListInvitations.go | 8 ++++++-- service/managedblockchain/api_op_ListMembers.go | 8 ++++++-- service/managedblockchain/api_op_ListNetworks.go | 8 ++++++-- service/managedblockchain/api_op_ListNodes.go | 8 ++++++-- service/managedblockchain/api_op_ListProposalVotes.go | 8 ++++++-- service/managedblockchain/api_op_ListProposals.go | 8 ++++++-- service/marketplacecatalog/api_op_ListChangeSets.go | 8 ++++++-- service/marketplacecatalog/api_op_ListEntities.go | 8 ++++++-- service/mediaconnect/api_op_ListEntitlements.go | 8 ++++++-- service/mediaconnect/api_op_ListFlows.go | 8 ++++++-- service/mediaconnect/api_op_ListOfferings.go | 8 ++++++-- service/mediaconnect/api_op_ListReservations.go | 8 ++++++-- service/mediaconvert/api_op_DescribeEndpoints.go | 8 ++++++-- service/mediaconvert/api_op_ListJobTemplates.go | 8 ++++++-- service/mediaconvert/api_op_ListJobs.go | 8 ++++++-- service/mediaconvert/api_op_ListPresets.go | 8 ++++++-- service/mediaconvert/api_op_ListQueues.go | 8 ++++++-- service/medialive/api_op_DescribeSchedule.go | 8 ++++++-- service/medialive/api_op_ListChannels.go | 8 ++++++-- service/medialive/api_op_ListInputDeviceTransfers.go | 8 ++++++-- service/medialive/api_op_ListInputDevices.go | 8 ++++++-- service/medialive/api_op_ListInputSecurityGroups.go | 8 ++++++-- service/medialive/api_op_ListInputs.go | 8 ++++++-- service/medialive/api_op_ListMultiplexPrograms.go | 8 ++++++-- service/medialive/api_op_ListMultiplexes.go | 8 ++++++-- service/medialive/api_op_ListOfferings.go | 8 ++++++-- service/medialive/api_op_ListReservations.go | 8 ++++++-- service/mediapackage/api_op_ListChannels.go | 8 ++++++-- service/mediapackage/api_op_ListHarvestJobs.go | 8 ++++++-- service/mediapackage/api_op_ListOriginEndpoints.go | 8 ++++++-- service/mediapackagevod/api_op_ListAssets.go | 8 ++++++-- .../mediapackagevod/api_op_ListPackagingConfigurations.go | 8 ++++++-- service/mediapackagevod/api_op_ListPackagingGroups.go | 8 ++++++-- service/mediastore/api_op_ListContainers.go | 8 ++++++-- service/mediastoredata/api_op_ListItems.go | 8 ++++++-- service/mediatailor/api_op_GetChannelSchedule.go | 8 ++++++-- service/mediatailor/api_op_ListAlerts.go | 8 ++++++-- service/mediatailor/api_op_ListChannels.go | 8 ++++++-- service/mediatailor/api_op_ListPlaybackConfigurations.go | 8 ++++++-- service/mediatailor/api_op_ListPrefetchSchedules.go | 8 ++++++-- service/mediatailor/api_op_ListSourceLocations.go | 8 ++++++-- service/mediatailor/api_op_ListVodSources.go | 8 ++++++-- service/mgn/api_op_DescribeJobLogItems.go | 8 ++++++-- service/mgn/api_op_DescribeJobs.go | 8 ++++++-- .../api_op_DescribeReplicationConfigurationTemplates.go | 8 ++++++-- service/mgn/api_op_DescribeSourceServers.go | 8 ++++++-- service/mgn/api_op_DescribeVcenterClients.go | 8 ++++++-- service/migrationhub/api_op_ListApplicationStates.go | 8 ++++++-- service/migrationhub/api_op_ListCreatedArtifacts.go | 8 ++++++-- service/migrationhub/api_op_ListDiscoveredResources.go | 8 ++++++-- service/migrationhub/api_op_ListMigrationTasks.go | 8 ++++++-- service/migrationhub/api_op_ListProgressUpdateStreams.go | 8 ++++++-- .../api_op_DescribeHomeRegionControls.go | 8 ++++++-- .../migrationhubrefactorspaces/api_op_ListApplications.go | 8 ++++++-- .../api_op_ListEnvironmentVpcs.go | 8 ++++++-- .../migrationhubrefactorspaces/api_op_ListEnvironments.go | 8 ++++++-- service/migrationhubrefactorspaces/api_op_ListRoutes.go | 8 ++++++-- service/migrationhubrefactorspaces/api_op_ListServices.go | 8 ++++++-- service/migrationhubstrategy/api_op_GetServerDetails.go | 8 ++++++-- .../api_op_ListApplicationComponents.go | 8 ++++++-- service/migrationhubstrategy/api_op_ListCollectors.go | 8 ++++++-- service/migrationhubstrategy/api_op_ListImportFileTask.go | 8 ++++++-- service/migrationhubstrategy/api_op_ListServers.go | 8 ++++++-- service/mobile/api_op_ListBundles.go | 8 ++++++-- service/mobile/api_op_ListProjects.go | 8 ++++++-- service/mq/api_op_ListBrokers.go | 8 ++++++-- service/mturk/api_op_ListAssignmentsForHIT.go | 8 ++++++-- service/mturk/api_op_ListBonusPayments.go | 8 ++++++-- service/mturk/api_op_ListHITs.go | 8 ++++++-- service/mturk/api_op_ListHITsForQualificationType.go | 8 ++++++-- service/mturk/api_op_ListQualificationRequests.go | 8 ++++++-- service/mturk/api_op_ListQualificationTypes.go | 8 ++++++-- service/mturk/api_op_ListReviewPolicyResultsForHIT.go | 8 ++++++-- service/mturk/api_op_ListReviewableHITs.go | 8 ++++++-- service/mturk/api_op_ListWorkerBlocks.go | 8 ++++++-- service/mturk/api_op_ListWorkersWithQualificationType.go | 8 ++++++-- service/mwaa/api_op_ListEnvironments.go | 8 ++++++-- service/neptune/api_op_DescribeDBClusterEndpoints.go | 8 ++++++-- .../neptune/api_op_DescribeDBClusterParameterGroups.go | 8 ++++++-- service/neptune/api_op_DescribeDBClusterParameters.go | 8 ++++++-- service/neptune/api_op_DescribeDBClusterSnapshots.go | 8 ++++++-- service/neptune/api_op_DescribeDBClusters.go | 8 ++++++-- service/neptune/api_op_DescribeDBEngineVersions.go | 8 ++++++-- service/neptune/api_op_DescribeDBInstances.go | 8 ++++++-- service/neptune/api_op_DescribeDBParameterGroups.go | 8 ++++++-- service/neptune/api_op_DescribeDBParameters.go | 8 ++++++-- service/neptune/api_op_DescribeDBSubnetGroups.go | 8 ++++++-- service/neptune/api_op_DescribeEngineDefaultParameters.go | 8 ++++++-- service/neptune/api_op_DescribeEventSubscriptions.go | 8 ++++++-- service/neptune/api_op_DescribeEvents.go | 8 ++++++-- .../neptune/api_op_DescribeOrderableDBInstanceOptions.go | 8 ++++++-- .../neptune/api_op_DescribePendingMaintenanceActions.go | 8 ++++++-- service/networkfirewall/api_op_ListFirewallPolicies.go | 8 ++++++-- service/networkfirewall/api_op_ListFirewalls.go | 8 ++++++-- service/networkfirewall/api_op_ListRuleGroups.go | 8 ++++++-- service/networkfirewall/api_op_ListTagsForResource.go | 8 ++++++-- service/networkmanager/api_op_DescribeGlobalNetworks.go | 8 ++++++-- .../networkmanager/api_op_GetConnectPeerAssociations.go | 8 ++++++-- service/networkmanager/api_op_GetConnections.go | 8 ++++++-- service/networkmanager/api_op_GetCoreNetworkChangeSet.go | 8 ++++++-- .../api_op_GetCustomerGatewayAssociations.go | 8 ++++++-- service/networkmanager/api_op_GetDevices.go | 8 ++++++-- service/networkmanager/api_op_GetLinkAssociations.go | 8 ++++++-- service/networkmanager/api_op_GetLinks.go | 8 ++++++-- service/networkmanager/api_op_GetNetworkResourceCounts.go | 8 ++++++-- .../api_op_GetNetworkResourceRelationships.go | 8 ++++++-- service/networkmanager/api_op_GetNetworkResources.go | 8 ++++++-- service/networkmanager/api_op_GetNetworkTelemetry.go | 8 ++++++-- service/networkmanager/api_op_GetSites.go | 8 ++++++-- .../api_op_GetTransitGatewayConnectPeerAssociations.go | 8 ++++++-- .../api_op_GetTransitGatewayRegistrations.go | 8 ++++++-- service/networkmanager/api_op_ListAttachments.go | 8 ++++++-- service/networkmanager/api_op_ListConnectPeers.go | 8 ++++++-- .../api_op_ListCoreNetworkPolicyVersions.go | 8 ++++++-- service/networkmanager/api_op_ListCoreNetworks.go | 8 ++++++-- service/nimble/api_op_ListEulaAcceptances.go | 8 ++++++-- service/nimble/api_op_ListEulas.go | 8 ++++++-- service/nimble/api_op_ListLaunchProfileMembers.go | 8 ++++++-- service/nimble/api_op_ListLaunchProfiles.go | 8 ++++++-- service/nimble/api_op_ListStreamingImages.go | 8 ++++++-- service/nimble/api_op_ListStreamingSessions.go | 8 ++++++-- service/nimble/api_op_ListStudioComponents.go | 8 ++++++-- service/nimble/api_op_ListStudioMembers.go | 8 ++++++-- service/nimble/api_op_ListStudios.go | 8 ++++++-- service/opensearch/api_op_DescribeDomainAutoTunes.go | 8 ++++++-- service/opensearch/api_op_DescribeInboundConnections.go | 8 ++++++-- service/opensearch/api_op_DescribeOutboundConnections.go | 8 ++++++-- service/opensearch/api_op_DescribePackages.go | 8 ++++++-- .../api_op_DescribeReservedInstanceOfferings.go | 8 ++++++-- service/opensearch/api_op_DescribeReservedInstances.go | 8 ++++++-- service/opensearch/api_op_GetPackageVersionHistory.go | 8 ++++++-- service/opensearch/api_op_GetUpgradeHistory.go | 8 ++++++-- service/opensearch/api_op_ListDomainsForPackage.go | 8 ++++++-- service/opensearch/api_op_ListInstanceTypeDetails.go | 8 ++++++-- service/opensearch/api_op_ListPackagesForDomain.go | 8 ++++++-- service/opensearch/api_op_ListVersions.go | 8 ++++++-- service/opsworks/api_op_DescribeEcsClusters.go | 8 ++++++-- service/opsworkscm/api_op_DescribeBackups.go | 8 ++++++-- service/opsworkscm/api_op_DescribeEvents.go | 8 ++++++-- service/opsworkscm/api_op_DescribeServers.go | 8 ++++++-- service/opsworkscm/api_op_ListTagsForResource.go | 8 ++++++-- .../api_op_ListAWSServiceAccessForOrganization.go | 8 ++++++-- service/organizations/api_op_ListAccounts.go | 8 ++++++-- service/organizations/api_op_ListAccountsForParent.go | 8 ++++++-- service/organizations/api_op_ListChildren.go | 8 ++++++-- service/organizations/api_op_ListCreateAccountStatus.go | 8 ++++++-- .../organizations/api_op_ListDelegatedAdministrators.go | 8 ++++++-- .../api_op_ListDelegatedServicesForAccount.go | 8 ++++++-- service/organizations/api_op_ListHandshakesForAccount.go | 8 ++++++-- .../organizations/api_op_ListHandshakesForOrganization.go | 8 ++++++-- .../api_op_ListOrganizationalUnitsForParent.go | 8 ++++++-- service/organizations/api_op_ListParents.go | 8 ++++++-- service/organizations/api_op_ListPolicies.go | 8 ++++++-- service/organizations/api_op_ListPoliciesForTarget.go | 8 ++++++-- service/organizations/api_op_ListRoots.go | 8 ++++++-- service/organizations/api_op_ListTagsForResource.go | 8 ++++++-- service/organizations/api_op_ListTargetsForPolicy.go | 8 ++++++-- service/outposts/api_op_ListCatalogItems.go | 8 ++++++-- service/outposts/api_op_ListOrders.go | 8 ++++++-- service/outposts/api_op_ListOutposts.go | 8 ++++++-- service/outposts/api_op_ListSites.go | 8 ++++++-- .../api_op_ListApplicationInstanceDependencies.go | 8 ++++++-- .../api_op_ListApplicationInstanceNodeInstances.go | 8 ++++++-- service/panorama/api_op_ListApplicationInstances.go | 8 ++++++-- service/panorama/api_op_ListDevices.go | 8 ++++++-- service/panorama/api_op_ListDevicesJobs.go | 8 ++++++-- service/panorama/api_op_ListNodeFromTemplateJobs.go | 8 ++++++-- service/panorama/api_op_ListNodes.go | 8 ++++++-- service/panorama/api_op_ListPackageImportJobs.go | 8 ++++++-- service/panorama/api_op_ListPackages.go | 8 ++++++-- service/personalize/api_op_ListBatchInferenceJobs.go | 8 ++++++-- service/personalize/api_op_ListBatchSegmentJobs.go | 8 ++++++-- service/personalize/api_op_ListCampaigns.go | 8 ++++++-- service/personalize/api_op_ListDatasetExportJobs.go | 8 ++++++-- service/personalize/api_op_ListDatasetGroups.go | 8 ++++++-- service/personalize/api_op_ListDatasetImportJobs.go | 8 ++++++-- service/personalize/api_op_ListDatasets.go | 8 ++++++-- service/personalize/api_op_ListEventTrackers.go | 8 ++++++-- service/personalize/api_op_ListFilters.go | 8 ++++++-- service/personalize/api_op_ListRecipes.go | 8 ++++++-- service/personalize/api_op_ListRecommenders.go | 8 ++++++-- service/personalize/api_op_ListSchemas.go | 8 ++++++-- service/personalize/api_op_ListSolutionVersions.go | 8 ++++++-- service/personalize/api_op_ListSolutions.go | 8 ++++++-- service/pinpointemail/api_op_GetDedicatedIps.go | 8 ++++++-- service/pinpointemail/api_op_ListConfigurationSets.go | 8 ++++++-- service/pinpointemail/api_op_ListDedicatedIpPools.go | 8 ++++++-- .../pinpointemail/api_op_ListDeliverabilityTestReports.go | 8 ++++++-- .../api_op_ListDomainDeliverabilityCampaigns.go | 8 ++++++-- service/pinpointemail/api_op_ListEmailIdentities.go | 8 ++++++-- service/polly/api_op_ListSpeechSynthesisTasks.go | 8 ++++++-- service/pricing/api_op_DescribeServices.go | 8 ++++++-- service/pricing/api_op_GetAttributeValues.go | 8 ++++++-- service/pricing/api_op_GetProducts.go | 8 ++++++-- .../proton/api_op_ListEnvironmentAccountConnections.go | 8 ++++++-- service/proton/api_op_ListEnvironmentOutputs.go | 8 ++++++-- .../proton/api_op_ListEnvironmentProvisionedResources.go | 8 ++++++-- service/proton/api_op_ListEnvironmentTemplateVersions.go | 8 ++++++-- service/proton/api_op_ListEnvironmentTemplates.go | 8 ++++++-- service/proton/api_op_ListEnvironments.go | 8 ++++++-- service/proton/api_op_ListRepositories.go | 8 ++++++-- service/proton/api_op_ListRepositorySyncDefinitions.go | 8 ++++++-- service/proton/api_op_ListServiceInstanceOutputs.go | 8 ++++++-- .../api_op_ListServiceInstanceProvisionedResources.go | 8 ++++++-- service/proton/api_op_ListServiceInstances.go | 8 ++++++-- service/proton/api_op_ListServicePipelineOutputs.go | 8 ++++++-- .../api_op_ListServicePipelineProvisionedResources.go | 8 ++++++-- service/proton/api_op_ListServiceTemplateVersions.go | 8 ++++++-- service/proton/api_op_ListServiceTemplates.go | 8 ++++++-- service/proton/api_op_ListServices.go | 8 ++++++-- service/proton/api_op_ListTagsForResource.go | 8 ++++++-- service/qldb/api_op_ListJournalKinesisStreamsForLedger.go | 8 ++++++-- service/qldb/api_op_ListJournalS3Exports.go | 8 ++++++-- service/qldb/api_op_ListJournalS3ExportsForLedger.go | 8 ++++++-- service/qldb/api_op_ListLedgers.go | 8 ++++++-- service/quicksight/api_op_ListAnalyses.go | 8 ++++++-- service/quicksight/api_op_ListDashboardVersions.go | 8 ++++++-- service/quicksight/api_op_ListDashboards.go | 8 ++++++-- service/quicksight/api_op_ListDataSets.go | 8 ++++++-- service/quicksight/api_op_ListDataSources.go | 8 ++++++-- service/quicksight/api_op_ListIngestions.go | 8 ++++++-- service/quicksight/api_op_ListNamespaces.go | 8 ++++++-- service/quicksight/api_op_ListTemplateAliases.go | 8 ++++++-- service/quicksight/api_op_ListTemplateVersions.go | 8 ++++++-- service/quicksight/api_op_ListTemplates.go | 8 ++++++-- service/quicksight/api_op_ListThemeVersions.go | 8 ++++++-- service/quicksight/api_op_ListThemes.go | 8 ++++++-- service/quicksight/api_op_SearchAnalyses.go | 8 ++++++-- service/quicksight/api_op_SearchDashboards.go | 8 ++++++-- service/ram/api_op_GetResourcePolicies.go | 8 ++++++-- service/ram/api_op_GetResourceShareAssociations.go | 8 ++++++-- service/ram/api_op_GetResourceShareInvitations.go | 8 ++++++-- service/ram/api_op_GetResourceShares.go | 8 ++++++-- service/ram/api_op_ListPendingInvitationResources.go | 8 ++++++-- service/ram/api_op_ListPermissions.go | 8 ++++++-- service/ram/api_op_ListPrincipals.go | 8 ++++++-- service/ram/api_op_ListResourceSharePermissions.go | 8 ++++++-- service/ram/api_op_ListResourceTypes.go | 8 ++++++-- service/ram/api_op_ListResources.go | 8 ++++++-- service/rbin/api_op_ListRules.go | 8 ++++++-- service/rds/api_op_DescribeCertificates.go | 8 ++++++-- service/rds/api_op_DescribeCustomAvailabilityZones.go | 8 ++++++-- service/rds/api_op_DescribeDBClusterBacktracks.go | 8 ++++++-- service/rds/api_op_DescribeDBClusterEndpoints.go | 8 ++++++-- service/rds/api_op_DescribeDBClusterParameterGroups.go | 8 ++++++-- service/rds/api_op_DescribeDBClusterParameters.go | 8 ++++++-- service/rds/api_op_DescribeDBClusterSnapshots.go | 8 ++++++-- service/rds/api_op_DescribeDBClusters.go | 8 ++++++-- service/rds/api_op_DescribeDBEngineVersions.go | 8 ++++++-- service/rds/api_op_DescribeDBInstanceAutomatedBackups.go | 8 ++++++-- service/rds/api_op_DescribeDBInstances.go | 8 ++++++-- service/rds/api_op_DescribeDBLogFiles.go | 8 ++++++-- service/rds/api_op_DescribeDBParameterGroups.go | 8 ++++++-- service/rds/api_op_DescribeDBParameters.go | 8 ++++++-- service/rds/api_op_DescribeDBProxies.go | 8 ++++++-- service/rds/api_op_DescribeDBProxyEndpoints.go | 8 ++++++-- service/rds/api_op_DescribeDBProxyTargetGroups.go | 8 ++++++-- service/rds/api_op_DescribeDBProxyTargets.go | 8 ++++++-- service/rds/api_op_DescribeDBSecurityGroups.go | 8 ++++++-- service/rds/api_op_DescribeDBSnapshots.go | 8 ++++++-- service/rds/api_op_DescribeDBSubnetGroups.go | 8 ++++++-- service/rds/api_op_DescribeEngineDefaultParameters.go | 8 ++++++-- service/rds/api_op_DescribeEventSubscriptions.go | 8 ++++++-- service/rds/api_op_DescribeEvents.go | 8 ++++++-- service/rds/api_op_DescribeExportTasks.go | 8 ++++++-- service/rds/api_op_DescribeGlobalClusters.go | 8 ++++++-- service/rds/api_op_DescribeInstallationMedia.go | 8 ++++++-- service/rds/api_op_DescribeOptionGroupOptions.go | 8 ++++++-- service/rds/api_op_DescribeOptionGroups.go | 8 ++++++-- service/rds/api_op_DescribeOrderableDBInstanceOptions.go | 8 ++++++-- service/rds/api_op_DescribePendingMaintenanceActions.go | 8 ++++++-- service/rds/api_op_DescribeReservedDBInstances.go | 8 ++++++-- .../rds/api_op_DescribeReservedDBInstancesOfferings.go | 8 ++++++-- service/rds/api_op_DescribeSourceRegions.go | 8 ++++++-- service/rds/api_op_DownloadDBLogFilePortion.go | 8 ++++++-- service/redshift/api_op_DescribeClusterDbRevisions.go | 8 ++++++-- service/redshift/api_op_DescribeClusterParameterGroups.go | 8 ++++++-- service/redshift/api_op_DescribeClusterParameters.go | 8 ++++++-- service/redshift/api_op_DescribeClusterSecurityGroups.go | 8 ++++++-- service/redshift/api_op_DescribeClusterSnapshots.go | 8 ++++++-- service/redshift/api_op_DescribeClusterSubnetGroups.go | 8 ++++++-- service/redshift/api_op_DescribeClusterTracks.go | 8 ++++++-- service/redshift/api_op_DescribeClusterVersions.go | 8 ++++++-- service/redshift/api_op_DescribeClusters.go | 8 ++++++-- service/redshift/api_op_DescribeDataShares.go | 8 ++++++-- service/redshift/api_op_DescribeDataSharesForConsumer.go | 8 ++++++-- service/redshift/api_op_DescribeDataSharesForProducer.go | 8 ++++++-- .../redshift/api_op_DescribeDefaultClusterParameters.go | 8 ++++++-- service/redshift/api_op_DescribeEndpointAccess.go | 8 ++++++-- service/redshift/api_op_DescribeEndpointAuthorization.go | 8 ++++++-- service/redshift/api_op_DescribeEventSubscriptions.go | 8 ++++++-- service/redshift/api_op_DescribeEvents.go | 8 ++++++-- service/redshift/api_op_DescribeHsmClientCertificates.go | 8 ++++++-- service/redshift/api_op_DescribeHsmConfigurations.go | 8 ++++++-- .../redshift/api_op_DescribeNodeConfigurationOptions.go | 8 ++++++-- .../redshift/api_op_DescribeOrderableClusterOptions.go | 8 ++++++-- .../redshift/api_op_DescribeReservedNodeExchangeStatus.go | 8 ++++++-- service/redshift/api_op_DescribeReservedNodeOfferings.go | 8 ++++++-- service/redshift/api_op_DescribeReservedNodes.go | 8 ++++++-- service/redshift/api_op_DescribeScheduledActions.go | 8 ++++++-- service/redshift/api_op_DescribeSnapshotCopyGrants.go | 8 ++++++-- service/redshift/api_op_DescribeSnapshotSchedules.go | 8 ++++++-- service/redshift/api_op_DescribeTableRestoreStatus.go | 8 ++++++-- service/redshift/api_op_DescribeTags.go | 8 ++++++-- service/redshift/api_op_DescribeUsageLimits.go | 8 ++++++-- .../api_op_GetReservedNodeExchangeConfigurationOptions.go | 8 ++++++-- .../redshift/api_op_GetReservedNodeExchangeOfferings.go | 8 ++++++-- service/redshiftdata/api_op_DescribeTable.go | 8 ++++++-- service/redshiftdata/api_op_GetStatementResult.go | 8 ++++++-- service/redshiftdata/api_op_ListDatabases.go | 8 ++++++-- service/redshiftdata/api_op_ListSchemas.go | 8 ++++++-- service/redshiftdata/api_op_ListStatements.go | 8 ++++++-- service/redshiftdata/api_op_ListTables.go | 8 ++++++-- service/rekognition/api_op_DescribeProjectVersions.go | 8 ++++++-- service/rekognition/api_op_DescribeProjects.go | 8 ++++++-- service/rekognition/api_op_GetCelebrityRecognition.go | 8 ++++++-- service/rekognition/api_op_GetContentModeration.go | 8 ++++++-- service/rekognition/api_op_GetFaceDetection.go | 8 ++++++-- service/rekognition/api_op_GetFaceSearch.go | 8 ++++++-- service/rekognition/api_op_GetLabelDetection.go | 8 ++++++-- service/rekognition/api_op_GetPersonTracking.go | 8 ++++++-- service/rekognition/api_op_GetSegmentDetection.go | 8 ++++++-- service/rekognition/api_op_GetTextDetection.go | 8 ++++++-- service/rekognition/api_op_ListCollections.go | 8 ++++++-- service/rekognition/api_op_ListDatasetEntries.go | 8 ++++++-- service/rekognition/api_op_ListDatasetLabels.go | 8 ++++++-- service/rekognition/api_op_ListFaces.go | 8 ++++++-- service/rekognition/api_op_ListStreamProcessors.go | 8 ++++++-- service/resiliencehub/api_op_ListAlarmRecommendations.go | 8 ++++++-- service/resiliencehub/api_op_ListAppAssessments.go | 8 ++++++-- .../resiliencehub/api_op_ListAppComponentCompliances.go | 8 ++++++-- .../api_op_ListAppComponentRecommendations.go | 8 ++++++-- .../api_op_ListAppVersionResourceMappings.go | 8 ++++++-- service/resiliencehub/api_op_ListAppVersionResources.go | 8 ++++++-- service/resiliencehub/api_op_ListAppVersions.go | 8 ++++++-- service/resiliencehub/api_op_ListApps.go | 8 ++++++-- .../resiliencehub/api_op_ListRecommendationTemplates.go | 8 ++++++-- service/resiliencehub/api_op_ListResiliencyPolicies.go | 8 ++++++-- service/resiliencehub/api_op_ListSopRecommendations.go | 8 ++++++-- .../api_op_ListSuggestedResiliencyPolicies.go | 8 ++++++-- service/resiliencehub/api_op_ListTestRecommendations.go | 8 ++++++-- .../api_op_ListUnsupportedAppVersionResources.go | 8 ++++++-- service/resourcegroups/api_op_ListGroupResources.go | 8 ++++++-- service/resourcegroups/api_op_ListGroups.go | 8 ++++++-- service/resourcegroups/api_op_SearchResources.go | 8 ++++++-- .../api_op_GetComplianceSummary.go | 8 ++++++-- service/resourcegroupstaggingapi/api_op_GetResources.go | 8 ++++++-- service/resourcegroupstaggingapi/api_op_GetTagKeys.go | 8 ++++++-- service/resourcegroupstaggingapi/api_op_GetTagValues.go | 8 ++++++-- service/robomaker/api_op_ListDeploymentJobs.go | 8 ++++++-- service/robomaker/api_op_ListFleets.go | 8 ++++++-- service/robomaker/api_op_ListRobotApplications.go | 8 ++++++-- service/robomaker/api_op_ListRobots.go | 8 ++++++-- service/robomaker/api_op_ListSimulationApplications.go | 8 ++++++-- service/robomaker/api_op_ListSimulationJobBatches.go | 8 ++++++-- service/robomaker/api_op_ListSimulationJobs.go | 8 ++++++-- service/robomaker/api_op_ListWorldExportJobs.go | 8 ++++++-- service/robomaker/api_op_ListWorldGenerationJobs.go | 8 ++++++-- service/robomaker/api_op_ListWorldTemplates.go | 8 ++++++-- service/robomaker/api_op_ListWorlds.go | 8 ++++++-- service/route53/api_op_ListHealthChecks.go | 8 ++++++-- service/route53/api_op_ListHostedZones.go | 8 ++++++-- service/route53/api_op_ListQueryLoggingConfigs.go | 8 ++++++-- service/route53domains/api_op_ListDomains.go | 8 ++++++-- service/route53domains/api_op_ListOperations.go | 8 ++++++-- .../api_op_ListAssociatedRoute53HealthChecks.go | 8 ++++++-- .../route53recoverycontrolconfig/api_op_ListClusters.go | 8 ++++++-- .../api_op_ListControlPanels.go | 8 ++++++-- .../api_op_ListRoutingControls.go | 8 ++++++-- .../api_op_ListSafetyRules.go | 8 ++++++-- .../api_op_GetCellReadinessSummary.go | 8 ++++++-- .../api_op_GetReadinessCheckResourceStatus.go | 8 ++++++-- .../api_op_GetReadinessCheckStatus.go | 8 ++++++-- .../api_op_GetRecoveryGroupReadinessSummary.go | 8 ++++++-- service/route53recoveryreadiness/api_op_ListCells.go | 8 ++++++-- .../api_op_ListCrossAccountAuthorizations.go | 8 ++++++-- .../api_op_ListReadinessChecks.go | 8 ++++++-- .../route53recoveryreadiness/api_op_ListRecoveryGroups.go | 8 ++++++-- .../route53recoveryreadiness/api_op_ListResourceSets.go | 8 ++++++-- service/route53recoveryreadiness/api_op_ListRules.go | 8 ++++++-- service/route53resolver/api_op_ListFirewallConfigs.go | 8 ++++++-- service/route53resolver/api_op_ListFirewallDomainLists.go | 8 ++++++-- service/route53resolver/api_op_ListFirewallDomains.go | 8 ++++++-- .../api_op_ListFirewallRuleGroupAssociations.go | 8 ++++++-- service/route53resolver/api_op_ListFirewallRuleGroups.go | 8 ++++++-- service/route53resolver/api_op_ListFirewallRules.go | 8 ++++++-- service/route53resolver/api_op_ListResolverConfigs.go | 8 ++++++-- .../route53resolver/api_op_ListResolverDnssecConfigs.go | 8 ++++++-- .../api_op_ListResolverEndpointIpAddresses.go | 8 ++++++-- service/route53resolver/api_op_ListResolverEndpoints.go | 8 ++++++-- .../api_op_ListResolverQueryLogConfigAssociations.go | 8 ++++++-- .../route53resolver/api_op_ListResolverQueryLogConfigs.go | 8 ++++++-- .../api_op_ListResolverRuleAssociations.go | 8 ++++++-- service/route53resolver/api_op_ListResolverRules.go | 8 ++++++-- service/route53resolver/api_op_ListTagsForResource.go | 8 ++++++-- service/rum/api_op_GetAppMonitorData.go | 8 ++++++-- service/rum/api_op_ListAppMonitors.go | 8 ++++++-- service/s3/api_op_ListObjectsV2.go | 8 ++++++-- service/s3/api_op_ListParts.go | 8 ++++++-- service/s3control/api_op_ListAccessPoints.go | 8 ++++++-- .../s3control/api_op_ListAccessPointsForObjectLambda.go | 8 ++++++-- service/s3control/api_op_ListJobs.go | 8 ++++++-- service/s3control/api_op_ListMultiRegionAccessPoints.go | 8 ++++++-- service/s3control/api_op_ListRegionalBuckets.go | 8 ++++++-- service/s3control/api_op_ListStorageLensConfigurations.go | 8 ++++++-- service/s3outposts/api_op_ListEndpoints.go | 8 ++++++-- service/sagemaker/api_op_ListActions.go | 8 ++++++-- service/sagemaker/api_op_ListAlgorithms.go | 8 ++++++-- service/sagemaker/api_op_ListAppImageConfigs.go | 8 ++++++-- service/sagemaker/api_op_ListApps.go | 8 ++++++-- service/sagemaker/api_op_ListArtifacts.go | 8 ++++++-- service/sagemaker/api_op_ListAssociations.go | 8 ++++++-- service/sagemaker/api_op_ListAutoMLJobs.go | 8 ++++++-- service/sagemaker/api_op_ListCandidatesForAutoMLJob.go | 8 ++++++-- service/sagemaker/api_op_ListCodeRepositories.go | 8 ++++++-- service/sagemaker/api_op_ListCompilationJobs.go | 8 ++++++-- service/sagemaker/api_op_ListContexts.go | 8 ++++++-- service/sagemaker/api_op_ListDataQualityJobDefinitions.go | 8 ++++++-- service/sagemaker/api_op_ListDeviceFleets.go | 8 ++++++-- service/sagemaker/api_op_ListDevices.go | 8 ++++++-- service/sagemaker/api_op_ListDomains.go | 8 ++++++-- service/sagemaker/api_op_ListEdgePackagingJobs.go | 8 ++++++-- service/sagemaker/api_op_ListEndpointConfigs.go | 8 ++++++-- service/sagemaker/api_op_ListEndpoints.go | 8 ++++++-- service/sagemaker/api_op_ListExperiments.go | 8 ++++++-- service/sagemaker/api_op_ListFlowDefinitions.go | 8 ++++++-- service/sagemaker/api_op_ListHumanTaskUis.go | 8 ++++++-- service/sagemaker/api_op_ListHyperParameterTuningJobs.go | 8 ++++++-- service/sagemaker/api_op_ListImageVersions.go | 8 ++++++-- service/sagemaker/api_op_ListImages.go | 8 ++++++-- .../sagemaker/api_op_ListInferenceRecommendationsJobs.go | 8 ++++++-- service/sagemaker/api_op_ListLabelingJobs.go | 8 ++++++-- service/sagemaker/api_op_ListLabelingJobsForWorkteam.go | 8 ++++++-- service/sagemaker/api_op_ListLineageGroups.go | 8 ++++++-- service/sagemaker/api_op_ListModelBiasJobDefinitions.go | 8 ++++++-- .../api_op_ListModelExplainabilityJobDefinitions.go | 8 ++++++-- service/sagemaker/api_op_ListModelMetadata.go | 8 ++++++-- service/sagemaker/api_op_ListModelPackageGroups.go | 8 ++++++-- service/sagemaker/api_op_ListModelPackages.go | 8 ++++++-- .../sagemaker/api_op_ListModelQualityJobDefinitions.go | 8 ++++++-- service/sagemaker/api_op_ListModels.go | 8 ++++++-- service/sagemaker/api_op_ListMonitoringExecutions.go | 8 ++++++-- service/sagemaker/api_op_ListMonitoringSchedules.go | 8 ++++++-- .../api_op_ListNotebookInstanceLifecycleConfigs.go | 8 ++++++-- service/sagemaker/api_op_ListNotebookInstances.go | 8 ++++++-- service/sagemaker/api_op_ListPipelineExecutionSteps.go | 8 ++++++-- service/sagemaker/api_op_ListPipelineExecutions.go | 8 ++++++-- .../api_op_ListPipelineParametersForExecution.go | 8 ++++++-- service/sagemaker/api_op_ListPipelines.go | 8 ++++++-- service/sagemaker/api_op_ListProcessingJobs.go | 8 ++++++-- service/sagemaker/api_op_ListProjects.go | 8 ++++++-- service/sagemaker/api_op_ListStudioLifecycleConfigs.go | 8 ++++++-- service/sagemaker/api_op_ListSubscribedWorkteams.go | 8 ++++++-- service/sagemaker/api_op_ListTags.go | 8 ++++++-- service/sagemaker/api_op_ListTrainingJobs.go | 8 ++++++-- .../api_op_ListTrainingJobsForHyperParameterTuningJob.go | 8 ++++++-- service/sagemaker/api_op_ListTransformJobs.go | 8 ++++++-- service/sagemaker/api_op_ListTrialComponents.go | 8 ++++++-- service/sagemaker/api_op_ListTrials.go | 8 ++++++-- service/sagemaker/api_op_ListUserProfiles.go | 8 ++++++-- service/sagemaker/api_op_ListWorkforces.go | 8 ++++++-- service/sagemaker/api_op_ListWorkteams.go | 8 ++++++-- service/sagemaker/api_op_QueryLineage.go | 8 ++++++-- service/sagemaker/api_op_Search.go | 8 ++++++-- service/sagemakera2iruntime/api_op_ListHumanLoops.go | 8 ++++++-- service/schemas/api_op_ListDiscoverers.go | 8 ++++++-- service/schemas/api_op_ListRegistries.go | 8 ++++++-- service/schemas/api_op_ListSchemaVersions.go | 8 ++++++-- service/schemas/api_op_ListSchemas.go | 8 ++++++-- service/schemas/api_op_SearchSchemas.go | 8 ++++++-- service/secretsmanager/api_op_ListSecretVersionIds.go | 8 ++++++-- service/secretsmanager/api_op_ListSecrets.go | 8 ++++++-- service/securityhub/api_op_DescribeActionTargets.go | 8 ++++++-- service/securityhub/api_op_DescribeProducts.go | 8 ++++++-- service/securityhub/api_op_DescribeStandards.go | 8 ++++++-- service/securityhub/api_op_DescribeStandardsControls.go | 8 ++++++-- service/securityhub/api_op_GetEnabledStandards.go | 8 ++++++-- service/securityhub/api_op_GetFindings.go | 8 ++++++-- service/securityhub/api_op_GetInsights.go | 8 ++++++-- .../securityhub/api_op_ListEnabledProductsForImport.go | 8 ++++++-- service/securityhub/api_op_ListFindingAggregators.go | 8 ++++++-- service/securityhub/api_op_ListInvitations.go | 8 ++++++-- service/securityhub/api_op_ListMembers.go | 8 ++++++-- .../securityhub/api_op_ListOrganizationAdminAccounts.go | 8 ++++++-- .../api_op_ListApplicationDependencies.go | 8 ++++++-- .../api_op_ListApplicationVersions.go | 8 ++++++-- .../api_op_ListApplications.go | 8 ++++++-- service/servicecatalog/api_op_DescribePortfolioShares.go | 8 ++++++-- .../servicecatalog/api_op_GetProvisionedProductOutputs.go | 8 ++++++-- .../servicecatalog/api_op_ListAcceptedPortfolioShares.go | 8 ++++++-- service/servicecatalog/api_op_ListBudgetsForResource.go | 8 ++++++-- .../servicecatalog/api_op_ListConstraintsForPortfolio.go | 8 ++++++-- service/servicecatalog/api_op_ListLaunchPaths.go | 8 ++++++-- .../api_op_ListOrganizationPortfolioAccess.go | 8 ++++++-- service/servicecatalog/api_op_ListPortfolioAccess.go | 8 ++++++-- service/servicecatalog/api_op_ListPortfolios.go | 8 ++++++-- service/servicecatalog/api_op_ListPortfoliosForProduct.go | 8 ++++++-- .../servicecatalog/api_op_ListPrincipalsForPortfolio.go | 8 ++++++-- .../api_op_ListProvisioningArtifactsForServiceAction.go | 8 ++++++-- .../servicecatalog/api_op_ListResourcesForTagOption.go | 8 ++++++-- service/servicecatalog/api_op_ListServiceActions.go | 8 ++++++-- .../api_op_ListServiceActionsForProvisioningArtifact.go | 8 ++++++-- service/servicecatalog/api_op_ListTagOptions.go | 8 ++++++-- service/servicecatalog/api_op_SearchProducts.go | 8 ++++++-- service/servicecatalog/api_op_SearchProductsAsAdmin.go | 8 ++++++-- .../servicecatalog/api_op_SearchProvisionedProducts.go | 8 ++++++-- .../servicecatalogappregistry/api_op_ListApplications.go | 8 ++++++-- .../api_op_ListAssociatedAttributeGroups.go | 8 ++++++-- .../api_op_ListAssociatedResources.go | 8 ++++++-- .../api_op_ListAttributeGroups.go | 8 ++++++-- .../servicediscovery/api_op_GetInstancesHealthStatus.go | 8 ++++++-- service/servicediscovery/api_op_ListInstances.go | 8 ++++++-- service/servicediscovery/api_op_ListNamespaces.go | 8 ++++++-- service/servicediscovery/api_op_ListOperations.go | 8 ++++++-- service/servicediscovery/api_op_ListServices.go | 8 ++++++-- .../servicequotas/api_op_ListAWSDefaultServiceQuotas.go | 8 ++++++-- .../api_op_ListRequestedServiceQuotaChangeHistory.go | 8 ++++++-- ...pi_op_ListRequestedServiceQuotaChangeHistoryByQuota.go | 8 ++++++-- .../api_op_ListServiceQuotaIncreaseRequestsInTemplate.go | 8 ++++++-- service/servicequotas/api_op_ListServiceQuotas.go | 8 ++++++-- service/servicequotas/api_op_ListServices.go | 8 ++++++-- .../ses/api_op_ListCustomVerificationEmailTemplates.go | 8 ++++++-- service/ses/api_op_ListIdentities.go | 8 ++++++-- service/sesv2/api_op_GetDedicatedIps.go | 8 ++++++-- service/sesv2/api_op_ListConfigurationSets.go | 8 ++++++-- service/sesv2/api_op_ListContactLists.go | 8 ++++++-- service/sesv2/api_op_ListContacts.go | 8 ++++++-- .../sesv2/api_op_ListCustomVerificationEmailTemplates.go | 8 ++++++-- service/sesv2/api_op_ListDedicatedIpPools.go | 8 ++++++-- service/sesv2/api_op_ListDeliverabilityTestReports.go | 8 ++++++-- service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go | 8 ++++++-- service/sesv2/api_op_ListEmailIdentities.go | 8 ++++++-- service/sesv2/api_op_ListEmailTemplates.go | 8 ++++++-- service/sesv2/api_op_ListImportJobs.go | 8 ++++++-- service/sesv2/api_op_ListSuppressedDestinations.go | 8 ++++++-- service/sfn/api_op_GetExecutionHistory.go | 8 ++++++-- service/sfn/api_op_ListActivities.go | 8 ++++++-- service/sfn/api_op_ListExecutions.go | 8 ++++++-- service/sfn/api_op_ListStateMachines.go | 8 ++++++-- service/shield/api_op_ListAttacks.go | 8 ++++++-- service/shield/api_op_ListProtectionGroups.go | 8 ++++++-- service/shield/api_op_ListProtections.go | 8 ++++++-- service/shield/api_op_ListResourcesInProtectionGroup.go | 8 ++++++-- service/signer/api_op_ListSigningJobs.go | 8 ++++++-- service/signer/api_op_ListSigningPlatforms.go | 8 ++++++-- service/signer/api_op_ListSigningProfiles.go | 8 ++++++-- service/sms/api_op_GetConnectors.go | 8 ++++++-- service/sms/api_op_GetReplicationJobs.go | 8 ++++++-- service/sms/api_op_GetReplicationRuns.go | 8 ++++++-- service/sms/api_op_GetServers.go | 8 ++++++-- service/snowball/api_op_DescribeAddresses.go | 8 ++++++-- service/snowball/api_op_ListJobs.go | 8 ++++++-- .../snowdevicemanagement/api_op_ListDeviceResources.go | 8 ++++++-- service/snowdevicemanagement/api_op_ListDevices.go | 8 ++++++-- service/snowdevicemanagement/api_op_ListExecutions.go | 8 ++++++-- service/snowdevicemanagement/api_op_ListTasks.go | 8 ++++++-- service/sns/api_op_ListEndpointsByPlatformApplication.go | 8 ++++++-- service/sns/api_op_ListOriginationNumbers.go | 8 ++++++-- service/sns/api_op_ListPhoneNumbersOptedOut.go | 8 ++++++-- service/sns/api_op_ListPlatformApplications.go | 8 ++++++-- service/sns/api_op_ListSMSSandboxPhoneNumbers.go | 8 ++++++-- service/sns/api_op_ListSubscriptions.go | 8 ++++++-- service/sns/api_op_ListSubscriptionsByTopic.go | 8 ++++++-- service/sns/api_op_ListTopics.go | 8 ++++++-- service/sqs/api_op_ListDeadLetterSourceQueues.go | 8 ++++++-- service/sqs/api_op_ListQueues.go | 8 ++++++-- service/ssm/api_op_DescribeActivations.go | 8 ++++++-- service/ssm/api_op_DescribeAssociationExecutionTargets.go | 8 ++++++-- service/ssm/api_op_DescribeAssociationExecutions.go | 8 ++++++-- service/ssm/api_op_DescribeAutomationExecutions.go | 8 ++++++-- service/ssm/api_op_DescribeAutomationStepExecutions.go | 8 ++++++-- service/ssm/api_op_DescribeAvailablePatches.go | 8 ++++++-- .../ssm/api_op_DescribeEffectiveInstanceAssociations.go | 8 ++++++-- .../api_op_DescribeEffectivePatchesForPatchBaseline.go | 8 ++++++-- service/ssm/api_op_DescribeInstanceAssociationsStatus.go | 8 ++++++-- service/ssm/api_op_DescribeInstanceInformation.go | 8 ++++++-- service/ssm/api_op_DescribeInstancePatchStates.go | 8 ++++++-- .../api_op_DescribeInstancePatchStatesForPatchGroup.go | 8 ++++++-- service/ssm/api_op_DescribeInstancePatches.go | 8 ++++++-- service/ssm/api_op_DescribeInventoryDeletions.go | 8 ++++++-- ...p_DescribeMaintenanceWindowExecutionTaskInvocations.go | 8 ++++++-- .../ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go | 8 ++++++-- service/ssm/api_op_DescribeMaintenanceWindowExecutions.go | 8 ++++++-- service/ssm/api_op_DescribeMaintenanceWindowSchedule.go | 8 ++++++-- service/ssm/api_op_DescribeMaintenanceWindowTargets.go | 8 ++++++-- service/ssm/api_op_DescribeMaintenanceWindowTasks.go | 8 ++++++-- service/ssm/api_op_DescribeMaintenanceWindows.go | 8 ++++++-- service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go | 8 ++++++-- service/ssm/api_op_DescribeOpsItems.go | 8 ++++++-- service/ssm/api_op_DescribeParameters.go | 8 ++++++-- service/ssm/api_op_DescribePatchBaselines.go | 8 ++++++-- service/ssm/api_op_DescribePatchGroups.go | 8 ++++++-- service/ssm/api_op_DescribePatchProperties.go | 8 ++++++-- service/ssm/api_op_DescribeSessions.go | 8 ++++++-- service/ssm/api_op_GetInventory.go | 8 ++++++-- service/ssm/api_op_GetInventorySchema.go | 8 ++++++-- service/ssm/api_op_GetOpsSummary.go | 8 ++++++-- service/ssm/api_op_GetParameterHistory.go | 8 ++++++-- service/ssm/api_op_GetParametersByPath.go | 8 ++++++-- service/ssm/api_op_ListAssociationVersions.go | 8 ++++++-- service/ssm/api_op_ListAssociations.go | 8 ++++++-- service/ssm/api_op_ListCommandInvocations.go | 8 ++++++-- service/ssm/api_op_ListCommands.go | 8 ++++++-- service/ssm/api_op_ListComplianceItems.go | 8 ++++++-- service/ssm/api_op_ListComplianceSummaries.go | 8 ++++++-- service/ssm/api_op_ListDocumentVersions.go | 8 ++++++-- service/ssm/api_op_ListDocuments.go | 8 ++++++-- service/ssm/api_op_ListOpsItemEvents.go | 8 ++++++-- service/ssm/api_op_ListOpsItemRelatedItems.go | 8 ++++++-- service/ssm/api_op_ListOpsMetadata.go | 8 ++++++-- service/ssm/api_op_ListResourceComplianceSummaries.go | 8 ++++++-- service/ssm/api_op_ListResourceDataSync.go | 8 ++++++-- service/ssmcontacts/api_op_ListContactChannels.go | 8 ++++++-- service/ssmcontacts/api_op_ListContacts.go | 8 ++++++-- service/ssmcontacts/api_op_ListEngagements.go | 8 ++++++-- service/ssmcontacts/api_op_ListPageReceipts.go | 8 ++++++-- service/ssmcontacts/api_op_ListPagesByContact.go | 8 ++++++-- service/ssmcontacts/api_op_ListPagesByEngagement.go | 8 ++++++-- service/ssmincidents/api_op_GetResourcePolicies.go | 8 ++++++-- service/ssmincidents/api_op_ListIncidentRecords.go | 8 ++++++-- service/ssmincidents/api_op_ListRelatedItems.go | 8 ++++++-- service/ssmincidents/api_op_ListReplicationSets.go | 8 ++++++-- service/ssmincidents/api_op_ListResponsePlans.go | 8 ++++++-- service/ssmincidents/api_op_ListTimelineEvents.go | 8 ++++++-- service/sso/api_op_ListAccountRoles.go | 8 ++++++-- service/sso/api_op_ListAccounts.go | 8 ++++++-- .../api_op_ListAccountAssignmentCreationStatus.go | 8 ++++++-- .../api_op_ListAccountAssignmentDeletionStatus.go | 8 ++++++-- service/ssoadmin/api_op_ListAccountAssignments.go | 8 ++++++-- .../api_op_ListAccountsForProvisionedPermissionSet.go | 8 ++++++-- service/ssoadmin/api_op_ListInstances.go | 8 ++++++-- .../ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go | 8 ++++++-- .../api_op_ListPermissionSetProvisioningStatus.go | 8 ++++++-- service/ssoadmin/api_op_ListPermissionSets.go | 8 ++++++-- .../api_op_ListPermissionSetsProvisionedToAccount.go | 8 ++++++-- service/ssoadmin/api_op_ListTagsForResource.go | 8 ++++++-- service/storagegateway/api_op_DescribeTapeArchives.go | 8 ++++++-- .../storagegateway/api_op_DescribeTapeRecoveryPoints.go | 8 ++++++-- service/storagegateway/api_op_DescribeTapes.go | 8 ++++++-- service/storagegateway/api_op_DescribeVTLDevices.go | 8 ++++++-- service/storagegateway/api_op_ListFileShares.go | 8 ++++++-- .../storagegateway/api_op_ListFileSystemAssociations.go | 8 ++++++-- service/storagegateway/api_op_ListGateways.go | 8 ++++++-- service/storagegateway/api_op_ListTagsForResource.go | 8 ++++++-- service/storagegateway/api_op_ListTapePools.go | 8 ++++++-- service/storagegateway/api_op_ListTapes.go | 8 ++++++-- service/storagegateway/api_op_ListVolumes.go | 8 ++++++-- service/support/api_op_DescribeCases.go | 8 ++++++-- service/support/api_op_DescribeCommunications.go | 8 ++++++-- service/swf/api_op_GetWorkflowExecutionHistory.go | 8 ++++++-- service/swf/api_op_ListActivityTypes.go | 8 ++++++-- service/swf/api_op_ListClosedWorkflowExecutions.go | 8 ++++++-- service/swf/api_op_ListDomains.go | 8 ++++++-- service/swf/api_op_ListOpenWorkflowExecutions.go | 8 ++++++-- service/swf/api_op_ListWorkflowTypes.go | 8 ++++++-- service/swf/api_op_PollForDecisionTask.go | 8 ++++++-- service/synthetics/api_op_DescribeCanaries.go | 8 ++++++-- service/synthetics/api_op_DescribeCanariesLastRun.go | 8 ++++++-- service/synthetics/api_op_DescribeRuntimeVersions.go | 8 ++++++-- service/synthetics/api_op_GetCanaryRuns.go | 8 ++++++-- service/timestreamquery/api_op_ListScheduledQueries.go | 8 ++++++-- service/timestreamquery/api_op_ListTagsForResource.go | 8 ++++++-- service/timestreamquery/api_op_Query.go | 8 ++++++-- service/timestreamwrite/api_op_ListDatabases.go | 8 ++++++-- service/timestreamwrite/api_op_ListTables.go | 8 ++++++-- service/transcribe/api_op_ListCallAnalyticsCategories.go | 8 ++++++-- service/transcribe/api_op_ListCallAnalyticsJobs.go | 8 ++++++-- service/transcribe/api_op_ListLanguageModels.go | 8 ++++++-- service/transcribe/api_op_ListMedicalTranscriptionJobs.go | 8 ++++++-- service/transcribe/api_op_ListMedicalVocabularies.go | 8 ++++++-- service/transcribe/api_op_ListTranscriptionJobs.go | 8 ++++++-- service/transcribe/api_op_ListVocabularies.go | 8 ++++++-- service/transcribe/api_op_ListVocabularyFilters.go | 8 ++++++-- service/transfer/api_op_ListAccesses.go | 8 ++++++-- service/transfer/api_op_ListExecutions.go | 8 ++++++-- service/transfer/api_op_ListSecurityPolicies.go | 8 ++++++-- service/transfer/api_op_ListServers.go | 8 ++++++-- service/transfer/api_op_ListTagsForResource.go | 8 ++++++-- service/transfer/api_op_ListUsers.go | 8 ++++++-- service/transfer/api_op_ListWorkflows.go | 8 ++++++-- service/translate/api_op_ListParallelData.go | 8 ++++++-- service/translate/api_op_ListTerminologies.go | 8 ++++++-- service/translate/api_op_ListTextTranslationJobs.go | 8 ++++++-- service/voiceid/api_op_ListDomains.go | 8 ++++++-- service/voiceid/api_op_ListFraudsterRegistrationJobs.go | 8 ++++++-- service/voiceid/api_op_ListSpeakerEnrollmentJobs.go | 8 ++++++-- service/voiceid/api_op_ListSpeakers.go | 8 ++++++-- service/wellarchitected/api_op_ListAnswers.go | 8 ++++++-- .../wellarchitected/api_op_ListLensReviewImprovements.go | 8 ++++++-- service/wellarchitected/api_op_ListLensReviews.go | 8 ++++++-- service/wellarchitected/api_op_ListLensShares.go | 8 ++++++-- service/wellarchitected/api_op_ListLenses.go | 8 ++++++-- service/wellarchitected/api_op_ListMilestones.go | 8 ++++++-- service/wellarchitected/api_op_ListNotifications.go | 8 ++++++-- service/wellarchitected/api_op_ListShareInvitations.go | 8 ++++++-- service/wellarchitected/api_op_ListWorkloadShares.go | 8 ++++++-- service/wellarchitected/api_op_ListWorkloads.go | 8 ++++++-- service/wisdom/api_op_ListAssistantAssociations.go | 8 ++++++-- service/wisdom/api_op_ListAssistants.go | 8 ++++++-- service/wisdom/api_op_ListContents.go | 8 ++++++-- service/wisdom/api_op_ListKnowledgeBases.go | 8 ++++++-- service/wisdom/api_op_QueryAssistant.go | 8 ++++++-- service/wisdom/api_op_SearchContent.go | 8 ++++++-- service/wisdom/api_op_SearchSessions.go | 8 ++++++-- service/workdocs/api_op_DescribeDocumentVersions.go | 8 ++++++-- service/workdocs/api_op_DescribeFolderContents.go | 8 ++++++-- service/workdocs/api_op_DescribeUsers.go | 8 ++++++-- service/worklink/api_op_ListDevices.go | 8 ++++++-- service/worklink/api_op_ListDomains.go | 8 ++++++-- service/worklink/api_op_ListFleets.go | 8 ++++++-- .../worklink/api_op_ListWebsiteAuthorizationProviders.go | 8 ++++++-- .../worklink/api_op_ListWebsiteCertificateAuthorities.go | 8 ++++++-- service/workmail/api_op_ListAliases.go | 8 ++++++-- service/workmail/api_op_ListGroupMembers.go | 8 ++++++-- service/workmail/api_op_ListGroups.go | 8 ++++++-- service/workmail/api_op_ListMailDomains.go | 8 ++++++-- service/workmail/api_op_ListMailboxExportJobs.go | 8 ++++++-- service/workmail/api_op_ListMailboxPermissions.go | 8 ++++++-- .../workmail/api_op_ListMobileDeviceAccessOverrides.go | 8 ++++++-- service/workmail/api_op_ListOrganizations.go | 8 ++++++-- service/workmail/api_op_ListResourceDelegates.go | 8 ++++++-- service/workmail/api_op_ListResources.go | 8 ++++++-- service/workmail/api_op_ListUsers.go | 8 ++++++-- service/workspaces/api_op_DescribeWorkspaceBundles.go | 8 ++++++-- service/workspaces/api_op_DescribeWorkspaceDirectories.go | 8 ++++++-- service/workspaces/api_op_DescribeWorkspaces.go | 8 ++++++-- service/workspacesweb/api_op_ListBrowserSettings.go | 8 ++++++-- service/workspacesweb/api_op_ListIdentityProviders.go | 8 ++++++-- service/workspacesweb/api_op_ListNetworkSettings.go | 8 ++++++-- service/workspacesweb/api_op_ListPortals.go | 8 ++++++-- .../workspacesweb/api_op_ListTrustStoreCertificates.go | 8 ++++++-- service/workspacesweb/api_op_ListTrustStores.go | 8 ++++++-- service/workspacesweb/api_op_ListUserSettings.go | 8 ++++++-- service/xray/api_op_BatchGetTraces.go | 8 ++++++-- service/xray/api_op_GetGroups.go | 8 ++++++-- service/xray/api_op_GetInsightEvents.go | 8 ++++++-- service/xray/api_op_GetInsightSummaries.go | 8 ++++++-- service/xray/api_op_GetSamplingRules.go | 8 ++++++-- service/xray/api_op_GetSamplingStatisticSummaries.go | 8 ++++++-- service/xray/api_op_GetServiceGraph.go | 8 ++++++-- service/xray/api_op_GetTimeSeriesServiceStatistics.go | 8 ++++++-- service/xray/api_op_GetTraceGraph.go | 8 ++++++-- service/xray/api_op_GetTraceSummaries.go | 8 ++++++-- 1873 files changed, 11228 insertions(+), 3742 deletions(-) diff --git a/service/accessanalyzer/api_op_ListAccessPreviewFindings.go b/service/accessanalyzer/api_op_ListAccessPreviewFindings.go index a71ab638b2c..80c09535d8b 100644 --- a/service/accessanalyzer/api_op_ListAccessPreviewFindings.go +++ b/service/accessanalyzer/api_op_ListAccessPreviewFindings.go @@ -183,12 +183,13 @@ func NewListAccessPreviewFindingsPaginator(client ListAccessPreviewFindingsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessPreviewFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessPreviewFindings page. @@ -215,7 +216,10 @@ func (p *ListAccessPreviewFindingsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ListAccessPreviews.go b/service/accessanalyzer/api_op_ListAccessPreviews.go index d77b58ddc66..da219571213 100644 --- a/service/accessanalyzer/api_op_ListAccessPreviews.go +++ b/service/accessanalyzer/api_op_ListAccessPreviews.go @@ -173,12 +173,13 @@ func NewListAccessPreviewsPaginator(client ListAccessPreviewsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessPreviewsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessPreviews page. @@ -205,7 +206,10 @@ func (p *ListAccessPreviewsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ListAnalyzedResources.go b/service/accessanalyzer/api_op_ListAnalyzedResources.go index de33516e17b..34a1a84458a 100644 --- a/service/accessanalyzer/api_op_ListAnalyzedResources.go +++ b/service/accessanalyzer/api_op_ListAnalyzedResources.go @@ -179,12 +179,13 @@ func NewListAnalyzedResourcesPaginator(client ListAnalyzedResourcesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnalyzedResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnalyzedResources page. @@ -211,7 +212,10 @@ func (p *ListAnalyzedResourcesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ListAnalyzers.go b/service/accessanalyzer/api_op_ListAnalyzers.go index 011916f4fe0..0d297d5dda1 100644 --- a/service/accessanalyzer/api_op_ListAnalyzers.go +++ b/service/accessanalyzer/api_op_ListAnalyzers.go @@ -166,12 +166,13 @@ func NewListAnalyzersPaginator(client ListAnalyzersAPIClient, params *ListAnalyz client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnalyzersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnalyzers page. @@ -198,7 +199,10 @@ func (p *ListAnalyzersPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ListArchiveRules.go b/service/accessanalyzer/api_op_ListArchiveRules.go index 899a0eca00a..4fba537f123 100644 --- a/service/accessanalyzer/api_op_ListArchiveRules.go +++ b/service/accessanalyzer/api_op_ListArchiveRules.go @@ -172,12 +172,13 @@ func NewListArchiveRulesPaginator(client ListArchiveRulesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListArchiveRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListArchiveRules page. @@ -204,7 +205,10 @@ func (p *ListArchiveRulesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ListFindings.go b/service/accessanalyzer/api_op_ListFindings.go index 1ad9bd36357..49d8c40d395 100644 --- a/service/accessanalyzer/api_op_ListFindings.go +++ b/service/accessanalyzer/api_op_ListFindings.go @@ -184,12 +184,13 @@ func NewListFindingsPaginator(client ListFindingsAPIClient, params *ListFindings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindings page. @@ -216,7 +217,10 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ListPolicyGenerations.go b/service/accessanalyzer/api_op_ListPolicyGenerations.go index 39caa08771c..4b8ac7f2de7 100644 --- a/service/accessanalyzer/api_op_ListPolicyGenerations.go +++ b/service/accessanalyzer/api_op_ListPolicyGenerations.go @@ -168,12 +168,13 @@ func NewListPolicyGenerationsPaginator(client ListPolicyGenerationsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPolicyGenerationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicyGenerations page. @@ -200,7 +201,10 @@ func (p *ListPolicyGenerationsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/accessanalyzer/api_op_ValidatePolicy.go b/service/accessanalyzer/api_op_ValidatePolicy.go index 3ba8bfc20c8..a981579942a 100644 --- a/service/accessanalyzer/api_op_ValidatePolicy.go +++ b/service/accessanalyzer/api_op_ValidatePolicy.go @@ -201,12 +201,13 @@ func NewValidatePolicyPaginator(client ValidatePolicyAPIClient, params *Validate client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ValidatePolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ValidatePolicy page. @@ -233,7 +234,10 @@ func (p *ValidatePolicyPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/acm/api_op_ListCertificates.go b/service/acm/api_op_ListCertificates.go index f775c3701da..17092101ae8 100644 --- a/service/acm/api_op_ListCertificates.go +++ b/service/acm/api_op_ListCertificates.go @@ -178,12 +178,13 @@ func NewListCertificatesPaginator(client ListCertificatesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCertificates page. @@ -210,7 +211,10 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/acmpca/api_op_ListCertificateAuthorities.go b/service/acmpca/api_op_ListCertificateAuthorities.go index 2eca251bbcb..d72afced427 100644 --- a/service/acmpca/api_op_ListCertificateAuthorities.go +++ b/service/acmpca/api_op_ListCertificateAuthorities.go @@ -179,12 +179,13 @@ func NewListCertificateAuthoritiesPaginator(client ListCertificateAuthoritiesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCertificateAuthoritiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCertificateAuthorities page. @@ -211,7 +212,10 @@ func (p *ListCertificateAuthoritiesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/acmpca/api_op_ListPermissions.go b/service/acmpca/api_op_ListPermissions.go index 7c776d4dc20..3d46f84a05d 100644 --- a/service/acmpca/api_op_ListPermissions.go +++ b/service/acmpca/api_op_ListPermissions.go @@ -207,12 +207,13 @@ func NewListPermissionsPaginator(client ListPermissionsAPIClient, params *ListPe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissions page. @@ -239,7 +240,10 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/acmpca/api_op_ListTags.go b/service/acmpca/api_op_ListTags.go index 2a6c27fb40d..5c9fb86b24a 100644 --- a/service/acmpca/api_op_ListTags.go +++ b/service/acmpca/api_op_ListTags.go @@ -187,12 +187,13 @@ func NewListTagsPaginator(client ListTagsAPIClient, params *ListTagsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTags page. @@ -219,7 +220,10 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListBusinessReportSchedules.go b/service/alexaforbusiness/api_op_ListBusinessReportSchedules.go index 1f21720811c..dd4c7c857b9 100644 --- a/service/alexaforbusiness/api_op_ListBusinessReportSchedules.go +++ b/service/alexaforbusiness/api_op_ListBusinessReportSchedules.go @@ -165,12 +165,13 @@ func NewListBusinessReportSchedulesPaginator(client ListBusinessReportSchedulesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBusinessReportSchedulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBusinessReportSchedules page. @@ -197,7 +198,10 @@ func (p *ListBusinessReportSchedulesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListConferenceProviders.go b/service/alexaforbusiness/api_op_ListConferenceProviders.go index 89a3b8d5bee..8f24ab0c70f 100644 --- a/service/alexaforbusiness/api_op_ListConferenceProviders.go +++ b/service/alexaforbusiness/api_op_ListConferenceProviders.go @@ -162,12 +162,13 @@ func NewListConferenceProvidersPaginator(client ListConferenceProvidersAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConferenceProvidersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConferenceProviders page. @@ -194,7 +195,10 @@ func (p *ListConferenceProvidersPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListDeviceEvents.go b/service/alexaforbusiness/api_op_ListDeviceEvents.go index 5afc1127de6..d4207332eea 100644 --- a/service/alexaforbusiness/api_op_ListDeviceEvents.go +++ b/service/alexaforbusiness/api_op_ListDeviceEvents.go @@ -182,12 +182,13 @@ func NewListDeviceEventsPaginator(client ListDeviceEventsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeviceEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeviceEvents page. @@ -214,7 +215,10 @@ func (p *ListDeviceEventsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListGatewayGroups.go b/service/alexaforbusiness/api_op_ListGatewayGroups.go index eddc86b21fd..953f967a99d 100644 --- a/service/alexaforbusiness/api_op_ListGatewayGroups.go +++ b/service/alexaforbusiness/api_op_ListGatewayGroups.go @@ -161,12 +161,13 @@ func NewListGatewayGroupsPaginator(client ListGatewayGroupsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGatewayGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGatewayGroups page. @@ -193,7 +194,10 @@ func (p *ListGatewayGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListGateways.go b/service/alexaforbusiness/api_op_ListGateways.go index d8ecb309506..9bee56309cc 100644 --- a/service/alexaforbusiness/api_op_ListGateways.go +++ b/service/alexaforbusiness/api_op_ListGateways.go @@ -164,12 +164,13 @@ func NewListGatewaysPaginator(client ListGatewaysAPIClient, params *ListGateways client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGateways page. @@ -196,7 +197,10 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListSkills.go b/service/alexaforbusiness/api_op_ListSkills.go index 6de66524dbf..a101d1895d5 100644 --- a/service/alexaforbusiness/api_op_ListSkills.go +++ b/service/alexaforbusiness/api_op_ListSkills.go @@ -174,12 +174,13 @@ func NewListSkillsPaginator(client ListSkillsAPIClient, params *ListSkillsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSkillsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSkills page. @@ -206,7 +207,10 @@ func (p *ListSkillsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListSkillsStoreCategories.go b/service/alexaforbusiness/api_op_ListSkillsStoreCategories.go index 14d23b9b48b..9845cddadf5 100644 --- a/service/alexaforbusiness/api_op_ListSkillsStoreCategories.go +++ b/service/alexaforbusiness/api_op_ListSkillsStoreCategories.go @@ -162,12 +162,13 @@ func NewListSkillsStoreCategoriesPaginator(client ListSkillsStoreCategoriesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSkillsStoreCategoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSkillsStoreCategories page. @@ -194,7 +195,10 @@ func (p *ListSkillsStoreCategoriesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListSkillsStoreSkillsByCategory.go b/service/alexaforbusiness/api_op_ListSkillsStoreSkillsByCategory.go index a6ad055ab04..3c9a41846c0 100644 --- a/service/alexaforbusiness/api_op_ListSkillsStoreSkillsByCategory.go +++ b/service/alexaforbusiness/api_op_ListSkillsStoreSkillsByCategory.go @@ -171,12 +171,13 @@ func NewListSkillsStoreSkillsByCategoryPaginator(client ListSkillsStoreSkillsByC client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSkillsStoreSkillsByCategoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSkillsStoreSkillsByCategory page. @@ -203,7 +204,10 @@ func (p *ListSkillsStoreSkillsByCategoryPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListSmartHomeAppliances.go b/service/alexaforbusiness/api_op_ListSmartHomeAppliances.go index 82764381703..a11feeb695c 100644 --- a/service/alexaforbusiness/api_op_ListSmartHomeAppliances.go +++ b/service/alexaforbusiness/api_op_ListSmartHomeAppliances.go @@ -170,12 +170,13 @@ func NewListSmartHomeAppliancesPaginator(client ListSmartHomeAppliancesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSmartHomeAppliancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSmartHomeAppliances page. @@ -202,7 +203,10 @@ func (p *ListSmartHomeAppliancesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_ListTags.go b/service/alexaforbusiness/api_op_ListTags.go index 8833d9cf865..3d0b2101835 100644 --- a/service/alexaforbusiness/api_op_ListTags.go +++ b/service/alexaforbusiness/api_op_ListTags.go @@ -173,12 +173,13 @@ func NewListTagsPaginator(client ListTagsAPIClient, params *ListTagsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTags page. @@ -205,7 +206,10 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchAddressBooks.go b/service/alexaforbusiness/api_op_SearchAddressBooks.go index b5d5897f855..0f7f466d7c1 100644 --- a/service/alexaforbusiness/api_op_SearchAddressBooks.go +++ b/service/alexaforbusiness/api_op_SearchAddressBooks.go @@ -182,12 +182,13 @@ func NewSearchAddressBooksPaginator(client SearchAddressBooksAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchAddressBooksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchAddressBooks page. @@ -214,7 +215,10 @@ func (p *SearchAddressBooksPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchContacts.go b/service/alexaforbusiness/api_op_SearchContacts.go index cdd55c44b19..32e01f567a2 100644 --- a/service/alexaforbusiness/api_op_SearchContacts.go +++ b/service/alexaforbusiness/api_op_SearchContacts.go @@ -181,12 +181,13 @@ func NewSearchContactsPaginator(client SearchContactsAPIClient, params *SearchCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchContactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchContacts page. @@ -213,7 +214,10 @@ func (p *SearchContactsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchDevices.go b/service/alexaforbusiness/api_op_SearchDevices.go index bae02a58d94..8a2dbfabd33 100644 --- a/service/alexaforbusiness/api_op_SearchDevices.go +++ b/service/alexaforbusiness/api_op_SearchDevices.go @@ -183,12 +183,13 @@ func NewSearchDevicesPaginator(client SearchDevicesAPIClient, params *SearchDevi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchDevices page. @@ -215,7 +216,10 @@ func (p *SearchDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchNetworkProfiles.go b/service/alexaforbusiness/api_op_SearchNetworkProfiles.go index 69bc06f66e3..aac06fd5825 100644 --- a/service/alexaforbusiness/api_op_SearchNetworkProfiles.go +++ b/service/alexaforbusiness/api_op_SearchNetworkProfiles.go @@ -185,12 +185,13 @@ func NewSearchNetworkProfilesPaginator(client SearchNetworkProfilesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchNetworkProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchNetworkProfiles page. @@ -217,7 +218,10 @@ func (p *SearchNetworkProfilesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchProfiles.go b/service/alexaforbusiness/api_op_SearchProfiles.go index 02c70113915..79ed3cabeaf 100644 --- a/service/alexaforbusiness/api_op_SearchProfiles.go +++ b/service/alexaforbusiness/api_op_SearchProfiles.go @@ -180,12 +180,13 @@ func NewSearchProfilesPaginator(client SearchProfilesAPIClient, params *SearchPr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchProfiles page. @@ -212,7 +213,10 @@ func (p *SearchProfilesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchRooms.go b/service/alexaforbusiness/api_op_SearchRooms.go index ea7700bee7b..b1d82714a71 100644 --- a/service/alexaforbusiness/api_op_SearchRooms.go +++ b/service/alexaforbusiness/api_op_SearchRooms.go @@ -179,12 +179,13 @@ func NewSearchRoomsPaginator(client SearchRoomsAPIClient, params *SearchRoomsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchRoomsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchRooms page. @@ -211,7 +212,10 @@ func (p *SearchRoomsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchSkillGroups.go b/service/alexaforbusiness/api_op_SearchSkillGroups.go index 8256e905bb7..7838ab5b6ae 100644 --- a/service/alexaforbusiness/api_op_SearchSkillGroups.go +++ b/service/alexaforbusiness/api_op_SearchSkillGroups.go @@ -182,12 +182,13 @@ func NewSearchSkillGroupsPaginator(client SearchSkillGroupsAPIClient, params *Se client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchSkillGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchSkillGroups page. @@ -214,7 +215,10 @@ func (p *SearchSkillGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/alexaforbusiness/api_op_SearchUsers.go b/service/alexaforbusiness/api_op_SearchUsers.go index 3d2ae0ef68e..3872e22d9b4 100644 --- a/service/alexaforbusiness/api_op_SearchUsers.go +++ b/service/alexaforbusiness/api_op_SearchUsers.go @@ -180,12 +180,13 @@ func NewSearchUsersPaginator(client SearchUsersAPIClient, params *SearchUsersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchUsers page. @@ -212,7 +213,10 @@ func (p *SearchUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/amp/api_op_ListRuleGroupsNamespaces.go b/service/amp/api_op_ListRuleGroupsNamespaces.go index e5be4d7043a..0406c230892 100644 --- a/service/amp/api_op_ListRuleGroupsNamespaces.go +++ b/service/amp/api_op_ListRuleGroupsNamespaces.go @@ -179,12 +179,13 @@ func NewListRuleGroupsNamespacesPaginator(client ListRuleGroupsNamespacesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRuleGroupsNamespacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRuleGroupsNamespaces page. @@ -211,7 +212,10 @@ func (p *ListRuleGroupsNamespacesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/amp/api_op_ListWorkspaces.go b/service/amp/api_op_ListWorkspaces.go index 126c305346d..b67256f0d65 100644 --- a/service/amp/api_op_ListWorkspaces.go +++ b/service/amp/api_op_ListWorkspaces.go @@ -170,12 +170,13 @@ func NewListWorkspacesPaginator(client ListWorkspacesAPIClient, params *ListWork client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkspacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkspaces page. @@ -202,7 +203,10 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/amplifyuibuilder/api_op_ListComponents.go b/service/amplifyuibuilder/api_op_ListComponents.go index 6962f537ca9..5d6b7ec17f1 100644 --- a/service/amplifyuibuilder/api_op_ListComponents.go +++ b/service/amplifyuibuilder/api_op_ListComponents.go @@ -176,12 +176,13 @@ func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponents page. @@ -204,7 +205,10 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/amplifyuibuilder/api_op_ListThemes.go b/service/amplifyuibuilder/api_op_ListThemes.go index 5eba570afc8..619a3d4cf4d 100644 --- a/service/amplifyuibuilder/api_op_ListThemes.go +++ b/service/amplifyuibuilder/api_op_ListThemes.go @@ -174,12 +174,13 @@ func NewListThemesPaginator(client ListThemesAPIClient, params *ListThemesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThemesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThemes page. @@ -202,7 +203,10 @@ func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetApiKeys.go b/service/apigateway/api_op_GetApiKeys.go index e3d9f918029..f901bf15e5d 100644 --- a/service/apigateway/api_op_GetApiKeys.go +++ b/service/apigateway/api_op_GetApiKeys.go @@ -183,12 +183,13 @@ func NewGetApiKeysPaginator(client GetApiKeysAPIClient, params *GetApiKeysInput, client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetApiKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetApiKeys page. @@ -215,7 +216,10 @@ func (p *GetApiKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetBasePathMappings.go b/service/apigateway/api_op_GetBasePathMappings.go index da537bcf893..01732fc8765 100644 --- a/service/apigateway/api_op_GetBasePathMappings.go +++ b/service/apigateway/api_op_GetBasePathMappings.go @@ -177,12 +177,13 @@ func NewGetBasePathMappingsPaginator(client GetBasePathMappingsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBasePathMappingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBasePathMappings page. @@ -209,7 +210,10 @@ func (p *GetBasePathMappingsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetClientCertificates.go b/service/apigateway/api_op_GetClientCertificates.go index fdfc88ad933..9350bef57c6 100644 --- a/service/apigateway/api_op_GetClientCertificates.go +++ b/service/apigateway/api_op_GetClientCertificates.go @@ -170,12 +170,13 @@ func NewGetClientCertificatesPaginator(client GetClientCertificatesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetClientCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetClientCertificates page. @@ -202,7 +203,10 @@ func (p *GetClientCertificatesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetDeployments.go b/service/apigateway/api_op_GetDeployments.go index 2d74fab44c6..1a8a102c4a3 100644 --- a/service/apigateway/api_op_GetDeployments.go +++ b/service/apigateway/api_op_GetDeployments.go @@ -185,12 +185,13 @@ func NewGetDeploymentsPaginator(client GetDeploymentsAPIClient, params *GetDeplo client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDeploymentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDeployments page. @@ -217,7 +218,10 @@ func (p *GetDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetDomainNames.go b/service/apigateway/api_op_GetDomainNames.go index d9b0f8a2844..4697dff2a4d 100644 --- a/service/apigateway/api_op_GetDomainNames.go +++ b/service/apigateway/api_op_GetDomainNames.go @@ -168,12 +168,13 @@ func NewGetDomainNamesPaginator(client GetDomainNamesAPIClient, params *GetDomai client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDomainNamesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDomainNames page. @@ -200,7 +201,10 @@ func (p *GetDomainNamesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetModels.go b/service/apigateway/api_op_GetModels.go index bb4fc496c82..a7b5a8748a9 100644 --- a/service/apigateway/api_op_GetModels.go +++ b/service/apigateway/api_op_GetModels.go @@ -176,12 +176,13 @@ func NewGetModelsPaginator(client GetModelsAPIClient, params *GetModelsInput, op client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetModels page. @@ -208,7 +209,10 @@ func (p *GetModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetResources.go b/service/apigateway/api_op_GetResources.go index b0e9fda5edd..80d811ddb92 100644 --- a/service/apigateway/api_op_GetResources.go +++ b/service/apigateway/api_op_GetResources.go @@ -183,12 +183,13 @@ func NewGetResourcesPaginator(client GetResourcesAPIClient, params *GetResources client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResources page. @@ -215,7 +216,10 @@ func (p *GetResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetRestApis.go b/service/apigateway/api_op_GetRestApis.go index 4c0dace9a53..22667db72a2 100644 --- a/service/apigateway/api_op_GetRestApis.go +++ b/service/apigateway/api_op_GetRestApis.go @@ -169,12 +169,13 @@ func NewGetRestApisPaginator(client GetRestApisAPIClient, params *GetRestApisInp client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetRestApisPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetRestApis page. @@ -201,7 +202,10 @@ func (p *GetRestApisPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetUsage.go b/service/apigateway/api_op_GetUsage.go index f96aa5595ba..b7d86fee305 100644 --- a/service/apigateway/api_op_GetUsage.go +++ b/service/apigateway/api_op_GetUsage.go @@ -203,12 +203,13 @@ func NewGetUsagePaginator(client GetUsageAPIClient, params *GetUsageInput, optFn client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUsagePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUsage page. @@ -235,7 +236,10 @@ func (p *GetUsagePaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetUsagePlanKeys.go b/service/apigateway/api_op_GetUsagePlanKeys.go index d27f84b627e..83d0bae0739 100644 --- a/service/apigateway/api_op_GetUsagePlanKeys.go +++ b/service/apigateway/api_op_GetUsagePlanKeys.go @@ -185,12 +185,13 @@ func NewGetUsagePlanKeysPaginator(client GetUsagePlanKeysAPIClient, params *GetU client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUsagePlanKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUsagePlanKeys page. @@ -217,7 +218,10 @@ func (p *GetUsagePlanKeysPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetUsagePlans.go b/service/apigateway/api_op_GetUsagePlans.go index fef48288522..f6c8d78f832 100644 --- a/service/apigateway/api_op_GetUsagePlans.go +++ b/service/apigateway/api_op_GetUsagePlans.go @@ -171,12 +171,13 @@ func NewGetUsagePlansPaginator(client GetUsagePlansAPIClient, params *GetUsagePl client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUsagePlansPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUsagePlans page. @@ -203,7 +204,10 @@ func (p *GetUsagePlansPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apigateway/api_op_GetVpcLinks.go b/service/apigateway/api_op_GetVpcLinks.go index b16e849a15d..d0e94afc8d1 100644 --- a/service/apigateway/api_op_GetVpcLinks.go +++ b/service/apigateway/api_op_GetVpcLinks.go @@ -170,12 +170,13 @@ func NewGetVpcLinksPaginator(client GetVpcLinksAPIClient, params *GetVpcLinksInp client: client, params: params, firstPage: true, + nextToken: params.Position, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetVpcLinksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetVpcLinks page. @@ -202,7 +203,10 @@ func (p *GetVpcLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.Position - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appconfig/api_op_ListApplications.go b/service/appconfig/api_op_ListApplications.go index 40df6646bb8..ee2994b2688 100644 --- a/service/appconfig/api_op_ListApplications.go +++ b/service/appconfig/api_op_ListApplications.go @@ -167,12 +167,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -195,7 +196,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appconfig/api_op_ListConfigurationProfiles.go b/service/appconfig/api_op_ListConfigurationProfiles.go index 1bfc8b3e45d..04f0bd62c25 100644 --- a/service/appconfig/api_op_ListConfigurationProfiles.go +++ b/service/appconfig/api_op_ListConfigurationProfiles.go @@ -177,12 +177,13 @@ func NewListConfigurationProfilesPaginator(client ListConfigurationProfilesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigurationProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigurationProfiles page. @@ -205,7 +206,10 @@ func (p *ListConfigurationProfilesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appconfig/api_op_ListDeploymentStrategies.go b/service/appconfig/api_op_ListDeploymentStrategies.go index 85ecd0d5bf0..d710f9cda48 100644 --- a/service/appconfig/api_op_ListDeploymentStrategies.go +++ b/service/appconfig/api_op_ListDeploymentStrategies.go @@ -165,12 +165,13 @@ func NewListDeploymentStrategiesPaginator(client ListDeploymentStrategiesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentStrategiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeploymentStrategies page. @@ -193,7 +194,10 @@ func (p *ListDeploymentStrategiesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appconfig/api_op_ListDeployments.go b/service/appconfig/api_op_ListDeployments.go index 6bc66d44908..480152ff41d 100644 --- a/service/appconfig/api_op_ListDeployments.go +++ b/service/appconfig/api_op_ListDeployments.go @@ -176,12 +176,13 @@ func NewListDeploymentsPaginator(client ListDeploymentsAPIClient, params *ListDe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeployments page. @@ -204,7 +205,10 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appconfig/api_op_ListEnvironments.go b/service/appconfig/api_op_ListEnvironments.go index 10a52dede4c..3876f7a83bd 100644 --- a/service/appconfig/api_op_ListEnvironments.go +++ b/service/appconfig/api_op_ListEnvironments.go @@ -171,12 +171,13 @@ func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironments page. @@ -199,7 +200,10 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appconfig/api_op_ListHostedConfigurationVersions.go b/service/appconfig/api_op_ListHostedConfigurationVersions.go index f7bc84d18c9..1542d8acc4a 100644 --- a/service/appconfig/api_op_ListHostedConfigurationVersions.go +++ b/service/appconfig/api_op_ListHostedConfigurationVersions.go @@ -180,12 +180,13 @@ func NewListHostedConfigurationVersionsPaginator(client ListHostedConfigurationV client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHostedConfigurationVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHostedConfigurationVersions page. @@ -208,7 +209,10 @@ func (p *ListHostedConfigurationVersionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appflow/api_op_DescribeConnectorProfiles.go b/service/appflow/api_op_DescribeConnectorProfiles.go index 8ad7fb68e1e..5ed6d9a233b 100644 --- a/service/appflow/api_op_DescribeConnectorProfiles.go +++ b/service/appflow/api_op_DescribeConnectorProfiles.go @@ -176,12 +176,13 @@ func NewDescribeConnectorProfilesPaginator(client DescribeConnectorProfilesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConnectorProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConnectorProfiles page. @@ -208,7 +209,10 @@ func (p *DescribeConnectorProfilesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appflow/api_op_DescribeConnectors.go b/service/appflow/api_op_DescribeConnectors.go index fda8ccd2121..42696d9b04a 100644 --- a/service/appflow/api_op_DescribeConnectors.go +++ b/service/appflow/api_op_DescribeConnectors.go @@ -159,12 +159,13 @@ func NewDescribeConnectorsPaginator(client DescribeConnectorsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConnectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConnectors page. @@ -185,7 +186,10 @@ func (p *DescribeConnectorsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appflow/api_op_DescribeFlowExecutionRecords.go b/service/appflow/api_op_DescribeFlowExecutionRecords.go index e106692b0fa..cc1a96f6d24 100644 --- a/service/appflow/api_op_DescribeFlowExecutionRecords.go +++ b/service/appflow/api_op_DescribeFlowExecutionRecords.go @@ -174,12 +174,13 @@ func NewDescribeFlowExecutionRecordsPaginator(client DescribeFlowExecutionRecord client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFlowExecutionRecordsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFlowExecutionRecords page. @@ -206,7 +207,10 @@ func (p *DescribeFlowExecutionRecordsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appflow/api_op_ListFlows.go b/service/appflow/api_op_ListFlows.go index ce8fb680991..2efbb0ae332 100644 --- a/service/appflow/api_op_ListFlows.go +++ b/service/appflow/api_op_ListFlows.go @@ -159,12 +159,13 @@ func NewListFlowsPaginator(client ListFlowsAPIClient, params *ListFlowsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFlowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFlows page. @@ -191,7 +192,10 @@ func (p *ListFlowsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationautoscaling/api_op_DescribeScalableTargets.go b/service/applicationautoscaling/api_op_DescribeScalableTargets.go index e6d1adf73cf..e26f9ab4198 100644 --- a/service/applicationautoscaling/api_op_DescribeScalableTargets.go +++ b/service/applicationautoscaling/api_op_DescribeScalableTargets.go @@ -335,12 +335,13 @@ func NewDescribeScalableTargetsPaginator(client DescribeScalableTargetsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScalableTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScalableTargets page. @@ -367,7 +368,10 @@ func (p *DescribeScalableTargetsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationautoscaling/api_op_DescribeScalingActivities.go b/service/applicationautoscaling/api_op_DescribeScalingActivities.go index 1779b0d9abb..32fd39969be 100644 --- a/service/applicationautoscaling/api_op_DescribeScalingActivities.go +++ b/service/applicationautoscaling/api_op_DescribeScalingActivities.go @@ -336,12 +336,13 @@ func NewDescribeScalingActivitiesPaginator(client DescribeScalingActivitiesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScalingActivitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScalingActivities page. @@ -368,7 +369,10 @@ func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationautoscaling/api_op_DescribeScalingPolicies.go b/service/applicationautoscaling/api_op_DescribeScalingPolicies.go index b2039e9ce8a..09184bf6560 100644 --- a/service/applicationautoscaling/api_op_DescribeScalingPolicies.go +++ b/service/applicationautoscaling/api_op_DescribeScalingPolicies.go @@ -344,12 +344,13 @@ func NewDescribeScalingPoliciesPaginator(client DescribeScalingPoliciesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScalingPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScalingPolicies page. @@ -376,7 +377,10 @@ func (p *DescribeScalingPoliciesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationautoscaling/api_op_DescribeScheduledActions.go b/service/applicationautoscaling/api_op_DescribeScheduledActions.go index 0e898380f80..0acb97975a4 100644 --- a/service/applicationautoscaling/api_op_DescribeScheduledActions.go +++ b/service/applicationautoscaling/api_op_DescribeScheduledActions.go @@ -344,12 +344,13 @@ func NewDescribeScheduledActionsPaginator(client DescribeScheduledActionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScheduledActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScheduledActions page. @@ -376,7 +377,10 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationcostprofiler/api_op_ListReportDefinitions.go b/service/applicationcostprofiler/api_op_ListReportDefinitions.go index 3eab7101d63..51e42be5b72 100644 --- a/service/applicationcostprofiler/api_op_ListReportDefinitions.go +++ b/service/applicationcostprofiler/api_op_ListReportDefinitions.go @@ -162,12 +162,13 @@ func NewListReportDefinitionsPaginator(client ListReportDefinitionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReportDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReportDefinitions page. @@ -194,7 +195,10 @@ func (p *ListReportDefinitionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go b/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go index 32172bcfb19..75b775d233f 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go +++ b/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go @@ -169,12 +169,13 @@ func NewDescribeContinuousExportsPaginator(client DescribeContinuousExportsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeContinuousExportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeContinuousExports page. @@ -201,7 +202,10 @@ func (p *DescribeContinuousExportsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go b/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go index b43b8335e5e..3dd3afb6f2f 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go +++ b/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go @@ -168,12 +168,13 @@ func NewDescribeImportTasksPaginator(client DescribeImportTasksAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImportTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImportTasks page. @@ -200,7 +201,10 @@ func (p *DescribeImportTasksPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationinsights/api_op_ListApplications.go b/service/applicationinsights/api_op_ListApplications.go index 15504fd438d..c7c359dc1ae 100644 --- a/service/applicationinsights/api_op_ListApplications.go +++ b/service/applicationinsights/api_op_ListApplications.go @@ -163,12 +163,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -195,7 +196,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationinsights/api_op_ListComponents.go b/service/applicationinsights/api_op_ListComponents.go index 955c0518a1a..09fa2ecb352 100644 --- a/service/applicationinsights/api_op_ListComponents.go +++ b/service/applicationinsights/api_op_ListComponents.go @@ -170,12 +170,13 @@ func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponents page. @@ -202,7 +203,10 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationinsights/api_op_ListConfigurationHistory.go b/service/applicationinsights/api_op_ListConfigurationHistory.go index 50f93f98b03..4cb67b7bd2b 100644 --- a/service/applicationinsights/api_op_ListConfigurationHistory.go +++ b/service/applicationinsights/api_op_ListConfigurationHistory.go @@ -203,12 +203,13 @@ func NewListConfigurationHistoryPaginator(client ListConfigurationHistoryAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigurationHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigurationHistory page. @@ -235,7 +236,10 @@ func (p *ListConfigurationHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationinsights/api_op_ListLogPatternSets.go b/service/applicationinsights/api_op_ListLogPatternSets.go index 437564377e2..374e65c6b0b 100644 --- a/service/applicationinsights/api_op_ListLogPatternSets.go +++ b/service/applicationinsights/api_op_ListLogPatternSets.go @@ -174,12 +174,13 @@ func NewListLogPatternSetsPaginator(client ListLogPatternSetsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLogPatternSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLogPatternSets page. @@ -206,7 +207,10 @@ func (p *ListLogPatternSetsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationinsights/api_op_ListLogPatterns.go b/service/applicationinsights/api_op_ListLogPatterns.go index 60c4fe15cff..9dfded2578a 100644 --- a/service/applicationinsights/api_op_ListLogPatterns.go +++ b/service/applicationinsights/api_op_ListLogPatterns.go @@ -177,12 +177,13 @@ func NewListLogPatternsPaginator(client ListLogPatternsAPIClient, params *ListLo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLogPatternsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLogPatterns page. @@ -209,7 +210,10 @@ func (p *ListLogPatternsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/applicationinsights/api_op_ListProblems.go b/service/applicationinsights/api_op_ListProblems.go index 117ec14b03b..a7c55862d90 100644 --- a/service/applicationinsights/api_op_ListProblems.go +++ b/service/applicationinsights/api_op_ListProblems.go @@ -177,12 +177,13 @@ func NewListProblemsPaginator(client ListProblemsAPIClient, params *ListProblems client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProblemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProblems page. @@ -209,7 +210,10 @@ func (p *ListProblemsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListGatewayRoutes.go b/service/appmesh/api_op_ListGatewayRoutes.go index 72f7f922d57..d9bdda13156 100644 --- a/service/appmesh/api_op_ListGatewayRoutes.go +++ b/service/appmesh/api_op_ListGatewayRoutes.go @@ -201,12 +201,13 @@ func NewListGatewayRoutesPaginator(client ListGatewayRoutesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGatewayRoutesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGatewayRoutes page. @@ -233,7 +234,10 @@ func (p *ListGatewayRoutesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListMeshes.go b/service/appmesh/api_op_ListMeshes.go index c8f0d518d69..b432ba2d65f 100644 --- a/service/appmesh/api_op_ListMeshes.go +++ b/service/appmesh/api_op_ListMeshes.go @@ -182,12 +182,13 @@ func NewListMeshesPaginator(client ListMeshesAPIClient, params *ListMeshesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMeshesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMeshes page. @@ -214,7 +215,10 @@ func (p *ListMeshesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListRoutes.go b/service/appmesh/api_op_ListRoutes.go index 5935f7a7734..60580c7c707 100644 --- a/service/appmesh/api_op_ListRoutes.go +++ b/service/appmesh/api_op_ListRoutes.go @@ -200,12 +200,13 @@ func NewListRoutesPaginator(client ListRoutesAPIClient, params *ListRoutesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoutesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoutes page. @@ -232,7 +233,10 @@ func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListTagsForResource.go b/service/appmesh/api_op_ListTagsForResource.go index 6bfbff8aec9..23bda69d8aa 100644 --- a/service/appmesh/api_op_ListTagsForResource.go +++ b/service/appmesh/api_op_ListTagsForResource.go @@ -192,12 +192,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -224,7 +225,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListVirtualGateways.go b/service/appmesh/api_op_ListVirtualGateways.go index 12422c4b41d..c5d6672ecd9 100644 --- a/service/appmesh/api_op_ListVirtualGateways.go +++ b/service/appmesh/api_op_ListVirtualGateways.go @@ -195,12 +195,13 @@ func NewListVirtualGatewaysPaginator(client ListVirtualGatewaysAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualGateways page. @@ -227,7 +228,10 @@ func (p *ListVirtualGatewaysPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListVirtualNodes.go b/service/appmesh/api_op_ListVirtualNodes.go index 7b09146bceb..1f72b3d5778 100644 --- a/service/appmesh/api_op_ListVirtualNodes.go +++ b/service/appmesh/api_op_ListVirtualNodes.go @@ -196,12 +196,13 @@ func NewListVirtualNodesPaginator(client ListVirtualNodesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualNodesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualNodes page. @@ -228,7 +229,10 @@ func (p *ListVirtualNodesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListVirtualRouters.go b/service/appmesh/api_op_ListVirtualRouters.go index a0f3e2a8eed..3729d4abb45 100644 --- a/service/appmesh/api_op_ListVirtualRouters.go +++ b/service/appmesh/api_op_ListVirtualRouters.go @@ -197,12 +197,13 @@ func NewListVirtualRoutersPaginator(client ListVirtualRoutersAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualRoutersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualRouters page. @@ -229,7 +230,10 @@ func (p *ListVirtualRoutersPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appmesh/api_op_ListVirtualServices.go b/service/appmesh/api_op_ListVirtualServices.go index fbe17072318..481a99e5617 100644 --- a/service/appmesh/api_op_ListVirtualServices.go +++ b/service/appmesh/api_op_ListVirtualServices.go @@ -197,12 +197,13 @@ func NewListVirtualServicesPaginator(client ListVirtualServicesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualServices page. @@ -229,7 +230,10 @@ func (p *ListVirtualServicesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apprunner/api_op_DescribeCustomDomains.go b/service/apprunner/api_op_DescribeCustomDomains.go index 44ff4024cb6..9637ebdc3b2 100644 --- a/service/apprunner/api_op_DescribeCustomDomains.go +++ b/service/apprunner/api_op_DescribeCustomDomains.go @@ -195,12 +195,13 @@ func NewDescribeCustomDomainsPaginator(client DescribeCustomDomainsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCustomDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCustomDomains page. @@ -227,7 +228,10 @@ func (p *DescribeCustomDomainsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apprunner/api_op_ListAutoScalingConfigurations.go b/service/apprunner/api_op_ListAutoScalingConfigurations.go index 38f31569a10..1c698f91e0c 100644 --- a/service/apprunner/api_op_ListAutoScalingConfigurations.go +++ b/service/apprunner/api_op_ListAutoScalingConfigurations.go @@ -187,12 +187,13 @@ func NewListAutoScalingConfigurationsPaginator(client ListAutoScalingConfigurati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAutoScalingConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAutoScalingConfigurations page. @@ -219,7 +220,10 @@ func (p *ListAutoScalingConfigurationsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apprunner/api_op_ListConnections.go b/service/apprunner/api_op_ListConnections.go index 4e269de0896..cb534541846 100644 --- a/service/apprunner/api_op_ListConnections.go +++ b/service/apprunner/api_op_ListConnections.go @@ -176,12 +176,13 @@ func NewListConnectionsPaginator(client ListConnectionsAPIClient, params *ListCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConnections page. @@ -208,7 +209,10 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apprunner/api_op_ListOperations.go b/service/apprunner/api_op_ListOperations.go index cea93d2d7f3..13592f11c26 100644 --- a/service/apprunner/api_op_ListOperations.go +++ b/service/apprunner/api_op_ListOperations.go @@ -180,12 +180,13 @@ func NewListOperationsPaginator(client ListOperationsAPIClient, params *ListOper client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOperationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOperations page. @@ -212,7 +213,10 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/apprunner/api_op_ListServices.go b/service/apprunner/api_op_ListServices.go index a54728d0a89..70f0125df44 100644 --- a/service/apprunner/api_op_ListServices.go +++ b/service/apprunner/api_op_ListServices.go @@ -171,12 +171,13 @@ func NewListServicesPaginator(client ListServicesAPIClient, params *ListServices client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServices page. @@ -203,7 +204,10 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appstream/api_op_DescribeImagePermissions.go b/service/appstream/api_op_DescribeImagePermissions.go index 8e04d81ee07..f2ec379d1bf 100644 --- a/service/appstream/api_op_DescribeImagePermissions.go +++ b/service/appstream/api_op_DescribeImagePermissions.go @@ -181,12 +181,13 @@ func NewDescribeImagePermissionsPaginator(client DescribeImagePermissionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImagePermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImagePermissions page. @@ -213,7 +214,10 @@ func (p *DescribeImagePermissionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/appstream/api_op_DescribeImages.go b/service/appstream/api_op_DescribeImages.go index 04f6840666c..9eedcb4826d 100644 --- a/service/appstream/api_op_DescribeImages.go +++ b/service/appstream/api_op_DescribeImages.go @@ -172,12 +172,13 @@ func NewDescribeImagesPaginator(client DescribeImagesAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImages page. @@ -204,7 +205,10 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_GetQueryResults.go b/service/athena/api_op_GetQueryResults.go index ca2fc0e0c52..e0fcf421457 100644 --- a/service/athena/api_op_GetQueryResults.go +++ b/service/athena/api_op_GetQueryResults.go @@ -186,12 +186,13 @@ func NewGetQueryResultsPaginator(client GetQueryResultsAPIClient, params *GetQue client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetQueryResultsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetQueryResults page. @@ -218,7 +219,10 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListDataCatalogs.go b/service/athena/api_op_ListDataCatalogs.go index 19ffd11e26a..9f7c325c57b 100644 --- a/service/athena/api_op_ListDataCatalogs.go +++ b/service/athena/api_op_ListDataCatalogs.go @@ -164,12 +164,13 @@ func NewListDataCatalogsPaginator(client ListDataCatalogsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataCatalogsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataCatalogs page. @@ -196,7 +197,10 @@ func (p *ListDataCatalogsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListDatabases.go b/service/athena/api_op_ListDatabases.go index 3158f41e36c..758d226d611 100644 --- a/service/athena/api_op_ListDatabases.go +++ b/service/athena/api_op_ListDatabases.go @@ -171,12 +171,13 @@ func NewListDatabasesPaginator(client ListDatabasesAPIClient, params *ListDataba client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatabasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatabases page. @@ -203,7 +204,10 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListNamedQueries.go b/service/athena/api_op_ListNamedQueries.go index 9c9c466824b..25909169219 100644 --- a/service/athena/api_op_ListNamedQueries.go +++ b/service/athena/api_op_ListNamedQueries.go @@ -173,12 +173,13 @@ func NewListNamedQueriesPaginator(client ListNamedQueriesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNamedQueriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNamedQueries page. @@ -205,7 +206,10 @@ func (p *ListNamedQueriesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListPreparedStatements.go b/service/athena/api_op_ListPreparedStatements.go index b5f9db4f179..a4d3ae9d09a 100644 --- a/service/athena/api_op_ListPreparedStatements.go +++ b/service/athena/api_op_ListPreparedStatements.go @@ -173,12 +173,13 @@ func NewListPreparedStatementsPaginator(client ListPreparedStatementsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPreparedStatementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPreparedStatements page. @@ -205,7 +206,10 @@ func (p *ListPreparedStatementsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListQueryExecutions.go b/service/athena/api_op_ListQueryExecutions.go index 3988bc66615..6002b32664b 100644 --- a/service/athena/api_op_ListQueryExecutions.go +++ b/service/athena/api_op_ListQueryExecutions.go @@ -173,12 +173,13 @@ func NewListQueryExecutionsPaginator(client ListQueryExecutionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQueryExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQueryExecutions page. @@ -205,7 +206,10 @@ func (p *ListQueryExecutionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListTableMetadata.go b/service/athena/api_op_ListTableMetadata.go index 2cb491cf5eb..4f7495d3bb5 100644 --- a/service/athena/api_op_ListTableMetadata.go +++ b/service/athena/api_op_ListTableMetadata.go @@ -181,12 +181,13 @@ func NewListTableMetadataPaginator(client ListTableMetadataAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTableMetadataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTableMetadata page. @@ -213,7 +214,10 @@ func (p *ListTableMetadataPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListTagsForResource.go b/service/athena/api_op_ListTagsForResource.go index 9fcbbf55969..9b812fb1e76 100644 --- a/service/athena/api_op_ListTagsForResource.go +++ b/service/athena/api_op_ListTagsForResource.go @@ -173,12 +173,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -205,7 +206,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/athena/api_op_ListWorkGroups.go b/service/athena/api_op_ListWorkGroups.go index 70588285aad..d1116b0c36f 100644 --- a/service/athena/api_op_ListWorkGroups.go +++ b/service/athena/api_op_ListWorkGroups.go @@ -165,12 +165,13 @@ func NewListWorkGroupsPaginator(client ListWorkGroupsAPIClient, params *ListWork client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkGroups page. @@ -197,7 +198,10 @@ func (p *ListWorkGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_GetChangeLogs.go b/service/auditmanager/api_op_GetChangeLogs.go index 86ad0d06600..071e4603601 100644 --- a/service/auditmanager/api_op_GetChangeLogs.go +++ b/service/auditmanager/api_op_GetChangeLogs.go @@ -173,12 +173,13 @@ func NewGetChangeLogsPaginator(client GetChangeLogsAPIClient, params *GetChangeL client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetChangeLogsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetChangeLogs page. @@ -205,7 +206,10 @@ func (p *GetChangeLogsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_GetDelegations.go b/service/auditmanager/api_op_GetDelegations.go index c5f8b5575a0..c99f090a884 100644 --- a/service/auditmanager/api_op_GetDelegations.go +++ b/service/auditmanager/api_op_GetDelegations.go @@ -160,12 +160,13 @@ func NewGetDelegationsPaginator(client GetDelegationsAPIClient, params *GetDeleg client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDelegationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDelegations page. @@ -192,7 +193,10 @@ func (p *GetDelegationsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go b/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go index ba0f77421db..11e41e6dca4 100644 --- a/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go +++ b/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go @@ -181,12 +181,13 @@ func NewGetEvidenceByEvidenceFolderPaginator(client GetEvidenceByEvidenceFolderA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEvidenceByEvidenceFolderPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEvidenceByEvidenceFolder page. @@ -213,7 +214,10 @@ func (p *GetEvidenceByEvidenceFolderPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go b/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go index 32942ebf2eb..23c9ddf8215 100644 --- a/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go +++ b/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go @@ -172,12 +172,13 @@ func NewGetEvidenceFoldersByAssessmentPaginator(client GetEvidenceFoldersByAsses client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEvidenceFoldersByAssessmentPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEvidenceFoldersByAssessment page. @@ -204,7 +205,10 @@ func (p *GetEvidenceFoldersByAssessmentPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go b/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go index 984deb05f5f..b6f35b134fa 100644 --- a/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go +++ b/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go @@ -183,12 +183,13 @@ func NewGetEvidenceFoldersByAssessmentControlPaginator(client GetEvidenceFolders client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEvidenceFoldersByAssessmentControlPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEvidenceFoldersByAssessmentControl page. @@ -215,7 +216,10 @@ func (p *GetEvidenceFoldersByAssessmentControlPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go b/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go index e8919a20bcb..ebef81ae2c6 100644 --- a/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go +++ b/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go @@ -182,12 +182,13 @@ func NewListAssessmentControlInsightsByControlDomainPaginator(client ListAssessm client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentControlInsightsByControlDomainPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentControlInsightsByControlDomain page. @@ -214,7 +215,10 @@ func (p *ListAssessmentControlInsightsByControlDomainPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go b/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go index 8bd31f98a23..c039f0a5ceb 100644 --- a/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go +++ b/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go @@ -173,12 +173,13 @@ func NewListAssessmentFrameworkShareRequestsPaginator(client ListAssessmentFrame client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentFrameworkShareRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentFrameworkShareRequests page. @@ -205,7 +206,10 @@ func (p *ListAssessmentFrameworkShareRequestsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListAssessmentFrameworks.go b/service/auditmanager/api_op_ListAssessmentFrameworks.go index 17a7fab0d25..e8cf64e72ca 100644 --- a/service/auditmanager/api_op_ListAssessmentFrameworks.go +++ b/service/auditmanager/api_op_ListAssessmentFrameworks.go @@ -171,12 +171,13 @@ func NewListAssessmentFrameworksPaginator(client ListAssessmentFrameworksAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentFrameworksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentFrameworks page. @@ -203,7 +204,10 @@ func (p *ListAssessmentFrameworksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListAssessmentReports.go b/service/auditmanager/api_op_ListAssessmentReports.go index 20690feb124..d2f79e2989e 100644 --- a/service/auditmanager/api_op_ListAssessmentReports.go +++ b/service/auditmanager/api_op_ListAssessmentReports.go @@ -161,12 +161,13 @@ func NewListAssessmentReportsPaginator(client ListAssessmentReportsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentReportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentReports page. @@ -193,7 +194,10 @@ func (p *ListAssessmentReportsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListAssessments.go b/service/auditmanager/api_op_ListAssessments.go index 43020b18dbc..3b42fa9d365 100644 --- a/service/auditmanager/api_op_ListAssessments.go +++ b/service/auditmanager/api_op_ListAssessments.go @@ -163,12 +163,13 @@ func NewListAssessmentsPaginator(client ListAssessmentsAPIClient, params *ListAs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessments page. @@ -195,7 +196,10 @@ func (p *ListAssessmentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListControlDomainInsights.go b/service/auditmanager/api_op_ListControlDomainInsights.go index 8bfee70f41e..37e638b3d73 100644 --- a/service/auditmanager/api_op_ListControlDomainInsights.go +++ b/service/auditmanager/api_op_ListControlDomainInsights.go @@ -167,12 +167,13 @@ func NewListControlDomainInsightsPaginator(client ListControlDomainInsightsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListControlDomainInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListControlDomainInsights page. @@ -199,7 +200,10 @@ func (p *ListControlDomainInsightsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go b/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go index 405a6cdc951..5f6e7d8a8d7 100644 --- a/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go +++ b/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go @@ -175,12 +175,13 @@ func NewListControlDomainInsightsByAssessmentPaginator(client ListControlDomainI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListControlDomainInsightsByAssessmentPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListControlDomainInsightsByAssessment page. @@ -207,7 +208,10 @@ func (p *ListControlDomainInsightsByAssessmentPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListControlInsightsByControlDomain.go b/service/auditmanager/api_op_ListControlInsightsByControlDomain.go index 90dad95d6e9..fdc05d52b9a 100644 --- a/service/auditmanager/api_op_ListControlInsightsByControlDomain.go +++ b/service/auditmanager/api_op_ListControlInsightsByControlDomain.go @@ -176,12 +176,13 @@ func NewListControlInsightsByControlDomainPaginator(client ListControlInsightsBy client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListControlInsightsByControlDomainPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListControlInsightsByControlDomain page. @@ -208,7 +209,10 @@ func (p *ListControlInsightsByControlDomainPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListControls.go b/service/auditmanager/api_op_ListControls.go index c4f4b2e10ff..589ea823d6d 100644 --- a/service/auditmanager/api_op_ListControls.go +++ b/service/auditmanager/api_op_ListControls.go @@ -167,12 +167,13 @@ func NewListControlsPaginator(client ListControlsAPIClient, params *ListControls client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListControlsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListControls page. @@ -199,7 +200,10 @@ func (p *ListControlsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListKeywordsForDataSource.go b/service/auditmanager/api_op_ListKeywordsForDataSource.go index 88a7b50268e..eea35ed1039 100644 --- a/service/auditmanager/api_op_ListKeywordsForDataSource.go +++ b/service/auditmanager/api_op_ListKeywordsForDataSource.go @@ -171,12 +171,13 @@ func NewListKeywordsForDataSourcePaginator(client ListKeywordsForDataSourceAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKeywordsForDataSourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKeywordsForDataSource page. @@ -203,7 +204,10 @@ func (p *ListKeywordsForDataSourcePaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/auditmanager/api_op_ListNotifications.go b/service/auditmanager/api_op_ListNotifications.go index f2e090967b1..0fee895a4a9 100644 --- a/service/auditmanager/api_op_ListNotifications.go +++ b/service/auditmanager/api_op_ListNotifications.go @@ -160,12 +160,13 @@ func NewListNotificationsPaginator(client ListNotificationsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotificationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotifications page. @@ -192,7 +193,10 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeAutoScalingGroups.go b/service/autoscaling/api_op_DescribeAutoScalingGroups.go index b1ac6526a84..4f3d2f41fcc 100644 --- a/service/autoscaling/api_op_DescribeAutoScalingGroups.go +++ b/service/autoscaling/api_op_DescribeAutoScalingGroups.go @@ -190,12 +190,13 @@ func NewDescribeAutoScalingGroupsPaginator(client DescribeAutoScalingGroupsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAutoScalingGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAutoScalingGroups page. @@ -222,7 +223,10 @@ func (p *DescribeAutoScalingGroupsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeAutoScalingInstances.go b/service/autoscaling/api_op_DescribeAutoScalingInstances.go index d3b80a27ff9..0dfa9b5d223 100644 --- a/service/autoscaling/api_op_DescribeAutoScalingInstances.go +++ b/service/autoscaling/api_op_DescribeAutoScalingInstances.go @@ -174,12 +174,13 @@ func NewDescribeAutoScalingInstancesPaginator(client DescribeAutoScalingInstance client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAutoScalingInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAutoScalingInstances page. @@ -206,7 +207,10 @@ func (p *DescribeAutoScalingInstancesPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeLaunchConfigurations.go b/service/autoscaling/api_op_DescribeLaunchConfigurations.go index 7a05010122c..2bd1e8c4277 100644 --- a/service/autoscaling/api_op_DescribeLaunchConfigurations.go +++ b/service/autoscaling/api_op_DescribeLaunchConfigurations.go @@ -175,12 +175,13 @@ func NewDescribeLaunchConfigurationsPaginator(client DescribeLaunchConfiguration client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLaunchConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLaunchConfigurations page. @@ -207,7 +208,10 @@ func (p *DescribeLaunchConfigurationsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeNotificationConfigurations.go b/service/autoscaling/api_op_DescribeNotificationConfigurations.go index fa91415d588..934654a1c83 100644 --- a/service/autoscaling/api_op_DescribeNotificationConfigurations.go +++ b/service/autoscaling/api_op_DescribeNotificationConfigurations.go @@ -175,12 +175,13 @@ func NewDescribeNotificationConfigurationsPaginator(client DescribeNotificationC client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNotificationConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNotificationConfigurations page. @@ -207,7 +208,10 @@ func (p *DescribeNotificationConfigurationsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribePolicies.go b/service/autoscaling/api_op_DescribePolicies.go index da4ef56e27e..1c329ad7a5b 100644 --- a/service/autoscaling/api_op_DescribePolicies.go +++ b/service/autoscaling/api_op_DescribePolicies.go @@ -179,12 +179,13 @@ func NewDescribePoliciesPaginator(client DescribePoliciesAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePolicies page. @@ -211,7 +212,10 @@ func (p *DescribePoliciesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeScalingActivities.go b/service/autoscaling/api_op_DescribeScalingActivities.go index 199a9dc1e2a..80f8f4f992f 100644 --- a/service/autoscaling/api_op_DescribeScalingActivities.go +++ b/service/autoscaling/api_op_DescribeScalingActivities.go @@ -194,12 +194,13 @@ func NewDescribeScalingActivitiesPaginator(client DescribeScalingActivitiesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScalingActivitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScalingActivities page. @@ -226,7 +227,10 @@ func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeScheduledActions.go b/service/autoscaling/api_op_DescribeScheduledActions.go index 8244cea7ab6..94c7cf6a14b 100644 --- a/service/autoscaling/api_op_DescribeScheduledActions.go +++ b/service/autoscaling/api_op_DescribeScheduledActions.go @@ -187,12 +187,13 @@ func NewDescribeScheduledActionsPaginator(client DescribeScheduledActionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScheduledActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScheduledActions page. @@ -219,7 +220,10 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/autoscaling/api_op_DescribeTags.go b/service/autoscaling/api_op_DescribeTags.go index c2d00595fef..4268b06259e 100644 --- a/service/autoscaling/api_op_DescribeTags.go +++ b/service/autoscaling/api_op_DescribeTags.go @@ -177,12 +177,13 @@ func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTags client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTags page. @@ -209,7 +210,10 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListBackupJobs.go b/service/backup/api_op_ListBackupJobs.go index 351fac54419..8c5512c06e6 100644 --- a/service/backup/api_op_ListBackupJobs.go +++ b/service/backup/api_op_ListBackupJobs.go @@ -215,12 +215,13 @@ func NewListBackupJobsPaginator(client ListBackupJobsAPIClient, params *ListBack client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBackupJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBackupJobs page. @@ -247,7 +248,10 @@ func (p *ListBackupJobsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListBackupPlanTemplates.go b/service/backup/api_op_ListBackupPlanTemplates.go index 3dd8a416555..d7b019c8091 100644 --- a/service/backup/api_op_ListBackupPlanTemplates.go +++ b/service/backup/api_op_ListBackupPlanTemplates.go @@ -169,12 +169,13 @@ func NewListBackupPlanTemplatesPaginator(client ListBackupPlanTemplatesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBackupPlanTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBackupPlanTemplates page. @@ -201,7 +202,10 @@ func (p *ListBackupPlanTemplatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListBackupPlanVersions.go b/service/backup/api_op_ListBackupPlanVersions.go index 01a5d5d379f..9bb5f34a198 100644 --- a/service/backup/api_op_ListBackupPlanVersions.go +++ b/service/backup/api_op_ListBackupPlanVersions.go @@ -177,12 +177,13 @@ func NewListBackupPlanVersionsPaginator(client ListBackupPlanVersionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBackupPlanVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBackupPlanVersions page. @@ -209,7 +210,10 @@ func (p *ListBackupPlanVersionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListBackupPlans.go b/service/backup/api_op_ListBackupPlans.go index e5db06f3d98..99a34127805 100644 --- a/service/backup/api_op_ListBackupPlans.go +++ b/service/backup/api_op_ListBackupPlans.go @@ -173,12 +173,13 @@ func NewListBackupPlansPaginator(client ListBackupPlansAPIClient, params *ListBa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBackupPlansPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBackupPlans page. @@ -205,7 +206,10 @@ func (p *ListBackupPlansPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListBackupSelections.go b/service/backup/api_op_ListBackupSelections.go index 5ee02adf8f2..8d9aebbd7eb 100644 --- a/service/backup/api_op_ListBackupSelections.go +++ b/service/backup/api_op_ListBackupSelections.go @@ -177,12 +177,13 @@ func NewListBackupSelectionsPaginator(client ListBackupSelectionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBackupSelectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBackupSelections page. @@ -209,7 +210,10 @@ func (p *ListBackupSelectionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListBackupVaults.go b/service/backup/api_op_ListBackupVaults.go index 504e2507a5d..8ea13051ac2 100644 --- a/service/backup/api_op_ListBackupVaults.go +++ b/service/backup/api_op_ListBackupVaults.go @@ -170,12 +170,13 @@ func NewListBackupVaultsPaginator(client ListBackupVaultsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBackupVaultsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBackupVaults page. @@ -202,7 +203,10 @@ func (p *ListBackupVaultsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListCopyJobs.go b/service/backup/api_op_ListCopyJobs.go index de229fcf443..73f444384d0 100644 --- a/service/backup/api_op_ListCopyJobs.go +++ b/service/backup/api_op_ListCopyJobs.go @@ -210,12 +210,13 @@ func NewListCopyJobsPaginator(client ListCopyJobsAPIClient, params *ListCopyJobs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCopyJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCopyJobs page. @@ -242,7 +243,10 @@ func (p *ListCopyJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListFrameworks.go b/service/backup/api_op_ListFrameworks.go index e0f4ed659a8..ca0f9eddf67 100644 --- a/service/backup/api_op_ListFrameworks.go +++ b/service/backup/api_op_ListFrameworks.go @@ -167,12 +167,13 @@ func NewListFrameworksPaginator(client ListFrameworksAPIClient, params *ListFram client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFrameworksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFrameworks page. @@ -199,7 +200,10 @@ func (p *ListFrameworksPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListProtectedResources.go b/service/backup/api_op_ListProtectedResources.go index 2a15ccb3520..348c3b36e1a 100644 --- a/service/backup/api_op_ListProtectedResources.go +++ b/service/backup/api_op_ListProtectedResources.go @@ -171,12 +171,13 @@ func NewListProtectedResourcesPaginator(client ListProtectedResourcesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProtectedResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProtectedResources page. @@ -203,7 +204,10 @@ func (p *ListProtectedResourcesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListRecoveryPointsByBackupVault.go b/service/backup/api_op_ListRecoveryPointsByBackupVault.go index 0cd61330bc1..1bfd18996ed 100644 --- a/service/backup/api_op_ListRecoveryPointsByBackupVault.go +++ b/service/backup/api_op_ListRecoveryPointsByBackupVault.go @@ -199,12 +199,13 @@ func NewListRecoveryPointsByBackupVaultPaginator(client ListRecoveryPointsByBack client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecoveryPointsByBackupVaultPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecoveryPointsByBackupVault page. @@ -231,7 +232,10 @@ func (p *ListRecoveryPointsByBackupVaultPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListRecoveryPointsByResource.go b/service/backup/api_op_ListRecoveryPointsByResource.go index 5b7b2d92653..cd3b50384de 100644 --- a/service/backup/api_op_ListRecoveryPointsByResource.go +++ b/service/backup/api_op_ListRecoveryPointsByResource.go @@ -184,12 +184,13 @@ func NewListRecoveryPointsByResourcePaginator(client ListRecoveryPointsByResourc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecoveryPointsByResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecoveryPointsByResource page. @@ -216,7 +217,10 @@ func (p *ListRecoveryPointsByResourcePaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListReportJobs.go b/service/backup/api_op_ListReportJobs.go index 6e0deab8743..3fe97a9b42e 100644 --- a/service/backup/api_op_ListReportJobs.go +++ b/service/backup/api_op_ListReportJobs.go @@ -182,12 +182,13 @@ func NewListReportJobsPaginator(client ListReportJobsAPIClient, params *ListRepo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReportJobs page. @@ -214,7 +215,10 @@ func (p *ListReportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListReportPlans.go b/service/backup/api_op_ListReportPlans.go index 4b3f5148954..60240f0e550 100644 --- a/service/backup/api_op_ListReportPlans.go +++ b/service/backup/api_op_ListReportPlans.go @@ -168,12 +168,13 @@ func NewListReportPlansPaginator(client ListReportPlansAPIClient, params *ListRe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReportPlansPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReportPlans page. @@ -200,7 +201,10 @@ func (p *ListReportPlansPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListRestoreJobs.go b/service/backup/api_op_ListRestoreJobs.go index 190085d790d..46f28d65e1d 100644 --- a/service/backup/api_op_ListRestoreJobs.go +++ b/service/backup/api_op_ListRestoreJobs.go @@ -182,12 +182,13 @@ func NewListRestoreJobsPaginator(client ListRestoreJobsAPIClient, params *ListRe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRestoreJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRestoreJobs page. @@ -214,7 +215,10 @@ func (p *ListRestoreJobsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backup/api_op_ListTags.go b/service/backup/api_op_ListTags.go index 7f5575347f4..37f2d34fbc3 100644 --- a/service/backup/api_op_ListTags.go +++ b/service/backup/api_op_ListTags.go @@ -177,12 +177,13 @@ func NewListTagsPaginator(client ListTagsAPIClient, params *ListTagsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTags page. @@ -209,7 +210,10 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backupgateway/api_op_ListGateways.go b/service/backupgateway/api_op_ListGateways.go index 66ad944ad0e..38126a181f8 100644 --- a/service/backupgateway/api_op_ListGateways.go +++ b/service/backupgateway/api_op_ListGateways.go @@ -167,12 +167,13 @@ func NewListGatewaysPaginator(client ListGatewaysAPIClient, params *ListGateways client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGateways page. @@ -199,7 +200,10 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backupgateway/api_op_ListHypervisors.go b/service/backupgateway/api_op_ListHypervisors.go index 709f32221c8..f6bc7889bdc 100644 --- a/service/backupgateway/api_op_ListHypervisors.go +++ b/service/backupgateway/api_op_ListHypervisors.go @@ -167,12 +167,13 @@ func NewListHypervisorsPaginator(client ListHypervisorsAPIClient, params *ListHy client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHypervisorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHypervisors page. @@ -199,7 +200,10 @@ func (p *ListHypervisorsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/backupgateway/api_op_ListVirtualMachines.go b/service/backupgateway/api_op_ListVirtualMachines.go index e27cc7713ae..0839d61bf0e 100644 --- a/service/backupgateway/api_op_ListVirtualMachines.go +++ b/service/backupgateway/api_op_ListVirtualMachines.go @@ -168,12 +168,13 @@ func NewListVirtualMachinesPaginator(client ListVirtualMachinesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualMachinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualMachines page. @@ -200,7 +201,10 @@ func (p *ListVirtualMachinesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/batch/api_op_DescribeComputeEnvironments.go b/service/batch/api_op_DescribeComputeEnvironments.go index a672360086d..5664475d44e 100644 --- a/service/batch/api_op_DescribeComputeEnvironments.go +++ b/service/batch/api_op_DescribeComputeEnvironments.go @@ -194,12 +194,13 @@ func NewDescribeComputeEnvironmentsPaginator(client DescribeComputeEnvironmentsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeComputeEnvironmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeComputeEnvironments page. @@ -222,7 +223,10 @@ func (p *DescribeComputeEnvironmentsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/batch/api_op_DescribeJobDefinitions.go b/service/batch/api_op_DescribeJobDefinitions.go index f53bd8c54ed..f66c278b934 100644 --- a/service/batch/api_op_DescribeJobDefinitions.go +++ b/service/batch/api_op_DescribeJobDefinitions.go @@ -195,12 +195,13 @@ func NewDescribeJobDefinitionsPaginator(client DescribeJobDefinitionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeJobDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeJobDefinitions page. @@ -223,7 +224,10 @@ func (p *DescribeJobDefinitionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/batch/api_op_DescribeJobQueues.go b/service/batch/api_op_DescribeJobQueues.go index 6152ce937ba..bff9fab8df7 100644 --- a/service/batch/api_op_DescribeJobQueues.go +++ b/service/batch/api_op_DescribeJobQueues.go @@ -185,12 +185,13 @@ func NewDescribeJobQueuesPaginator(client DescribeJobQueuesAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeJobQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeJobQueues page. @@ -213,7 +214,10 @@ func (p *DescribeJobQueuesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/batch/api_op_ListJobs.go b/service/batch/api_op_ListJobs.go index 1b43fb154ff..ced653d92b2 100644 --- a/service/batch/api_op_ListJobs.go +++ b/service/batch/api_op_ListJobs.go @@ -242,12 +242,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -270,7 +271,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/batch/api_op_ListSchedulingPolicies.go b/service/batch/api_op_ListSchedulingPolicies.go index a47de872ddb..e17b92a7f53 100644 --- a/service/batch/api_op_ListSchedulingPolicies.go +++ b/service/batch/api_op_ListSchedulingPolicies.go @@ -182,12 +182,13 @@ func NewListSchedulingPoliciesPaginator(client ListSchedulingPoliciesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchedulingPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchedulingPolicies page. @@ -210,7 +211,10 @@ func (p *ListSchedulingPoliciesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/braket/api_op_SearchDevices.go b/service/braket/api_op_SearchDevices.go index 8a0afe657b4..723a27bd0f1 100644 --- a/service/braket/api_op_SearchDevices.go +++ b/service/braket/api_op_SearchDevices.go @@ -174,12 +174,13 @@ func NewSearchDevicesPaginator(client SearchDevicesAPIClient, params *SearchDevi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchDevices page. @@ -206,7 +207,10 @@ func (p *SearchDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/braket/api_op_SearchJobs.go b/service/braket/api_op_SearchJobs.go index ad6abbfcb32..40dfb795b93 100644 --- a/service/braket/api_op_SearchJobs.go +++ b/service/braket/api_op_SearchJobs.go @@ -174,12 +174,13 @@ func NewSearchJobsPaginator(client SearchJobsAPIClient, params *SearchJobsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchJobs page. @@ -206,7 +207,10 @@ func (p *SearchJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/braket/api_op_SearchQuantumTasks.go b/service/braket/api_op_SearchQuantumTasks.go index da3ec060846..76bdc6c6777 100644 --- a/service/braket/api_op_SearchQuantumTasks.go +++ b/service/braket/api_op_SearchQuantumTasks.go @@ -176,12 +176,13 @@ func NewSearchQuantumTasksPaginator(client SearchQuantumTasksAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchQuantumTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchQuantumTasks page. @@ -208,7 +209,10 @@ func (p *SearchQuantumTasksPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeBudgetActionHistories.go b/service/budgets/api_op_DescribeBudgetActionHistories.go index 11952489d8a..cf3337d4c90 100644 --- a/service/budgets/api_op_DescribeBudgetActionHistories.go +++ b/service/budgets/api_op_DescribeBudgetActionHistories.go @@ -191,12 +191,13 @@ func NewDescribeBudgetActionHistoriesPaginator(client DescribeBudgetActionHistor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBudgetActionHistoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBudgetActionHistories page. @@ -223,7 +224,10 @@ func (p *DescribeBudgetActionHistoriesPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeBudgetActionsForAccount.go b/service/budgets/api_op_DescribeBudgetActionsForAccount.go index 58c68b7a2b7..c76aec9d88e 100644 --- a/service/budgets/api_op_DescribeBudgetActionsForAccount.go +++ b/service/budgets/api_op_DescribeBudgetActionsForAccount.go @@ -175,12 +175,13 @@ func NewDescribeBudgetActionsForAccountPaginator(client DescribeBudgetActionsFor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBudgetActionsForAccountPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBudgetActionsForAccount page. @@ -207,7 +208,10 @@ func (p *DescribeBudgetActionsForAccountPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeBudgetActionsForBudget.go b/service/budgets/api_op_DescribeBudgetActionsForBudget.go index ec86dcf8c85..2ac6e95d5df 100644 --- a/service/budgets/api_op_DescribeBudgetActionsForBudget.go +++ b/service/budgets/api_op_DescribeBudgetActionsForBudget.go @@ -181,12 +181,13 @@ func NewDescribeBudgetActionsForBudgetPaginator(client DescribeBudgetActionsForB client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBudgetActionsForBudgetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBudgetActionsForBudget page. @@ -213,7 +214,10 @@ func (p *DescribeBudgetActionsForBudgetPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeBudgetPerformanceHistory.go b/service/budgets/api_op_DescribeBudgetPerformanceHistory.go index 83519e38bde..320900679e5 100644 --- a/service/budgets/api_op_DescribeBudgetPerformanceHistory.go +++ b/service/budgets/api_op_DescribeBudgetPerformanceHistory.go @@ -188,12 +188,13 @@ func NewDescribeBudgetPerformanceHistoryPaginator(client DescribeBudgetPerforman client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBudgetPerformanceHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBudgetPerformanceHistory page. @@ -220,7 +221,10 @@ func (p *DescribeBudgetPerformanceHistoryPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeBudgets.go b/service/budgets/api_op_DescribeBudgets.go index cd5987f78fb..f2da9814cfe 100644 --- a/service/budgets/api_op_DescribeBudgets.go +++ b/service/budgets/api_op_DescribeBudgets.go @@ -177,12 +177,13 @@ func NewDescribeBudgetsPaginator(client DescribeBudgetsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBudgetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBudgets page. @@ -209,7 +210,10 @@ func (p *DescribeBudgetsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeNotificationsForBudget.go b/service/budgets/api_op_DescribeNotificationsForBudget.go index 89dc6fb48e9..a778703c739 100644 --- a/service/budgets/api_op_DescribeNotificationsForBudget.go +++ b/service/budgets/api_op_DescribeNotificationsForBudget.go @@ -183,12 +183,13 @@ func NewDescribeNotificationsForBudgetPaginator(client DescribeNotificationsForB client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNotificationsForBudgetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNotificationsForBudget page. @@ -215,7 +216,10 @@ func (p *DescribeNotificationsForBudgetPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/budgets/api_op_DescribeSubscribersForNotification.go b/service/budgets/api_op_DescribeSubscribersForNotification.go index 23dfbbdeb47..a979e6de1b6 100644 --- a/service/budgets/api_op_DescribeSubscribersForNotification.go +++ b/service/budgets/api_op_DescribeSubscribersForNotification.go @@ -188,12 +188,13 @@ func NewDescribeSubscribersForNotificationPaginator(client DescribeSubscribersFo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSubscribersForNotificationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSubscribersForNotification page. @@ -220,7 +221,10 @@ func (p *DescribeSubscribersForNotificationPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListAccounts.go b/service/chime/api_op_ListAccounts.go index 54567051bcf..6559c662675 100644 --- a/service/chime/api_op_ListAccounts.go +++ b/service/chime/api_op_ListAccounts.go @@ -168,12 +168,13 @@ func NewListAccountsPaginator(client ListAccountsAPIClient, params *ListAccounts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccounts page. @@ -200,7 +201,10 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListAppInstanceAdmins.go b/service/chime/api_op_ListAppInstanceAdmins.go index a76eb591cfa..659faaa3c4b 100644 --- a/service/chime/api_op_ListAppInstanceAdmins.go +++ b/service/chime/api_op_ListAppInstanceAdmins.go @@ -204,12 +204,13 @@ func NewListAppInstanceAdminsPaginator(client ListAppInstanceAdminsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstanceAdminsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstanceAdmins page. @@ -236,7 +237,10 @@ func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListAppInstanceUsers.go b/service/chime/api_op_ListAppInstanceUsers.go index e31ac36ab4f..6fdf3f51529 100644 --- a/service/chime/api_op_ListAppInstanceUsers.go +++ b/service/chime/api_op_ListAppInstanceUsers.go @@ -202,12 +202,13 @@ func NewListAppInstanceUsersPaginator(client ListAppInstanceUsersAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstanceUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstanceUsers page. @@ -234,7 +235,10 @@ func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListAppInstances.go b/service/chime/api_op_ListAppInstances.go index 12629404d33..cbf4f5bb72e 100644 --- a/service/chime/api_op_ListAppInstances.go +++ b/service/chime/api_op_ListAppInstances.go @@ -192,12 +192,13 @@ func NewListAppInstancesPaginator(client ListAppInstancesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstances page. @@ -224,7 +225,10 @@ func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListAttendees.go b/service/chime/api_op_ListAttendees.go index e654b9b24ef..9a9f20f439f 100644 --- a/service/chime/api_op_ListAttendees.go +++ b/service/chime/api_op_ListAttendees.go @@ -170,12 +170,13 @@ func NewListAttendeesPaginator(client ListAttendeesAPIClient, params *ListAttend client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttendeesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttendees page. @@ -202,7 +203,10 @@ func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListBots.go b/service/chime/api_op_ListBots.go index 53e92e49275..3aaf570e7f6 100644 --- a/service/chime/api_op_ListBots.go +++ b/service/chime/api_op_ListBots.go @@ -168,12 +168,13 @@ func NewListBotsPaginator(client ListBotsAPIClient, params *ListBotsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBots page. @@ -200,7 +201,10 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannelBans.go b/service/chime/api_op_ListChannelBans.go index 9512e3b8124..b074f5cfe22 100644 --- a/service/chime/api_op_ListChannelBans.go +++ b/service/chime/api_op_ListChannelBans.go @@ -206,12 +206,13 @@ func NewListChannelBansPaginator(client ListChannelBansAPIClient, params *ListCh client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelBansPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelBans page. @@ -238,7 +239,10 @@ func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannelMemberships.go b/service/chime/api_op_ListChannelMemberships.go index 3cfb36d2d22..dd00fabc68d 100644 --- a/service/chime/api_op_ListChannelMemberships.go +++ b/service/chime/api_op_ListChannelMemberships.go @@ -215,12 +215,13 @@ func NewListChannelMembershipsPaginator(client ListChannelMembershipsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelMembershipsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelMemberships page. @@ -247,7 +248,10 @@ func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go b/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go index 04496b55952..fe7e8cab4a4 100644 --- a/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go +++ b/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go @@ -203,12 +203,13 @@ func NewListChannelMembershipsForAppInstanceUserPaginator(client ListChannelMemb client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelMembershipsForAppInstanceUserPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelMembershipsForAppInstanceUser page. @@ -235,7 +236,10 @@ func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannelMessages.go b/service/chime/api_op_ListChannelMessages.go index 1a57ca6b1f4..4c842111611 100644 --- a/service/chime/api_op_ListChannelMessages.go +++ b/service/chime/api_op_ListChannelMessages.go @@ -224,12 +224,13 @@ func NewListChannelMessagesPaginator(client ListChannelMessagesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelMessagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelMessages page. @@ -256,7 +257,10 @@ func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannelModerators.go b/service/chime/api_op_ListChannelModerators.go index 0a63826e6ee..f9e11dce450 100644 --- a/service/chime/api_op_ListChannelModerators.go +++ b/service/chime/api_op_ListChannelModerators.go @@ -209,12 +209,13 @@ func NewListChannelModeratorsPaginator(client ListChannelModeratorsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelModeratorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelModerators page. @@ -241,7 +242,10 @@ func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannels.go b/service/chime/api_op_ListChannels.go index 9a69bf5d55e..5a249384172 100644 --- a/service/chime/api_op_ListChannels.go +++ b/service/chime/api_op_ListChannels.go @@ -218,12 +218,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -250,7 +251,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go b/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go index 45fe8d40a90..68e4bd4854d 100644 --- a/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go +++ b/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go @@ -203,12 +203,13 @@ func NewListChannelsModeratedByAppInstanceUserPaginator(client ListChannelsModer client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsModeratedByAppInstanceUserPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelsModeratedByAppInstanceUser page. @@ -235,7 +236,10 @@ func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListMediaCapturePipelines.go b/service/chime/api_op_ListMediaCapturePipelines.go index 07c87d8310f..d206c1ed28a 100644 --- a/service/chime/api_op_ListMediaCapturePipelines.go +++ b/service/chime/api_op_ListMediaCapturePipelines.go @@ -162,12 +162,13 @@ func NewListMediaCapturePipelinesPaginator(client ListMediaCapturePipelinesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMediaCapturePipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMediaCapturePipelines page. @@ -194,7 +195,10 @@ func (p *ListMediaCapturePipelinesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListMeetings.go b/service/chime/api_op_ListMeetings.go index cbf063b914a..67c3a0ca90b 100644 --- a/service/chime/api_op_ListMeetings.go +++ b/service/chime/api_op_ListMeetings.go @@ -162,12 +162,13 @@ func NewListMeetingsPaginator(client ListMeetingsAPIClient, params *ListMeetings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMeetingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMeetings page. @@ -194,7 +195,10 @@ func (p *ListMeetingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListPhoneNumberOrders.go b/service/chime/api_op_ListPhoneNumberOrders.go index c1e27269182..a8d1b16a7e5 100644 --- a/service/chime/api_op_ListPhoneNumberOrders.go +++ b/service/chime/api_op_ListPhoneNumberOrders.go @@ -161,12 +161,13 @@ func NewListPhoneNumberOrdersPaginator(client ListPhoneNumberOrdersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPhoneNumberOrdersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPhoneNumberOrders page. @@ -193,7 +194,10 @@ func (p *ListPhoneNumberOrdersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListPhoneNumbers.go b/service/chime/api_op_ListPhoneNumbers.go index 4abc8f7f559..5512795676b 100644 --- a/service/chime/api_op_ListPhoneNumbers.go +++ b/service/chime/api_op_ListPhoneNumbers.go @@ -173,12 +173,13 @@ func NewListPhoneNumbersPaginator(client ListPhoneNumbersAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPhoneNumbersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPhoneNumbers page. @@ -205,7 +206,10 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListProxySessions.go b/service/chime/api_op_ListProxySessions.go index b660a69572a..d66ebc92a25 100644 --- a/service/chime/api_op_ListProxySessions.go +++ b/service/chime/api_op_ListProxySessions.go @@ -171,12 +171,13 @@ func NewListProxySessionsPaginator(client ListProxySessionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProxySessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProxySessions page. @@ -203,7 +204,10 @@ func (p *ListProxySessionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListRoomMemberships.go b/service/chime/api_op_ListRoomMemberships.go index c725c3c46bc..d9cc0a2b6fa 100644 --- a/service/chime/api_op_ListRoomMemberships.go +++ b/service/chime/api_op_ListRoomMemberships.go @@ -175,12 +175,13 @@ func NewListRoomMembershipsPaginator(client ListRoomMembershipsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoomMembershipsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoomMemberships page. @@ -207,7 +208,10 @@ func (p *ListRoomMembershipsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListRooms.go b/service/chime/api_op_ListRooms.go index a72b73dd015..ffffdb6ca5f 100644 --- a/service/chime/api_op_ListRooms.go +++ b/service/chime/api_op_ListRooms.go @@ -172,12 +172,13 @@ func NewListRoomsPaginator(client ListRoomsAPIClient, params *ListRoomsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoomsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRooms page. @@ -204,7 +205,10 @@ func (p *ListRoomsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListSipMediaApplications.go b/service/chime/api_op_ListSipMediaApplications.go index af2067394cd..227040f0adc 100644 --- a/service/chime/api_op_ListSipMediaApplications.go +++ b/service/chime/api_op_ListSipMediaApplications.go @@ -162,12 +162,13 @@ func NewListSipMediaApplicationsPaginator(client ListSipMediaApplicationsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSipMediaApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSipMediaApplications page. @@ -194,7 +195,10 @@ func (p *ListSipMediaApplicationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListSipRules.go b/service/chime/api_op_ListSipRules.go index 213d92d6dc7..49cb52f178d 100644 --- a/service/chime/api_op_ListSipRules.go +++ b/service/chime/api_op_ListSipRules.go @@ -162,12 +162,13 @@ func NewListSipRulesPaginator(client ListSipRulesAPIClient, params *ListSipRules client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSipRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSipRules page. @@ -194,7 +195,10 @@ func (p *ListSipRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListUsers.go b/service/chime/api_op_ListUsers.go index 11af8876911..a734e0da8ca 100644 --- a/service/chime/api_op_ListUsers.go +++ b/service/chime/api_op_ListUsers.go @@ -175,12 +175,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -207,7 +208,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListVoiceConnectorGroups.go b/service/chime/api_op_ListVoiceConnectorGroups.go index ecd7c1de363..adaa13d6873 100644 --- a/service/chime/api_op_ListVoiceConnectorGroups.go +++ b/service/chime/api_op_ListVoiceConnectorGroups.go @@ -163,12 +163,13 @@ func NewListVoiceConnectorGroupsPaginator(client ListVoiceConnectorGroupsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVoiceConnectorGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVoiceConnectorGroups page. @@ -195,7 +196,10 @@ func (p *ListVoiceConnectorGroupsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_ListVoiceConnectors.go b/service/chime/api_op_ListVoiceConnectors.go index 3641904aae0..d9445ea29ca 100644 --- a/service/chime/api_op_ListVoiceConnectors.go +++ b/service/chime/api_op_ListVoiceConnectors.go @@ -161,12 +161,13 @@ func NewListVoiceConnectorsPaginator(client ListVoiceConnectorsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVoiceConnectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVoiceConnectors page. @@ -193,7 +194,10 @@ func (p *ListVoiceConnectorsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chime/api_op_SearchAvailablePhoneNumbers.go b/service/chime/api_op_SearchAvailablePhoneNumbers.go index 195f8747aa2..e2a34146503 100644 --- a/service/chime/api_op_SearchAvailablePhoneNumbers.go +++ b/service/chime/api_op_SearchAvailablePhoneNumbers.go @@ -186,12 +186,13 @@ func NewSearchAvailablePhoneNumbersPaginator(client SearchAvailablePhoneNumbersA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchAvailablePhoneNumbersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchAvailablePhoneNumbers page. @@ -218,7 +219,10 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go b/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go index 97c14cbd254..f7c8c739a23 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go @@ -174,12 +174,13 @@ func NewListAppInstanceAdminsPaginator(client ListAppInstanceAdminsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstanceAdminsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstanceAdmins page. @@ -206,7 +207,10 @@ func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go b/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go index 62e91b74bc8..9b3d0b0e55c 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go @@ -173,12 +173,13 @@ func NewListAppInstanceUserEndpointsPaginator(client ListAppInstanceUserEndpoint client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstanceUserEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstanceUserEndpoints page. @@ -205,7 +206,10 @@ func (p *ListAppInstanceUserEndpointsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkidentity/api_op_ListAppInstanceUsers.go b/service/chimesdkidentity/api_op_ListAppInstanceUsers.go index 9cb534f8602..0c792497306 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceUsers.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceUsers.go @@ -172,12 +172,13 @@ func NewListAppInstanceUsersPaginator(client ListAppInstanceUsersAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstanceUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstanceUsers page. @@ -204,7 +205,10 @@ func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkidentity/api_op_ListAppInstances.go b/service/chimesdkidentity/api_op_ListAppInstances.go index bd252aae2c0..37a26c65270 100644 --- a/service/chimesdkidentity/api_op_ListAppInstances.go +++ b/service/chimesdkidentity/api_op_ListAppInstances.go @@ -162,12 +162,13 @@ func NewListAppInstancesPaginator(client ListAppInstancesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppInstances page. @@ -194,7 +195,10 @@ func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmeetings/api_op_ListAttendees.go b/service/chimesdkmeetings/api_op_ListAttendees.go index a894658d8b3..f222360bbbe 100644 --- a/service/chimesdkmeetings/api_op_ListAttendees.go +++ b/service/chimesdkmeetings/api_op_ListAttendees.go @@ -170,12 +170,13 @@ func NewListAttendeesPaginator(client ListAttendeesAPIClient, params *ListAttend client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttendeesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttendees page. @@ -202,7 +203,10 @@ func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelBans.go b/service/chimesdkmessaging/api_op_ListChannelBans.go index 0544bc36016..e26358343b4 100644 --- a/service/chimesdkmessaging/api_op_ListChannelBans.go +++ b/service/chimesdkmessaging/api_op_ListChannelBans.go @@ -178,12 +178,13 @@ func NewListChannelBansPaginator(client ListChannelBansAPIClient, params *ListCh client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelBansPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelBans page. @@ -210,7 +211,10 @@ func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelFlows.go b/service/chimesdkmessaging/api_op_ListChannelFlows.go index 28f78ce817d..1cf7724809c 100644 --- a/service/chimesdkmessaging/api_op_ListChannelFlows.go +++ b/service/chimesdkmessaging/api_op_ListChannelFlows.go @@ -171,12 +171,13 @@ func NewListChannelFlowsPaginator(client ListChannelFlowsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelFlowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelFlows page. @@ -203,7 +204,10 @@ func (p *ListChannelFlowsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelMemberships.go b/service/chimesdkmessaging/api_op_ListChannelMemberships.go index 4df7fd80bd2..e8bb8783491 100644 --- a/service/chimesdkmessaging/api_op_ListChannelMemberships.go +++ b/service/chimesdkmessaging/api_op_ListChannelMemberships.go @@ -191,12 +191,13 @@ func NewListChannelMembershipsPaginator(client ListChannelMembershipsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelMembershipsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelMemberships page. @@ -223,7 +224,10 @@ func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go b/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go index a4137115006..a5182c2ee76 100644 --- a/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go +++ b/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go @@ -178,12 +178,13 @@ func NewListChannelMembershipsForAppInstanceUserPaginator(client ListChannelMemb client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelMembershipsForAppInstanceUserPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelMembershipsForAppInstanceUser page. @@ -210,7 +211,10 @@ func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelMessages.go b/service/chimesdkmessaging/api_op_ListChannelMessages.go index 085332dc871..b3d003de7aa 100644 --- a/service/chimesdkmessaging/api_op_ListChannelMessages.go +++ b/service/chimesdkmessaging/api_op_ListChannelMessages.go @@ -196,12 +196,13 @@ func NewListChannelMessagesPaginator(client ListChannelMessagesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelMessagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelMessages page. @@ -228,7 +229,10 @@ func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelModerators.go b/service/chimesdkmessaging/api_op_ListChannelModerators.go index fec212b93b4..f9c5a8996b7 100644 --- a/service/chimesdkmessaging/api_op_ListChannelModerators.go +++ b/service/chimesdkmessaging/api_op_ListChannelModerators.go @@ -181,12 +181,13 @@ func NewListChannelModeratorsPaginator(client ListChannelModeratorsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelModeratorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelModerators page. @@ -213,7 +214,10 @@ func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannels.go b/service/chimesdkmessaging/api_op_ListChannels.go index cd80a78599a..f707de05f37 100644 --- a/service/chimesdkmessaging/api_op_ListChannels.go +++ b/service/chimesdkmessaging/api_op_ListChannels.go @@ -190,12 +190,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -222,7 +223,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go b/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go index 18e7fa65586..3012cfd7547 100644 --- a/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go +++ b/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go @@ -175,12 +175,13 @@ func NewListChannelsAssociatedWithChannelFlowPaginator(client ListChannelsAssoci client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsAssociatedWithChannelFlowPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelsAssociatedWithChannelFlow page. @@ -207,7 +208,10 @@ func (p *ListChannelsAssociatedWithChannelFlowPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go b/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go index 77cc40bd767..78d008e490d 100644 --- a/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go +++ b/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go @@ -178,12 +178,13 @@ func NewListChannelsModeratedByAppInstanceUserPaginator(client ListChannelsModer client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsModeratedByAppInstanceUserPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannelsModeratedByAppInstanceUser page. @@ -210,7 +211,10 @@ func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloud9/api_op_DescribeEnvironmentMemberships.go b/service/cloud9/api_op_DescribeEnvironmentMemberships.go index bba80421bc0..6ed5c67e262 100644 --- a/service/cloud9/api_op_DescribeEnvironmentMemberships.go +++ b/service/cloud9/api_op_DescribeEnvironmentMemberships.go @@ -195,12 +195,13 @@ func NewDescribeEnvironmentMembershipsPaginator(client DescribeEnvironmentMember client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEnvironmentMembershipsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEnvironmentMemberships page. @@ -227,7 +228,10 @@ func (p *DescribeEnvironmentMembershipsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloud9/api_op_ListEnvironments.go b/service/cloud9/api_op_ListEnvironments.go index a8a08484d75..64e9d2fbb30 100644 --- a/service/cloud9/api_op_ListEnvironments.go +++ b/service/cloud9/api_op_ListEnvironments.go @@ -167,12 +167,13 @@ func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironments page. @@ -199,7 +200,10 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudcontrol/api_op_ListResourceRequests.go b/service/cloudcontrol/api_op_ListResourceRequests.go index e811c2c7397..f8e9bbb3833 100644 --- a/service/cloudcontrol/api_op_ListResourceRequests.go +++ b/service/cloudcontrol/api_op_ListResourceRequests.go @@ -182,12 +182,13 @@ func NewListResourceRequestsPaginator(client ListResourceRequestsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceRequests page. @@ -214,7 +215,10 @@ func (p *ListResourceRequestsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudcontrol/api_op_ListResources.go b/service/cloudcontrol/api_op_ListResources.go index e7c5bfa1456..7ee262e3c55 100644 --- a/service/cloudcontrol/api_op_ListResources.go +++ b/service/cloudcontrol/api_op_ListResources.go @@ -210,12 +210,13 @@ func NewListResourcesPaginator(client ListResourcesAPIClient, params *ListResour client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResources page. @@ -242,7 +243,10 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListAppliedSchemaArns.go b/service/clouddirectory/api_op_ListAppliedSchemaArns.go index 96ccc9e4df8..9be60f1462c 100644 --- a/service/clouddirectory/api_op_ListAppliedSchemaArns.go +++ b/service/clouddirectory/api_op_ListAppliedSchemaArns.go @@ -173,12 +173,13 @@ func NewListAppliedSchemaArnsPaginator(client ListAppliedSchemaArnsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppliedSchemaArnsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppliedSchemaArns page. @@ -205,7 +206,10 @@ func (p *ListAppliedSchemaArnsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListAttachedIndices.go b/service/clouddirectory/api_op_ListAttachedIndices.go index c3debd31e06..fb32f606b88 100644 --- a/service/clouddirectory/api_op_ListAttachedIndices.go +++ b/service/clouddirectory/api_op_ListAttachedIndices.go @@ -177,12 +177,13 @@ func NewListAttachedIndicesPaginator(client ListAttachedIndicesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttachedIndicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttachedIndices page. @@ -209,7 +210,10 @@ func (p *ListAttachedIndicesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go b/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go index 5d6e3192c8f..90c22c7e8a6 100644 --- a/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go +++ b/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go @@ -161,12 +161,13 @@ func NewListDevelopmentSchemaArnsPaginator(client ListDevelopmentSchemaArnsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevelopmentSchemaArnsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevelopmentSchemaArns page. @@ -193,7 +194,10 @@ func (p *ListDevelopmentSchemaArnsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListDirectories.go b/service/clouddirectory/api_op_ListDirectories.go index 10cc59ebecf..153fb009cb9 100644 --- a/service/clouddirectory/api_op_ListDirectories.go +++ b/service/clouddirectory/api_op_ListDirectories.go @@ -167,12 +167,13 @@ func NewListDirectoriesPaginator(client ListDirectoriesAPIClient, params *ListDi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDirectoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDirectories page. @@ -199,7 +200,10 @@ func (p *ListDirectoriesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListFacetAttributes.go b/service/clouddirectory/api_op_ListFacetAttributes.go index e7403992c10..d25e65953b6 100644 --- a/service/clouddirectory/api_op_ListFacetAttributes.go +++ b/service/clouddirectory/api_op_ListFacetAttributes.go @@ -174,12 +174,13 @@ func NewListFacetAttributesPaginator(client ListFacetAttributesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFacetAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFacetAttributes page. @@ -206,7 +207,10 @@ func (p *ListFacetAttributesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListFacetNames.go b/service/clouddirectory/api_op_ListFacetNames.go index 270f1caf1dd..b9b629304cc 100644 --- a/service/clouddirectory/api_op_ListFacetNames.go +++ b/service/clouddirectory/api_op_ListFacetNames.go @@ -167,12 +167,13 @@ func NewListFacetNamesPaginator(client ListFacetNamesAPIClient, params *ListFace client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFacetNamesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFacetNames page. @@ -199,7 +200,10 @@ func (p *ListFacetNamesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListIndex.go b/service/clouddirectory/api_op_ListIndex.go index 868d0a86c30..041613af6f5 100644 --- a/service/clouddirectory/api_op_ListIndex.go +++ b/service/clouddirectory/api_op_ListIndex.go @@ -182,12 +182,13 @@ func NewListIndexPaginator(client ListIndexAPIClient, params *ListIndexInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIndexPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIndex page. @@ -214,7 +215,10 @@ func (p *ListIndexPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListManagedSchemaArns.go b/service/clouddirectory/api_op_ListManagedSchemaArns.go index c4a838c2c50..7ffa4aa4458 100644 --- a/service/clouddirectory/api_op_ListManagedSchemaArns.go +++ b/service/clouddirectory/api_op_ListManagedSchemaArns.go @@ -166,12 +166,13 @@ func NewListManagedSchemaArnsPaginator(client ListManagedSchemaArnsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListManagedSchemaArnsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListManagedSchemaArns page. @@ -198,7 +199,10 @@ func (p *ListManagedSchemaArnsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListObjectAttributes.go b/service/clouddirectory/api_op_ListObjectAttributes.go index 79702e54ea9..a3b48461d33 100644 --- a/service/clouddirectory/api_op_ListObjectAttributes.go +++ b/service/clouddirectory/api_op_ListObjectAttributes.go @@ -186,12 +186,13 @@ func NewListObjectAttributesPaginator(client ListObjectAttributesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListObjectAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListObjectAttributes page. @@ -218,7 +219,10 @@ func (p *ListObjectAttributesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListObjectChildren.go b/service/clouddirectory/api_op_ListObjectChildren.go index 3aea4dca9f5..7378dd5c446 100644 --- a/service/clouddirectory/api_op_ListObjectChildren.go +++ b/service/clouddirectory/api_op_ListObjectChildren.go @@ -184,12 +184,13 @@ func NewListObjectChildrenPaginator(client ListObjectChildrenAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListObjectChildrenPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListObjectChildren page. @@ -216,7 +217,10 @@ func (p *ListObjectChildrenPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListObjectParentPaths.go b/service/clouddirectory/api_op_ListObjectParentPaths.go index 9ca3116a124..bcf6b6b5440 100644 --- a/service/clouddirectory/api_op_ListObjectParentPaths.go +++ b/service/clouddirectory/api_op_ListObjectParentPaths.go @@ -186,12 +186,13 @@ func NewListObjectParentPathsPaginator(client ListObjectParentPathsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListObjectParentPathsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListObjectParentPaths page. @@ -218,7 +219,10 @@ func (p *ListObjectParentPathsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListObjectParents.go b/service/clouddirectory/api_op_ListObjectParents.go index 2d25a021712..25313e29e2b 100644 --- a/service/clouddirectory/api_op_ListObjectParents.go +++ b/service/clouddirectory/api_op_ListObjectParents.go @@ -190,12 +190,13 @@ func NewListObjectParentsPaginator(client ListObjectParentsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListObjectParentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListObjectParents page. @@ -222,7 +223,10 @@ func (p *ListObjectParentsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListObjectPolicies.go b/service/clouddirectory/api_op_ListObjectPolicies.go index 685cc9dd365..8eabb2c7ad3 100644 --- a/service/clouddirectory/api_op_ListObjectPolicies.go +++ b/service/clouddirectory/api_op_ListObjectPolicies.go @@ -181,12 +181,13 @@ func NewListObjectPoliciesPaginator(client ListObjectPoliciesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListObjectPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListObjectPolicies page. @@ -213,7 +214,10 @@ func (p *ListObjectPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListPolicyAttachments.go b/service/clouddirectory/api_op_ListPolicyAttachments.go index ccded8c6997..88ba5e9f143 100644 --- a/service/clouddirectory/api_op_ListPolicyAttachments.go +++ b/service/clouddirectory/api_op_ListPolicyAttachments.go @@ -181,12 +181,13 @@ func NewListPolicyAttachmentsPaginator(client ListPolicyAttachmentsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPolicyAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicyAttachments page. @@ -213,7 +214,10 @@ func (p *ListPolicyAttachmentsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListPublishedSchemaArns.go b/service/clouddirectory/api_op_ListPublishedSchemaArns.go index 44c4527ce2e..ff1a652645e 100644 --- a/service/clouddirectory/api_op_ListPublishedSchemaArns.go +++ b/service/clouddirectory/api_op_ListPublishedSchemaArns.go @@ -167,12 +167,13 @@ func NewListPublishedSchemaArnsPaginator(client ListPublishedSchemaArnsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPublishedSchemaArnsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPublishedSchemaArns page. @@ -199,7 +200,10 @@ func (p *ListPublishedSchemaArnsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListTagsForResource.go b/service/clouddirectory/api_op_ListTagsForResource.go index 19d70048bb9..1a8f3f7c317 100644 --- a/service/clouddirectory/api_op_ListTagsForResource.go +++ b/service/clouddirectory/api_op_ListTagsForResource.go @@ -176,12 +176,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -208,7 +209,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go b/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go index 238171ebd97..6ed5b1573c9 100644 --- a/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go +++ b/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go @@ -179,12 +179,13 @@ func NewListTypedLinkFacetAttributesPaginator(client ListTypedLinkFacetAttribute client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTypedLinkFacetAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTypedLinkFacetAttributes page. @@ -211,7 +212,10 @@ func (p *ListTypedLinkFacetAttributesPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_ListTypedLinkFacetNames.go b/service/clouddirectory/api_op_ListTypedLinkFacetNames.go index f1bd7d0e375..3d0ea4849f2 100644 --- a/service/clouddirectory/api_op_ListTypedLinkFacetNames.go +++ b/service/clouddirectory/api_op_ListTypedLinkFacetNames.go @@ -172,12 +172,13 @@ func NewListTypedLinkFacetNamesPaginator(client ListTypedLinkFacetNamesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTypedLinkFacetNamesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTypedLinkFacetNames page. @@ -204,7 +205,10 @@ func (p *ListTypedLinkFacetNamesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/clouddirectory/api_op_LookupPolicy.go b/service/clouddirectory/api_op_LookupPolicy.go index 46dc58cfb74..19838a39af6 100644 --- a/service/clouddirectory/api_op_LookupPolicy.go +++ b/service/clouddirectory/api_op_LookupPolicy.go @@ -183,12 +183,13 @@ func NewLookupPolicyPaginator(client LookupPolicyAPIClient, params *LookupPolicy client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *LookupPolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next LookupPolicy page. @@ -215,7 +216,10 @@ func (p *LookupPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_DescribeAccountLimits.go b/service/cloudformation/api_op_DescribeAccountLimits.go index ec05c7ff086..ac429cb027c 100644 --- a/service/cloudformation/api_op_DescribeAccountLimits.go +++ b/service/cloudformation/api_op_DescribeAccountLimits.go @@ -160,12 +160,13 @@ func NewDescribeAccountLimitsPaginator(client DescribeAccountLimitsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAccountLimitsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAccountLimits page. @@ -186,7 +187,10 @@ func (p *DescribeAccountLimitsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_DescribeStackEvents.go b/service/cloudformation/api_op_DescribeStackEvents.go index d3fa87f42f2..6a30a0bc96c 100644 --- a/service/cloudformation/api_op_DescribeStackEvents.go +++ b/service/cloudformation/api_op_DescribeStackEvents.go @@ -172,12 +172,13 @@ func NewDescribeStackEventsPaginator(client DescribeStackEventsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStackEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStackEvents page. @@ -198,7 +199,10 @@ func (p *DescribeStackEventsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_DescribeStackResourceDrifts.go b/service/cloudformation/api_op_DescribeStackResourceDrifts.go index 843fbf7913e..740708b9a0f 100644 --- a/service/cloudformation/api_op_DescribeStackResourceDrifts.go +++ b/service/cloudformation/api_op_DescribeStackResourceDrifts.go @@ -216,12 +216,13 @@ func NewDescribeStackResourceDriftsPaginator(client DescribeStackResourceDriftsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStackResourceDriftsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStackResourceDrifts page. @@ -248,7 +249,10 @@ func (p *DescribeStackResourceDriftsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_DescribeStacks.go b/service/cloudformation/api_op_DescribeStacks.go index fbb7c3997f0..1348b1d5789 100644 --- a/service/cloudformation/api_op_DescribeStacks.go +++ b/service/cloudformation/api_op_DescribeStacks.go @@ -174,12 +174,13 @@ func NewDescribeStacksPaginator(client DescribeStacksAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStacksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStacks page. @@ -200,7 +201,10 @@ func (p *DescribeStacksPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListChangeSets.go b/service/cloudformation/api_op_ListChangeSets.go index a0abc0324eb..2dbd454932c 100644 --- a/service/cloudformation/api_op_ListChangeSets.go +++ b/service/cloudformation/api_op_ListChangeSets.go @@ -167,12 +167,13 @@ func NewListChangeSetsPaginator(client ListChangeSetsAPIClient, params *ListChan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChangeSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChangeSets page. @@ -193,7 +194,10 @@ func (p *ListChangeSetsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListExports.go b/service/cloudformation/api_op_ListExports.go index 00e3e4a948c..5a4d3baa21c 100644 --- a/service/cloudformation/api_op_ListExports.go +++ b/service/cloudformation/api_op_ListExports.go @@ -157,12 +157,13 @@ func NewListExportsPaginator(client ListExportsAPIClient, params *ListExportsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExports page. @@ -183,7 +184,10 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListImports.go b/service/cloudformation/api_op_ListImports.go index 896cc2b8805..0f20f9c1514 100644 --- a/service/cloudformation/api_op_ListImports.go +++ b/service/cloudformation/api_op_ListImports.go @@ -166,12 +166,13 @@ func NewListImportsPaginator(client ListImportsAPIClient, params *ListImportsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImports page. @@ -192,7 +193,10 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListStackInstances.go b/service/cloudformation/api_op_ListStackInstances.go index 319f2fb38e2..86f8e78d7ef 100644 --- a/service/cloudformation/api_op_ListStackInstances.go +++ b/service/cloudformation/api_op_ListStackInstances.go @@ -213,12 +213,13 @@ func NewListStackInstancesPaginator(client ListStackInstancesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStackInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStackInstances page. @@ -245,7 +246,10 @@ func (p *ListStackInstancesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListStackResources.go b/service/cloudformation/api_op_ListStackResources.go index 0ab89ef92b4..9defa6f216d 100644 --- a/service/cloudformation/api_op_ListStackResources.go +++ b/service/cloudformation/api_op_ListStackResources.go @@ -175,12 +175,13 @@ func NewListStackResourcesPaginator(client ListStackResourcesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStackResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStackResources page. @@ -201,7 +202,10 @@ func (p *ListStackResourcesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListStackSetOperationResults.go b/service/cloudformation/api_op_ListStackSetOperationResults.go index 046407667ac..b25d09b60fa 100644 --- a/service/cloudformation/api_op_ListStackSetOperationResults.go +++ b/service/cloudformation/api_op_ListStackSetOperationResults.go @@ -208,12 +208,13 @@ func NewListStackSetOperationResultsPaginator(client ListStackSetOperationResult client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStackSetOperationResultsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStackSetOperationResults page. @@ -240,7 +241,10 @@ func (p *ListStackSetOperationResultsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListStackSetOperations.go b/service/cloudformation/api_op_ListStackSetOperations.go index 60dc764ad78..cde2d5c0092 100644 --- a/service/cloudformation/api_op_ListStackSetOperations.go +++ b/service/cloudformation/api_op_ListStackSetOperations.go @@ -200,12 +200,13 @@ func NewListStackSetOperationsPaginator(client ListStackSetOperationsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStackSetOperationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStackSetOperations page. @@ -232,7 +233,10 @@ func (p *ListStackSetOperationsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListStackSets.go b/service/cloudformation/api_op_ListStackSets.go index 97ae14558d7..389c164b2a4 100644 --- a/service/cloudformation/api_op_ListStackSets.go +++ b/service/cloudformation/api_op_ListStackSets.go @@ -207,12 +207,13 @@ func NewListStackSetsPaginator(client ListStackSetsAPIClient, params *ListStackS client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStackSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStackSets page. @@ -239,7 +240,10 @@ func (p *ListStackSetsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListStacks.go b/service/cloudformation/api_op_ListStacks.go index d65da4a429b..e1d55682bbd 100644 --- a/service/cloudformation/api_op_ListStacks.go +++ b/service/cloudformation/api_op_ListStacks.go @@ -163,12 +163,13 @@ func NewListStacksPaginator(client ListStacksAPIClient, params *ListStacksInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStacksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStacks page. @@ -189,7 +190,10 @@ func (p *ListStacksPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListTypeRegistrations.go b/service/cloudformation/api_op_ListTypeRegistrations.go index 9bfbc49c969..6428bda4e76 100644 --- a/service/cloudformation/api_op_ListTypeRegistrations.go +++ b/service/cloudformation/api_op_ListTypeRegistrations.go @@ -191,12 +191,13 @@ func NewListTypeRegistrationsPaginator(client ListTypeRegistrationsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTypeRegistrationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTypeRegistrations page. @@ -223,7 +224,10 @@ func (p *ListTypeRegistrationsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListTypeVersions.go b/service/cloudformation/api_op_ListTypeVersions.go index 5c2a5490078..04036966764 100644 --- a/service/cloudformation/api_op_ListTypeVersions.go +++ b/service/cloudformation/api_op_ListTypeVersions.go @@ -205,12 +205,13 @@ func NewListTypeVersionsPaginator(client ListTypeVersionsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTypeVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTypeVersions page. @@ -237,7 +238,10 @@ func (p *ListTypeVersionsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudformation/api_op_ListTypes.go b/service/cloudformation/api_op_ListTypes.go index cf6cd25d7b7..d69e7129e6f 100644 --- a/service/cloudformation/api_op_ListTypes.go +++ b/service/cloudformation/api_op_ListTypes.go @@ -233,12 +233,13 @@ func NewListTypesPaginator(client ListTypesAPIClient, params *ListTypesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTypes page. @@ -265,7 +266,10 @@ func (p *ListTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go b/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go index 3e694ea500b..ceaed7510c1 100644 --- a/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go +++ b/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go @@ -166,12 +166,13 @@ func NewListCloudFrontOriginAccessIdentitiesPaginator(client ListCloudFrontOrigi client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCloudFrontOriginAccessIdentitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCloudFrontOriginAccessIdentities page. @@ -201,7 +202,10 @@ func (p *ListCloudFrontOriginAccessIdentitiesPaginator) NextPage(ctx context.Con p.nextToken = result.CloudFrontOriginAccessIdentityList.NextMarker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudfront/api_op_ListDistributions.go b/service/cloudfront/api_op_ListDistributions.go index 267d7ca7b7a..8f361045c45 100644 --- a/service/cloudfront/api_op_ListDistributions.go +++ b/service/cloudfront/api_op_ListDistributions.go @@ -163,12 +163,13 @@ func NewListDistributionsPaginator(client ListDistributionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDistributionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDistributions page. @@ -198,7 +199,10 @@ func (p *ListDistributionsPaginator) NextPage(ctx context.Context, optFns ...fun p.nextToken = result.DistributionList.NextMarker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudfront/api_op_ListInvalidations.go b/service/cloudfront/api_op_ListInvalidations.go index 64fed1e7a1c..6f0b964cbe5 100644 --- a/service/cloudfront/api_op_ListInvalidations.go +++ b/service/cloudfront/api_op_ListInvalidations.go @@ -173,12 +173,13 @@ func NewListInvalidationsPaginator(client ListInvalidationsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInvalidationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInvalidations page. @@ -208,7 +209,10 @@ func (p *ListInvalidationsPaginator) NextPage(ctx context.Context, optFns ...fun p.nextToken = result.InvalidationList.NextMarker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudfront/api_op_ListStreamingDistributions.go b/service/cloudfront/api_op_ListStreamingDistributions.go index 61d5bde9e8c..d6eea3cf6d7 100644 --- a/service/cloudfront/api_op_ListStreamingDistributions.go +++ b/service/cloudfront/api_op_ListStreamingDistributions.go @@ -162,12 +162,13 @@ func NewListStreamingDistributionsPaginator(client ListStreamingDistributionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamingDistributionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamingDistributions page. @@ -197,7 +198,10 @@ func (p *ListStreamingDistributionsPaginator) NextPage(ctx context.Context, optF p.nextToken = result.StreamingDistributionList.NextMarker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudhsmv2/api_op_DescribeBackups.go b/service/cloudhsmv2/api_op_DescribeBackups.go index 0e18dbd1cee..9877c331a1c 100644 --- a/service/cloudhsmv2/api_op_DescribeBackups.go +++ b/service/cloudhsmv2/api_op_DescribeBackups.go @@ -187,12 +187,13 @@ func NewDescribeBackupsPaginator(client DescribeBackupsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBackupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBackups page. @@ -219,7 +220,10 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudhsmv2/api_op_DescribeClusters.go b/service/cloudhsmv2/api_op_DescribeClusters.go index 6fae2cb6dfd..dc559da41a5 100644 --- a/service/cloudhsmv2/api_op_DescribeClusters.go +++ b/service/cloudhsmv2/api_op_DescribeClusters.go @@ -178,12 +178,13 @@ func NewDescribeClustersPaginator(client DescribeClustersAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusters page. @@ -210,7 +211,10 @@ func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudhsmv2/api_op_ListTags.go b/service/cloudhsmv2/api_op_ListTags.go index 1eebd8fa845..88de461dc7c 100644 --- a/service/cloudhsmv2/api_op_ListTags.go +++ b/service/cloudhsmv2/api_op_ListTags.go @@ -179,12 +179,13 @@ func NewListTagsPaginator(client ListTagsAPIClient, params *ListTagsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTags page. @@ -211,7 +212,10 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudtrail/api_op_ListPublicKeys.go b/service/cloudtrail/api_op_ListPublicKeys.go index 9c26caca25f..857e5a77f46 100644 --- a/service/cloudtrail/api_op_ListPublicKeys.go +++ b/service/cloudtrail/api_op_ListPublicKeys.go @@ -171,12 +171,13 @@ func NewListPublicKeysPaginator(client ListPublicKeysAPIClient, params *ListPubl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPublicKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPublicKeys page. @@ -197,7 +198,10 @@ func (p *ListPublicKeysPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudtrail/api_op_ListTags.go b/service/cloudtrail/api_op_ListTags.go index f170ea2495e..75362dfb944 100644 --- a/service/cloudtrail/api_op_ListTags.go +++ b/service/cloudtrail/api_op_ListTags.go @@ -163,12 +163,13 @@ func NewListTagsPaginator(client ListTagsAPIClient, params *ListTagsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTags page. @@ -189,7 +190,10 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudtrail/api_op_ListTrails.go b/service/cloudtrail/api_op_ListTrails.go index 0965f2f63c0..03592b0082a 100644 --- a/service/cloudtrail/api_op_ListTrails.go +++ b/service/cloudtrail/api_op_ListTrails.go @@ -158,12 +158,13 @@ func NewListTrailsPaginator(client ListTrailsAPIClient, params *ListTrailsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrails page. @@ -184,7 +185,10 @@ func (p *ListTrailsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudtrail/api_op_LookupEvents.go b/service/cloudtrail/api_op_LookupEvents.go index bb8513c84b4..a48112c1fef 100644 --- a/service/cloudtrail/api_op_LookupEvents.go +++ b/service/cloudtrail/api_op_LookupEvents.go @@ -235,12 +235,13 @@ func NewLookupEventsPaginator(client LookupEventsAPIClient, params *LookupEvents client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *LookupEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next LookupEvents page. @@ -267,7 +268,10 @@ func (p *LookupEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_DescribeAlarmHistory.go b/service/cloudwatch/api_op_DescribeAlarmHistory.go index a04314178ed..d09f188de63 100644 --- a/service/cloudwatch/api_op_DescribeAlarmHistory.go +++ b/service/cloudwatch/api_op_DescribeAlarmHistory.go @@ -192,12 +192,13 @@ func NewDescribeAlarmHistoryPaginator(client DescribeAlarmHistoryAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAlarmHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAlarmHistory page. @@ -224,7 +225,10 @@ func (p *DescribeAlarmHistoryPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_DescribeAlarms.go b/service/cloudwatch/api_op_DescribeAlarms.go index a3d46b7d618..73026f301de 100644 --- a/service/cloudwatch/api_op_DescribeAlarms.go +++ b/service/cloudwatch/api_op_DescribeAlarms.go @@ -223,12 +223,13 @@ func NewDescribeAlarmsPaginator(client DescribeAlarmsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAlarmsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAlarms page. @@ -255,7 +256,10 @@ func (p *DescribeAlarmsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_DescribeInsightRules.go b/service/cloudwatch/api_op_DescribeInsightRules.go index e50c9f175ea..7536d0eb0a5 100644 --- a/service/cloudwatch/api_op_DescribeInsightRules.go +++ b/service/cloudwatch/api_op_DescribeInsightRules.go @@ -168,12 +168,13 @@ func NewDescribeInsightRulesPaginator(client DescribeInsightRulesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInsightRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInsightRules page. @@ -200,7 +201,10 @@ func (p *DescribeInsightRulesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_GetMetricData.go b/service/cloudwatch/api_op_GetMetricData.go index 2a6abba1153..a3fbd4f1c6e 100644 --- a/service/cloudwatch/api_op_GetMetricData.go +++ b/service/cloudwatch/api_op_GetMetricData.go @@ -275,12 +275,13 @@ func NewGetMetricDataPaginator(client GetMetricDataAPIClient, params *GetMetricD client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetMetricDataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetMetricData page. @@ -307,7 +308,10 @@ func (p *GetMetricDataPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_ListDashboards.go b/service/cloudwatch/api_op_ListDashboards.go index 81b95af5681..0280e045aa1 100644 --- a/service/cloudwatch/api_op_ListDashboards.go +++ b/service/cloudwatch/api_op_ListDashboards.go @@ -162,12 +162,13 @@ func NewListDashboardsPaginator(client ListDashboardsAPIClient, params *ListDash client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDashboardsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDashboards page. @@ -188,7 +189,10 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_ListMetricStreams.go b/service/cloudwatch/api_op_ListMetricStreams.go index e8eee226377..fe591a9da60 100644 --- a/service/cloudwatch/api_op_ListMetricStreams.go +++ b/service/cloudwatch/api_op_ListMetricStreams.go @@ -162,12 +162,13 @@ func NewListMetricStreamsPaginator(client ListMetricStreamsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMetricStreamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMetricStreams page. @@ -194,7 +195,10 @@ func (p *ListMetricStreamsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatch/api_op_ListMetrics.go b/service/cloudwatch/api_op_ListMetrics.go index 97d4041cfe6..de71717ccca 100644 --- a/service/cloudwatch/api_op_ListMetrics.go +++ b/service/cloudwatch/api_op_ListMetrics.go @@ -190,12 +190,13 @@ func NewListMetricsPaginator(client ListMetricsAPIClient, params *ListMetricsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMetricsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMetrics page. @@ -216,7 +217,10 @@ func (p *ListMetricsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_DescribeDestinations.go b/service/cloudwatchlogs/api_op_DescribeDestinations.go index 65a9949412b..4ffb9aded4c 100644 --- a/service/cloudwatchlogs/api_op_DescribeDestinations.go +++ b/service/cloudwatchlogs/api_op_DescribeDestinations.go @@ -167,12 +167,13 @@ func NewDescribeDestinationsPaginator(client DescribeDestinationsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDestinationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDestinations page. @@ -199,7 +200,10 @@ func (p *DescribeDestinationsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_DescribeLogGroups.go b/service/cloudwatchlogs/api_op_DescribeLogGroups.go index 4aa0651ea3d..2411f898a57 100644 --- a/service/cloudwatchlogs/api_op_DescribeLogGroups.go +++ b/service/cloudwatchlogs/api_op_DescribeLogGroups.go @@ -174,12 +174,13 @@ func NewDescribeLogGroupsPaginator(client DescribeLogGroupsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLogGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLogGroups page. @@ -206,7 +207,10 @@ func (p *DescribeLogGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_DescribeLogStreams.go b/service/cloudwatchlogs/api_op_DescribeLogStreams.go index 4cc32722136..7032e119296 100644 --- a/service/cloudwatchlogs/api_op_DescribeLogStreams.go +++ b/service/cloudwatchlogs/api_op_DescribeLogStreams.go @@ -194,12 +194,13 @@ func NewDescribeLogStreamsPaginator(client DescribeLogStreamsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLogStreamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLogStreams page. @@ -226,7 +227,10 @@ func (p *DescribeLogStreamsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_DescribeMetricFilters.go b/service/cloudwatchlogs/api_op_DescribeMetricFilters.go index 45349e7fcd7..08dd24bf4e5 100644 --- a/service/cloudwatchlogs/api_op_DescribeMetricFilters.go +++ b/service/cloudwatchlogs/api_op_DescribeMetricFilters.go @@ -182,12 +182,13 @@ func NewDescribeMetricFiltersPaginator(client DescribeMetricFiltersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMetricFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMetricFilters page. @@ -214,7 +215,10 @@ func (p *DescribeMetricFiltersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go b/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go index abcd80c333f..c13a3624eaa 100644 --- a/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go +++ b/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go @@ -179,12 +179,13 @@ func NewDescribeSubscriptionFiltersPaginator(client DescribeSubscriptionFiltersA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSubscriptionFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSubscriptionFilters page. @@ -211,7 +212,10 @@ func (p *DescribeSubscriptionFiltersPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_FilterLogEvents.go b/service/cloudwatchlogs/api_op_FilterLogEvents.go index ddf3d60fecd..a24d548b074 100644 --- a/service/cloudwatchlogs/api_op_FilterLogEvents.go +++ b/service/cloudwatchlogs/api_op_FilterLogEvents.go @@ -223,12 +223,13 @@ func NewFilterLogEventsPaginator(client FilterLogEventsAPIClient, params *Filter client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *FilterLogEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next FilterLogEvents page. @@ -255,7 +256,10 @@ func (p *FilterLogEventsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cloudwatchlogs/api_op_GetLogEvents.go b/service/cloudwatchlogs/api_op_GetLogEvents.go index b9dc0e39dbf..15a5e0cd185 100644 --- a/service/cloudwatchlogs/api_op_GetLogEvents.go +++ b/service/cloudwatchlogs/api_op_GetLogEvents.go @@ -206,12 +206,13 @@ func NewGetLogEventsPaginator(client GetLogEventsAPIClient, params *GetLogEvents client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetLogEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetLogEvents page. @@ -238,7 +239,10 @@ func (p *GetLogEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextForwardToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeartifact/api_op_ListDomains.go b/service/codeartifact/api_op_ListDomains.go index 681dc718e10..8a1a94383f4 100644 --- a/service/codeartifact/api_op_ListDomains.go +++ b/service/codeartifact/api_op_ListDomains.go @@ -166,12 +166,13 @@ func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomains page. @@ -198,7 +199,10 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeartifact/api_op_ListPackageVersionAssets.go b/service/codeartifact/api_op_ListPackageVersionAssets.go index 7baacece120..63fee3dbbf5 100644 --- a/service/codeartifact/api_op_ListPackageVersionAssets.go +++ b/service/codeartifact/api_op_ListPackageVersionAssets.go @@ -248,12 +248,13 @@ func NewListPackageVersionAssetsPaginator(client ListPackageVersionAssetsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackageVersionAssetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackageVersionAssets page. @@ -280,7 +281,10 @@ func (p *ListPackageVersionAssetsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeartifact/api_op_ListPackageVersions.go b/service/codeartifact/api_op_ListPackageVersions.go index a37ed410fd5..f45532d36e0 100644 --- a/service/codeartifact/api_op_ListPackageVersions.go +++ b/service/codeartifact/api_op_ListPackageVersions.go @@ -270,12 +270,13 @@ func NewListPackageVersionsPaginator(client ListPackageVersionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackageVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackageVersions page. @@ -302,7 +303,10 @@ func (p *ListPackageVersionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeartifact/api_op_ListPackages.go b/service/codeartifact/api_op_ListPackages.go index c174c643b12..55b157e33a9 100644 --- a/service/codeartifact/api_op_ListPackages.go +++ b/service/codeartifact/api_op_ListPackages.go @@ -211,12 +211,13 @@ func NewListPackagesPaginator(client ListPackagesAPIClient, params *ListPackages client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackages page. @@ -243,7 +244,10 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeartifact/api_op_ListRepositories.go b/service/codeartifact/api_op_ListRepositories.go index 99c045b9b9b..7b382570fe5 100644 --- a/service/codeartifact/api_op_ListRepositories.go +++ b/service/codeartifact/api_op_ListRepositories.go @@ -170,12 +170,13 @@ func NewListRepositoriesPaginator(client ListRepositoriesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositories page. @@ -202,7 +203,10 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeartifact/api_op_ListRepositoriesInDomain.go b/service/codeartifact/api_op_ListRepositoriesInDomain.go index 8203c232ac6..27dea33b91b 100644 --- a/service/codeartifact/api_op_ListRepositoriesInDomain.go +++ b/service/codeartifact/api_op_ListRepositoriesInDomain.go @@ -186,12 +186,13 @@ func NewListRepositoriesInDomainPaginator(client ListRepositoriesInDomainAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositoriesInDomainPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositoriesInDomain page. @@ -218,7 +219,10 @@ func (p *ListRepositoriesInDomainPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_DescribeCodeCoverages.go b/service/codebuild/api_op_DescribeCodeCoverages.go index 273cb913925..a43877a669c 100644 --- a/service/codebuild/api_op_DescribeCodeCoverages.go +++ b/service/codebuild/api_op_DescribeCodeCoverages.go @@ -186,12 +186,13 @@ func NewDescribeCodeCoveragesPaginator(client DescribeCodeCoveragesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCodeCoveragesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCodeCoverages page. @@ -218,7 +219,10 @@ func (p *DescribeCodeCoveragesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_DescribeTestCases.go b/service/codebuild/api_op_DescribeTestCases.go index fe60f2356f6..3b9bcd07efa 100644 --- a/service/codebuild/api_op_DescribeTestCases.go +++ b/service/codebuild/api_op_DescribeTestCases.go @@ -185,12 +185,13 @@ func NewDescribeTestCasesPaginator(client DescribeTestCasesAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTestCasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTestCases page. @@ -217,7 +218,10 @@ func (p *DescribeTestCasesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListBuildBatches.go b/service/codebuild/api_op_ListBuildBatches.go index c6f0685df34..5d7bdb4b296 100644 --- a/service/codebuild/api_op_ListBuildBatches.go +++ b/service/codebuild/api_op_ListBuildBatches.go @@ -175,12 +175,13 @@ func NewListBuildBatchesPaginator(client ListBuildBatchesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuildBatchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuildBatches page. @@ -207,7 +208,10 @@ func (p *ListBuildBatchesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListBuildBatchesForProject.go b/service/codebuild/api_op_ListBuildBatchesForProject.go index 69df25b6516..bb95d91f265 100644 --- a/service/codebuild/api_op_ListBuildBatchesForProject.go +++ b/service/codebuild/api_op_ListBuildBatchesForProject.go @@ -181,12 +181,13 @@ func NewListBuildBatchesForProjectPaginator(client ListBuildBatchesForProjectAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuildBatchesForProjectPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuildBatchesForProject page. @@ -213,7 +214,10 @@ func (p *ListBuildBatchesForProjectPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListBuilds.go b/service/codebuild/api_op_ListBuilds.go index 2ca6381805a..4803f4baeb3 100644 --- a/service/codebuild/api_op_ListBuilds.go +++ b/service/codebuild/api_op_ListBuilds.go @@ -167,12 +167,13 @@ func NewListBuildsPaginator(client ListBuildsAPIClient, params *ListBuildsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuildsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuilds page. @@ -193,7 +194,10 @@ func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListBuildsForProject.go b/service/codebuild/api_op_ListBuildsForProject.go index 0b54a75f07c..b5f64318598 100644 --- a/service/codebuild/api_op_ListBuildsForProject.go +++ b/service/codebuild/api_op_ListBuildsForProject.go @@ -184,12 +184,13 @@ func NewListBuildsForProjectPaginator(client ListBuildsForProjectAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuildsForProjectPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuildsForProject page. @@ -210,7 +211,10 @@ func (p *ListBuildsForProjectPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListProjects.go b/service/codebuild/api_op_ListProjects.go index 0b6907caf51..be27de085ca 100644 --- a/service/codebuild/api_op_ListProjects.go +++ b/service/codebuild/api_op_ListProjects.go @@ -187,12 +187,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -213,7 +214,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListReportGroups.go b/service/codebuild/api_op_ListReportGroups.go index 5777b757716..5789be3c2eb 100644 --- a/service/codebuild/api_op_ListReportGroups.go +++ b/service/codebuild/api_op_ListReportGroups.go @@ -192,12 +192,13 @@ func NewListReportGroupsPaginator(client ListReportGroupsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReportGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReportGroups page. @@ -224,7 +225,10 @@ func (p *ListReportGroupsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListReports.go b/service/codebuild/api_op_ListReports.go index 73e3eabf89e..87ed8b774ae 100644 --- a/service/codebuild/api_op_ListReports.go +++ b/service/codebuild/api_op_ListReports.go @@ -186,12 +186,13 @@ func NewListReportsPaginator(client ListReportsAPIClient, params *ListReportsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReports page. @@ -218,7 +219,10 @@ func (p *ListReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListReportsForReportGroup.go b/service/codebuild/api_op_ListReportsForReportGroup.go index 8b2ef0d9e5d..40fe453e666 100644 --- a/service/codebuild/api_op_ListReportsForReportGroup.go +++ b/service/codebuild/api_op_ListReportsForReportGroup.go @@ -191,12 +191,13 @@ func NewListReportsForReportGroupPaginator(client ListReportsForReportGroupAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReportsForReportGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReportsForReportGroup page. @@ -223,7 +224,10 @@ func (p *ListReportsForReportGroupPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListSharedProjects.go b/service/codebuild/api_op_ListSharedProjects.go index 67da01f8f4c..8cda5f95d92 100644 --- a/service/codebuild/api_op_ListSharedProjects.go +++ b/service/codebuild/api_op_ListSharedProjects.go @@ -195,12 +195,13 @@ func NewListSharedProjectsPaginator(client ListSharedProjectsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSharedProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSharedProjects page. @@ -227,7 +228,10 @@ func (p *ListSharedProjectsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codebuild/api_op_ListSharedReportGroups.go b/service/codebuild/api_op_ListSharedReportGroups.go index cfda106d3db..aad85e4dc39 100644 --- a/service/codebuild/api_op_ListSharedReportGroups.go +++ b/service/codebuild/api_op_ListSharedReportGroups.go @@ -195,12 +195,13 @@ func NewListSharedReportGroupsPaginator(client ListSharedReportGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSharedReportGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSharedReportGroups page. @@ -227,7 +228,10 @@ func (p *ListSharedReportGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_DescribeMergeConflicts.go b/service/codecommit/api_op_DescribeMergeConflicts.go index e309fe25795..24c11b72efb 100644 --- a/service/codecommit/api_op_DescribeMergeConflicts.go +++ b/service/codecommit/api_op_DescribeMergeConflicts.go @@ -231,12 +231,13 @@ func NewDescribeMergeConflictsPaginator(client DescribeMergeConflictsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMergeConflictsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMergeConflicts page. @@ -263,7 +264,10 @@ func (p *DescribeMergeConflictsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_DescribePullRequestEvents.go b/service/codecommit/api_op_DescribePullRequestEvents.go index f56cb35ae71..cb9f56f0983 100644 --- a/service/codecommit/api_op_DescribePullRequestEvents.go +++ b/service/codecommit/api_op_DescribePullRequestEvents.go @@ -188,12 +188,13 @@ func NewDescribePullRequestEventsPaginator(client DescribePullRequestEventsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePullRequestEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePullRequestEvents page. @@ -220,7 +221,10 @@ func (p *DescribePullRequestEventsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_GetCommentReactions.go b/service/codecommit/api_op_GetCommentReactions.go index a919c84df57..33b6564dcc1 100644 --- a/service/codecommit/api_op_GetCommentReactions.go +++ b/service/codecommit/api_op_GetCommentReactions.go @@ -180,12 +180,13 @@ func NewGetCommentReactionsPaginator(client GetCommentReactionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCommentReactionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCommentReactions page. @@ -212,7 +213,10 @@ func (p *GetCommentReactionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_GetCommentsForComparedCommit.go b/service/codecommit/api_op_GetCommentsForComparedCommit.go index a80c38ede11..8209a4d03f5 100644 --- a/service/codecommit/api_op_GetCommentsForComparedCommit.go +++ b/service/codecommit/api_op_GetCommentsForComparedCommit.go @@ -188,12 +188,13 @@ func NewGetCommentsForComparedCommitPaginator(client GetCommentsForComparedCommi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCommentsForComparedCommitPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCommentsForComparedCommit page. @@ -220,7 +221,10 @@ func (p *GetCommentsForComparedCommitPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_GetCommentsForPullRequest.go b/service/codecommit/api_op_GetCommentsForPullRequest.go index 03073e139af..16dabe7aa0d 100644 --- a/service/codecommit/api_op_GetCommentsForPullRequest.go +++ b/service/codecommit/api_op_GetCommentsForPullRequest.go @@ -190,12 +190,13 @@ func NewGetCommentsForPullRequestPaginator(client GetCommentsForPullRequestAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCommentsForPullRequestPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCommentsForPullRequest page. @@ -222,7 +223,10 @@ func (p *GetCommentsForPullRequestPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_GetDifferences.go b/service/codecommit/api_op_GetDifferences.go index 97da7d65ace..c592a057740 100644 --- a/service/codecommit/api_op_GetDifferences.go +++ b/service/codecommit/api_op_GetDifferences.go @@ -196,12 +196,13 @@ func NewGetDifferencesPaginator(client GetDifferencesAPIClient, params *GetDiffe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDifferencesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDifferences page. @@ -228,7 +229,10 @@ func (p *GetDifferencesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_GetMergeConflicts.go b/service/codecommit/api_op_GetMergeConflicts.go index e0a5c0ecbd3..4147294acf4 100644 --- a/service/codecommit/api_op_GetMergeConflicts.go +++ b/service/codecommit/api_op_GetMergeConflicts.go @@ -224,12 +224,13 @@ func NewGetMergeConflictsPaginator(client GetMergeConflictsAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetMergeConflictsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetMergeConflicts page. @@ -256,7 +257,10 @@ func (p *GetMergeConflictsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_ListApprovalRuleTemplates.go b/service/codecommit/api_op_ListApprovalRuleTemplates.go index 5f422bafd17..b72adf0f04e 100644 --- a/service/codecommit/api_op_ListApprovalRuleTemplates.go +++ b/service/codecommit/api_op_ListApprovalRuleTemplates.go @@ -166,12 +166,13 @@ func NewListApprovalRuleTemplatesPaginator(client ListApprovalRuleTemplatesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApprovalRuleTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApprovalRuleTemplates page. @@ -198,7 +199,10 @@ func (p *ListApprovalRuleTemplatesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go b/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go index 54844c96d16..2c473317a5f 100644 --- a/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go +++ b/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go @@ -174,12 +174,13 @@ func NewListAssociatedApprovalRuleTemplatesForRepositoryPaginator(client ListAss client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociatedApprovalRuleTemplatesForRepositoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociatedApprovalRuleTemplatesForRepository @@ -207,7 +208,10 @@ func (p *ListAssociatedApprovalRuleTemplatesForRepositoryPaginator) NextPage(ctx prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_ListBranches.go b/service/codecommit/api_op_ListBranches.go index ba7d0d30c87..f6caf11a91f 100644 --- a/service/codecommit/api_op_ListBranches.go +++ b/service/codecommit/api_op_ListBranches.go @@ -159,12 +159,13 @@ func NewListBranchesPaginator(client ListBranchesAPIClient, params *ListBranches client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBranchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBranches page. @@ -185,7 +186,10 @@ func (p *ListBranchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_ListPullRequests.go b/service/codecommit/api_op_ListPullRequests.go index f194d9eb427..be207dbf202 100644 --- a/service/codecommit/api_op_ListPullRequests.go +++ b/service/codecommit/api_op_ListPullRequests.go @@ -182,12 +182,13 @@ func NewListPullRequestsPaginator(client ListPullRequestsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPullRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPullRequests page. @@ -214,7 +215,10 @@ func (p *ListPullRequestsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_ListRepositories.go b/service/codecommit/api_op_ListRepositories.go index b6acb17f595..b1dc8cd1485 100644 --- a/service/codecommit/api_op_ListRepositories.go +++ b/service/codecommit/api_op_ListRepositories.go @@ -165,12 +165,13 @@ func NewListRepositoriesPaginator(client ListRepositoriesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositories page. @@ -191,7 +192,10 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go b/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go index 4431cb95cb8..a34bf068741 100644 --- a/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go +++ b/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go @@ -174,12 +174,13 @@ func NewListRepositoriesForApprovalRuleTemplatePaginator(client ListRepositories client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositoriesForApprovalRuleTemplatePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositoriesForApprovalRuleTemplate page. @@ -206,7 +207,10 @@ func (p *ListRepositoriesForApprovalRuleTemplatePaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codedeploy/api_op_ListApplicationRevisions.go b/service/codedeploy/api_op_ListApplicationRevisions.go index e20bfbf7360..2dcdd670097 100644 --- a/service/codedeploy/api_op_ListApplicationRevisions.go +++ b/service/codedeploy/api_op_ListApplicationRevisions.go @@ -212,12 +212,13 @@ func NewListApplicationRevisionsPaginator(client ListApplicationRevisionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationRevisionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationRevisions page. @@ -238,7 +239,10 @@ func (p *ListApplicationRevisionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codedeploy/api_op_ListApplications.go b/service/codedeploy/api_op_ListApplications.go index 7cf612863fe..04fb656e31e 100644 --- a/service/codedeploy/api_op_ListApplications.go +++ b/service/codedeploy/api_op_ListApplications.go @@ -155,12 +155,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -181,7 +182,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codedeploy/api_op_ListDeploymentConfigs.go b/service/codedeploy/api_op_ListDeploymentConfigs.go index 15694dd1f0a..b5fe4587891 100644 --- a/service/codedeploy/api_op_ListDeploymentConfigs.go +++ b/service/codedeploy/api_op_ListDeploymentConfigs.go @@ -157,12 +157,13 @@ func NewListDeploymentConfigsPaginator(client ListDeploymentConfigsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeploymentConfigs page. @@ -183,7 +184,10 @@ func (p *ListDeploymentConfigsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codedeploy/api_op_ListDeploymentGroups.go b/service/codedeploy/api_op_ListDeploymentGroups.go index 70d8aef2b0a..487d3344e0e 100644 --- a/service/codedeploy/api_op_ListDeploymentGroups.go +++ b/service/codedeploy/api_op_ListDeploymentGroups.go @@ -169,12 +169,13 @@ func NewListDeploymentGroupsPaginator(client ListDeploymentGroupsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeploymentGroups page. @@ -195,7 +196,10 @@ func (p *ListDeploymentGroupsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codedeploy/api_op_ListDeploymentInstances.go b/service/codedeploy/api_op_ListDeploymentInstances.go index af9afa31f05..ab485cd8c55 100644 --- a/service/codedeploy/api_op_ListDeploymentInstances.go +++ b/service/codedeploy/api_op_ListDeploymentInstances.go @@ -196,12 +196,13 @@ func NewListDeploymentInstancesPaginator(client ListDeploymentInstancesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeploymentInstances page. @@ -222,7 +223,10 @@ func (p *ListDeploymentInstancesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codedeploy/api_op_ListDeployments.go b/service/codedeploy/api_op_ListDeployments.go index 3ad60347898..73aef746020 100644 --- a/service/codedeploy/api_op_ListDeployments.go +++ b/service/codedeploy/api_op_ListDeployments.go @@ -195,12 +195,13 @@ func NewListDeploymentsPaginator(client ListDeploymentsAPIClient, params *ListDe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeployments page. @@ -221,7 +222,10 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go b/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go index 3dd3134bf0c..30e21e33b1d 100644 --- a/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go +++ b/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go @@ -197,12 +197,13 @@ func NewGetFindingsReportAccountSummaryPaginator(client GetFindingsReportAccount client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetFindingsReportAccountSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetFindingsReportAccountSummary page. @@ -229,7 +230,10 @@ func (p *GetFindingsReportAccountSummaryPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeguruprofiler/api_op_ListFindingsReports.go b/service/codeguruprofiler/api_op_ListFindingsReports.go index 55e98095de4..5b4df28535a 100644 --- a/service/codeguruprofiler/api_op_ListFindingsReports.go +++ b/service/codeguruprofiler/api_op_ListFindingsReports.go @@ -212,12 +212,13 @@ func NewListFindingsReportsPaginator(client ListFindingsReportsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsReportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindingsReports page. @@ -244,7 +245,10 @@ func (p *ListFindingsReportsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeguruprofiler/api_op_ListProfileTimes.go b/service/codeguruprofiler/api_op_ListProfileTimes.go index 087c72fb544..a4e5af8f4a9 100644 --- a/service/codeguruprofiler/api_op_ListProfileTimes.go +++ b/service/codeguruprofiler/api_op_ListProfileTimes.go @@ -218,12 +218,13 @@ func NewListProfileTimesPaginator(client ListProfileTimesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProfileTimesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProfileTimes page. @@ -250,7 +251,10 @@ func (p *ListProfileTimesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codeguruprofiler/api_op_ListProfilingGroups.go b/service/codeguruprofiler/api_op_ListProfilingGroups.go index fd636c4df6e..efebee6c262 100644 --- a/service/codeguruprofiler/api_op_ListProfilingGroups.go +++ b/service/codeguruprofiler/api_op_ListProfilingGroups.go @@ -202,12 +202,13 @@ func NewListProfilingGroupsPaginator(client ListProfilingGroupsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProfilingGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProfilingGroups page. @@ -234,7 +235,10 @@ func (p *ListProfilingGroupsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codegurureviewer/api_op_ListCodeReviews.go b/service/codegurureviewer/api_op_ListCodeReviews.go index 8f35654c8b8..fe187692ac1 100644 --- a/service/codegurureviewer/api_op_ListCodeReviews.go +++ b/service/codegurureviewer/api_op_ListCodeReviews.go @@ -194,12 +194,13 @@ func NewListCodeReviewsPaginator(client ListCodeReviewsAPIClient, params *ListCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCodeReviewsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCodeReviews page. @@ -226,7 +227,10 @@ func (p *ListCodeReviewsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codegurureviewer/api_op_ListRecommendationFeedback.go b/service/codegurureviewer/api_op_ListRecommendationFeedback.go index 8ecc4b4ba67..21655f98b61 100644 --- a/service/codegurureviewer/api_op_ListRecommendationFeedback.go +++ b/service/codegurureviewer/api_op_ListRecommendationFeedback.go @@ -194,12 +194,13 @@ func NewListRecommendationFeedbackPaginator(client ListRecommendationFeedbackAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecommendationFeedbackPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecommendationFeedback page. @@ -226,7 +227,10 @@ func (p *ListRecommendationFeedbackPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codegurureviewer/api_op_ListRecommendations.go b/service/codegurureviewer/api_op_ListRecommendations.go index 121a631b22d..5205adc890d 100644 --- a/service/codegurureviewer/api_op_ListRecommendations.go +++ b/service/codegurureviewer/api_op_ListRecommendations.go @@ -171,12 +171,13 @@ func NewListRecommendationsPaginator(client ListRecommendationsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecommendations page. @@ -203,7 +204,10 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codegurureviewer/api_op_ListRepositoryAssociations.go b/service/codegurureviewer/api_op_ListRepositoryAssociations.go index 6a06a264519..2e92820400a 100644 --- a/service/codegurureviewer/api_op_ListRepositoryAssociations.go +++ b/service/codegurureviewer/api_op_ListRepositoryAssociations.go @@ -242,12 +242,13 @@ func NewListRepositoryAssociationsPaginator(client ListRepositoryAssociationsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositoryAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositoryAssociations page. @@ -274,7 +275,10 @@ func (p *ListRepositoryAssociationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codepipeline/api_op_ListActionExecutions.go b/service/codepipeline/api_op_ListActionExecutions.go index afa0014917d..a2c6e0c50fe 100644 --- a/service/codepipeline/api_op_ListActionExecutions.go +++ b/service/codepipeline/api_op_ListActionExecutions.go @@ -183,12 +183,13 @@ func NewListActionExecutionsPaginator(client ListActionExecutionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActionExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActionExecutions page. @@ -215,7 +216,10 @@ func (p *ListActionExecutionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codepipeline/api_op_ListActionTypes.go b/service/codepipeline/api_op_ListActionTypes.go index 0c58314c2c3..c4d53be57bd 100644 --- a/service/codepipeline/api_op_ListActionTypes.go +++ b/service/codepipeline/api_op_ListActionTypes.go @@ -165,12 +165,13 @@ func NewListActionTypesPaginator(client ListActionTypesAPIClient, params *ListAc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActionTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActionTypes page. @@ -191,7 +192,10 @@ func (p *ListActionTypesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codepipeline/api_op_ListPipelineExecutions.go b/service/codepipeline/api_op_ListPipelineExecutions.go index 999f7606147..6983518c20f 100644 --- a/service/codepipeline/api_op_ListPipelineExecutions.go +++ b/service/codepipeline/api_op_ListPipelineExecutions.go @@ -181,12 +181,13 @@ func NewListPipelineExecutionsPaginator(client ListPipelineExecutionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelineExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelineExecutions page. @@ -213,7 +214,10 @@ func (p *ListPipelineExecutionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codepipeline/api_op_ListPipelines.go b/service/codepipeline/api_op_ListPipelines.go index eefaa6f491e..a9f3b4afbfa 100644 --- a/service/codepipeline/api_op_ListPipelines.go +++ b/service/codepipeline/api_op_ListPipelines.go @@ -168,12 +168,13 @@ func NewListPipelinesPaginator(client ListPipelinesAPIClient, params *ListPipeli client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelines page. @@ -200,7 +201,10 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codepipeline/api_op_ListTagsForResource.go b/service/codepipeline/api_op_ListTagsForResource.go index ffd7079b76a..e90937faf44 100644 --- a/service/codepipeline/api_op_ListTagsForResource.go +++ b/service/codepipeline/api_op_ListTagsForResource.go @@ -174,12 +174,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -206,7 +207,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codepipeline/api_op_ListWebhooks.go b/service/codepipeline/api_op_ListWebhooks.go index acde23a6a18..d7c5dcb47ad 100644 --- a/service/codepipeline/api_op_ListWebhooks.go +++ b/service/codepipeline/api_op_ListWebhooks.go @@ -167,12 +167,13 @@ func NewListWebhooksPaginator(client ListWebhooksAPIClient, params *ListWebhooks client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWebhooksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWebhooks page. @@ -199,7 +200,10 @@ func (p *ListWebhooksPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codestarconnections/api_op_ListConnections.go b/service/codestarconnections/api_op_ListConnections.go index f123d828ffd..b4b274baf55 100644 --- a/service/codestarconnections/api_op_ListConnections.go +++ b/service/codestarconnections/api_op_ListConnections.go @@ -173,12 +173,13 @@ func NewListConnectionsPaginator(client ListConnectionsAPIClient, params *ListCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConnections page. @@ -201,7 +202,10 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codestarconnections/api_op_ListHosts.go b/service/codestarconnections/api_op_ListHosts.go index de9f3784186..8da0e5149d4 100644 --- a/service/codestarconnections/api_op_ListHosts.go +++ b/service/codestarconnections/api_op_ListHosts.go @@ -165,12 +165,13 @@ func NewListHostsPaginator(client ListHostsAPIClient, params *ListHostsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHostsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHosts page. @@ -193,7 +194,10 @@ func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codestarnotifications/api_op_ListEventTypes.go b/service/codestarnotifications/api_op_ListEventTypes.go index af0395b3959..d7950629efa 100644 --- a/service/codestarnotifications/api_op_ListEventTypes.go +++ b/service/codestarnotifications/api_op_ListEventTypes.go @@ -172,12 +172,13 @@ func NewListEventTypesPaginator(client ListEventTypesAPIClient, params *ListEven client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEventTypes page. @@ -200,7 +201,10 @@ func (p *ListEventTypesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codestarnotifications/api_op_ListNotificationRules.go b/service/codestarnotifications/api_op_ListNotificationRules.go index fc7cb4c9793..b617b433442 100644 --- a/service/codestarnotifications/api_op_ListNotificationRules.go +++ b/service/codestarnotifications/api_op_ListNotificationRules.go @@ -175,12 +175,13 @@ func NewListNotificationRulesPaginator(client ListNotificationRulesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotificationRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotificationRules page. @@ -203,7 +204,10 @@ func (p *ListNotificationRulesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/codestarnotifications/api_op_ListTargets.go b/service/codestarnotifications/api_op_ListTargets.go index 1889e97a9e4..13bc72bf7d1 100644 --- a/service/codestarnotifications/api_op_ListTargets.go +++ b/service/codestarnotifications/api_op_ListTargets.go @@ -172,12 +172,13 @@ func NewListTargetsPaginator(client ListTargetsAPIClient, params *ListTargetsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTargets page. @@ -200,7 +201,10 @@ func (p *ListTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentity/api_op_ListIdentityPools.go b/service/cognitoidentity/api_op_ListIdentityPools.go index 71f3b426785..38869e7ad3f 100644 --- a/service/cognitoidentity/api_op_ListIdentityPools.go +++ b/service/cognitoidentity/api_op_ListIdentityPools.go @@ -168,12 +168,13 @@ func NewListIdentityPoolsPaginator(client ListIdentityPoolsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIdentityPoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIdentityPools page. @@ -196,7 +197,10 @@ func (p *ListIdentityPoolsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go b/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go index 283c4fcf326..79263bf6577 100644 --- a/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go +++ b/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go @@ -177,12 +177,13 @@ func NewAdminListGroupsForUserPaginator(client AdminListGroupsForUserAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *AdminListGroupsForUserPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next AdminListGroupsForUser page. @@ -209,7 +210,10 @@ func (p *AdminListGroupsForUserPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go b/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go index 485a564b1c3..be982149565 100644 --- a/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go +++ b/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go @@ -177,12 +177,13 @@ func NewAdminListUserAuthEventsPaginator(client AdminListUserAuthEventsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *AdminListUserAuthEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next AdminListUserAuthEvents page. @@ -209,7 +210,10 @@ func (p *AdminListUserAuthEventsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListGroups.go b/service/cognitoidentityprovider/api_op_ListGroups.go index 64a945a4625..772f2cce476 100644 --- a/service/cognitoidentityprovider/api_op_ListGroups.go +++ b/service/cognitoidentityprovider/api_op_ListGroups.go @@ -170,12 +170,13 @@ func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. @@ -202,7 +203,10 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListIdentityProviders.go b/service/cognitoidentityprovider/api_op_ListIdentityProviders.go index e26e1f7c983..94b06fe9ab1 100644 --- a/service/cognitoidentityprovider/api_op_ListIdentityProviders.go +++ b/service/cognitoidentityprovider/api_op_ListIdentityProviders.go @@ -171,12 +171,13 @@ func NewListIdentityProvidersPaginator(client ListIdentityProvidersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIdentityProvidersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIdentityProviders page. @@ -203,7 +204,10 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListResourceServers.go b/service/cognitoidentityprovider/api_op_ListResourceServers.go index 06f1fb035df..8cfeaef51d0 100644 --- a/service/cognitoidentityprovider/api_op_ListResourceServers.go +++ b/service/cognitoidentityprovider/api_op_ListResourceServers.go @@ -171,12 +171,13 @@ func NewListResourceServersPaginator(client ListResourceServersAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceServers page. @@ -199,7 +200,10 @@ func (p *ListResourceServersPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListUserPoolClients.go b/service/cognitoidentityprovider/api_op_ListUserPoolClients.go index bb5b320b645..0e9c9ceabfd 100644 --- a/service/cognitoidentityprovider/api_op_ListUserPoolClients.go +++ b/service/cognitoidentityprovider/api_op_ListUserPoolClients.go @@ -175,12 +175,13 @@ func NewListUserPoolClientsPaginator(client ListUserPoolClientsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserPoolClientsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserPoolClients page. @@ -203,7 +204,10 @@ func (p *ListUserPoolClientsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListUserPools.go b/service/cognitoidentityprovider/api_op_ListUserPools.go index 2898747eec1..ba1acb8227e 100644 --- a/service/cognitoidentityprovider/api_op_ListUserPools.go +++ b/service/cognitoidentityprovider/api_op_ListUserPools.go @@ -170,12 +170,13 @@ func NewListUserPoolsPaginator(client ListUserPoolsAPIClient, params *ListUserPo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserPoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserPools page. @@ -198,7 +199,10 @@ func (p *ListUserPoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListUsers.go b/service/cognitoidentityprovider/api_op_ListUsers.go index c73b56afc2f..744ab5cf74b 100644 --- a/service/cognitoidentityprovider/api_op_ListUsers.go +++ b/service/cognitoidentityprovider/api_op_ListUsers.go @@ -226,12 +226,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.PaginationToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -258,7 +259,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.PaginationToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/cognitoidentityprovider/api_op_ListUsersInGroup.go b/service/cognitoidentityprovider/api_op_ListUsersInGroup.go index f5672af658c..374f715ee34 100644 --- a/service/cognitoidentityprovider/api_op_ListUsersInGroup.go +++ b/service/cognitoidentityprovider/api_op_ListUsersInGroup.go @@ -176,12 +176,13 @@ func NewListUsersInGroupPaginator(client ListUsersInGroupAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersInGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsersInGroup page. @@ -208,7 +209,10 @@ func (p *ListUsersInGroupPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListDocumentClassificationJobs.go b/service/comprehend/api_op_ListDocumentClassificationJobs.go index 20421989e0c..bed50459347 100644 --- a/service/comprehend/api_op_ListDocumentClassificationJobs.go +++ b/service/comprehend/api_op_ListDocumentClassificationJobs.go @@ -168,12 +168,13 @@ func NewListDocumentClassificationJobsPaginator(client ListDocumentClassificatio client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDocumentClassificationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDocumentClassificationJobs page. @@ -200,7 +201,10 @@ func (p *ListDocumentClassificationJobsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListDocumentClassifierSummaries.go b/service/comprehend/api_op_ListDocumentClassifierSummaries.go index 720642b5eab..d39cc011cf2 100644 --- a/service/comprehend/api_op_ListDocumentClassifierSummaries.go +++ b/service/comprehend/api_op_ListDocumentClassifierSummaries.go @@ -163,12 +163,13 @@ func NewListDocumentClassifierSummariesPaginator(client ListDocumentClassifierSu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDocumentClassifierSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDocumentClassifierSummaries page. @@ -195,7 +196,10 @@ func (p *ListDocumentClassifierSummariesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListDocumentClassifiers.go b/service/comprehend/api_op_ListDocumentClassifiers.go index cd93122d136..3169bf1dd55 100644 --- a/service/comprehend/api_op_ListDocumentClassifiers.go +++ b/service/comprehend/api_op_ListDocumentClassifiers.go @@ -167,12 +167,13 @@ func NewListDocumentClassifiersPaginator(client ListDocumentClassifiersAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDocumentClassifiersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDocumentClassifiers page. @@ -199,7 +200,10 @@ func (p *ListDocumentClassifiersPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go b/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go index f1c741ef37d..985eccbdfd4 100644 --- a/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go +++ b/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go @@ -168,12 +168,13 @@ func NewListDominantLanguageDetectionJobsPaginator(client ListDominantLanguageDe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDominantLanguageDetectionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDominantLanguageDetectionJobs page. @@ -200,7 +201,10 @@ func (p *ListDominantLanguageDetectionJobsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListEntitiesDetectionJobs.go b/service/comprehend/api_op_ListEntitiesDetectionJobs.go index b42957dfc2c..0a02700a415 100644 --- a/service/comprehend/api_op_ListEntitiesDetectionJobs.go +++ b/service/comprehend/api_op_ListEntitiesDetectionJobs.go @@ -167,12 +167,13 @@ func NewListEntitiesDetectionJobsPaginator(client ListEntitiesDetectionJobsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntitiesDetectionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntitiesDetectionJobs page. @@ -199,7 +200,10 @@ func (p *ListEntitiesDetectionJobsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListEntityRecognizerSummaries.go b/service/comprehend/api_op_ListEntityRecognizerSummaries.go index 97f50c034d9..436e91463a2 100644 --- a/service/comprehend/api_op_ListEntityRecognizerSummaries.go +++ b/service/comprehend/api_op_ListEntityRecognizerSummaries.go @@ -163,12 +163,13 @@ func NewListEntityRecognizerSummariesPaginator(client ListEntityRecognizerSummar client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntityRecognizerSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntityRecognizerSummaries page. @@ -195,7 +196,10 @@ func (p *ListEntityRecognizerSummariesPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListEntityRecognizers.go b/service/comprehend/api_op_ListEntityRecognizers.go index 3d40baf54c1..99630072311 100644 --- a/service/comprehend/api_op_ListEntityRecognizers.go +++ b/service/comprehend/api_op_ListEntityRecognizers.go @@ -170,12 +170,13 @@ func NewListEntityRecognizersPaginator(client ListEntityRecognizersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntityRecognizersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntityRecognizers page. @@ -202,7 +203,10 @@ func (p *ListEntityRecognizersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListEventsDetectionJobs.go b/service/comprehend/api_op_ListEventsDetectionJobs.go index 6c101c41742..7a291f992cb 100644 --- a/service/comprehend/api_op_ListEventsDetectionJobs.go +++ b/service/comprehend/api_op_ListEventsDetectionJobs.go @@ -167,12 +167,13 @@ func NewListEventsDetectionJobsPaginator(client ListEventsDetectionJobsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventsDetectionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEventsDetectionJobs page. @@ -199,7 +200,10 @@ func (p *ListEventsDetectionJobsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go b/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go index 0c03b53c290..15b77545234 100644 --- a/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go +++ b/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go @@ -168,12 +168,13 @@ func NewListKeyPhrasesDetectionJobsPaginator(client ListKeyPhrasesDetectionJobsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKeyPhrasesDetectionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKeyPhrasesDetectionJobs page. @@ -200,7 +201,10 @@ func (p *ListKeyPhrasesDetectionJobsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListSentimentDetectionJobs.go b/service/comprehend/api_op_ListSentimentDetectionJobs.go index 798e214ec27..7b9f652f069 100644 --- a/service/comprehend/api_op_ListSentimentDetectionJobs.go +++ b/service/comprehend/api_op_ListSentimentDetectionJobs.go @@ -168,12 +168,13 @@ func NewListSentimentDetectionJobsPaginator(client ListSentimentDetectionJobsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSentimentDetectionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSentimentDetectionJobs page. @@ -200,7 +201,10 @@ func (p *ListSentimentDetectionJobsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/comprehend/api_op_ListTopicsDetectionJobs.go b/service/comprehend/api_op_ListTopicsDetectionJobs.go index f2be1db3d2f..faad68b3942 100644 --- a/service/comprehend/api_op_ListTopicsDetectionJobs.go +++ b/service/comprehend/api_op_ListTopicsDetectionJobs.go @@ -167,12 +167,13 @@ func NewListTopicsDetectionJobsPaginator(client ListTopicsDetectionJobsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTopicsDetectionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTopicsDetectionJobs page. @@ -199,7 +200,10 @@ func (p *ListTopicsDetectionJobsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go b/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go index f838a9d767b..df51b9018c1 100644 --- a/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go +++ b/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go @@ -181,12 +181,13 @@ func NewDescribeAggregateComplianceByConfigRulesPaginator(client DescribeAggrega client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAggregateComplianceByConfigRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAggregateComplianceByConfigRules page. @@ -209,7 +210,10 @@ func (p *DescribeAggregateComplianceByConfigRulesPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go b/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go index f0c19df9cc9..f201e032a72 100644 --- a/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go +++ b/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go @@ -183,12 +183,13 @@ func NewDescribeAggregateComplianceByConformancePacksPaginator(client DescribeAg client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAggregateComplianceByConformancePacksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAggregateComplianceByConformancePacks page. @@ -211,7 +212,10 @@ func (p *DescribeAggregateComplianceByConformancePacksPaginator) NextPage(ctx co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeAggregationAuthorizations.go b/service/configservice/api_op_DescribeAggregationAuthorizations.go index 9fded4fc0f2..a61d954aa29 100644 --- a/service/configservice/api_op_DescribeAggregationAuthorizations.go +++ b/service/configservice/api_op_DescribeAggregationAuthorizations.go @@ -169,12 +169,13 @@ func NewDescribeAggregationAuthorizationsPaginator(client DescribeAggregationAut client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAggregationAuthorizationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAggregationAuthorizations page. @@ -197,7 +198,10 @@ func (p *DescribeAggregationAuthorizationsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeComplianceByConfigRule.go b/service/configservice/api_op_DescribeComplianceByConfigRule.go index 8cf8c9ecef0..32bac13dbb8 100644 --- a/service/configservice/api_op_DescribeComplianceByConfigRule.go +++ b/service/configservice/api_op_DescribeComplianceByConfigRule.go @@ -185,12 +185,13 @@ func NewDescribeComplianceByConfigRulePaginator(client DescribeComplianceByConfi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeComplianceByConfigRulePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeComplianceByConfigRule page. @@ -211,7 +212,10 @@ func (p *DescribeComplianceByConfigRulePaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeComplianceByResource.go b/service/configservice/api_op_DescribeComplianceByResource.go index 7a3222137e5..4a65a7d5808 100644 --- a/service/configservice/api_op_DescribeComplianceByResource.go +++ b/service/configservice/api_op_DescribeComplianceByResource.go @@ -208,12 +208,13 @@ func NewDescribeComplianceByResourcePaginator(client DescribeComplianceByResourc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeComplianceByResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeComplianceByResource page. @@ -236,7 +237,10 @@ func (p *DescribeComplianceByResourcePaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go index 346ae00c357..a9a9c04fa3f 100644 --- a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go +++ b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go @@ -183,12 +183,13 @@ func NewDescribeConfigRuleEvaluationStatusPaginator(client DescribeConfigRuleEva client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConfigRuleEvaluationStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConfigRuleEvaluationStatus page. @@ -211,7 +212,10 @@ func (p *DescribeConfigRuleEvaluationStatusPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConfigRules.go b/service/configservice/api_op_DescribeConfigRules.go index 799ff3ea260..6be217467e1 100644 --- a/service/configservice/api_op_DescribeConfigRules.go +++ b/service/configservice/api_op_DescribeConfigRules.go @@ -160,12 +160,13 @@ func NewDescribeConfigRulesPaginator(client DescribeConfigRulesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConfigRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConfigRules page. @@ -186,7 +187,10 @@ func (p *DescribeConfigRulesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go b/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go index 26b6db2bd49..bcb28d0d016 100644 --- a/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go +++ b/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go @@ -189,12 +189,13 @@ func NewDescribeConfigurationAggregatorSourcesStatusPaginator(client DescribeCon client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConfigurationAggregatorSourcesStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConfigurationAggregatorSourcesStatus page. @@ -217,7 +218,10 @@ func (p *DescribeConfigurationAggregatorSourcesStatusPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConfigurationAggregators.go b/service/configservice/api_op_DescribeConfigurationAggregators.go index 033ed01cd66..2f4a31806fa 100644 --- a/service/configservice/api_op_DescribeConfigurationAggregators.go +++ b/service/configservice/api_op_DescribeConfigurationAggregators.go @@ -172,12 +172,13 @@ func NewDescribeConfigurationAggregatorsPaginator(client DescribeConfigurationAg client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConfigurationAggregatorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConfigurationAggregators page. @@ -200,7 +201,10 @@ func (p *DescribeConfigurationAggregatorsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConformancePackCompliance.go b/service/configservice/api_op_DescribeConformancePackCompliance.go index a333da52a16..5e212d98b10 100644 --- a/service/configservice/api_op_DescribeConformancePackCompliance.go +++ b/service/configservice/api_op_DescribeConformancePackCompliance.go @@ -186,12 +186,13 @@ func NewDescribeConformancePackCompliancePaginator(client DescribeConformancePac client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConformancePackCompliancePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConformancePackCompliance page. @@ -214,7 +215,10 @@ func (p *DescribeConformancePackCompliancePaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConformancePackStatus.go b/service/configservice/api_op_DescribeConformancePackStatus.go index ca448888b94..65e6a114e40 100644 --- a/service/configservice/api_op_DescribeConformancePackStatus.go +++ b/service/configservice/api_op_DescribeConformancePackStatus.go @@ -169,12 +169,13 @@ func NewDescribeConformancePackStatusPaginator(client DescribeConformancePackSta client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConformancePackStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConformancePackStatus page. @@ -197,7 +198,10 @@ func (p *DescribeConformancePackStatusPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeConformancePacks.go b/service/configservice/api_op_DescribeConformancePacks.go index 3f53eebfbe6..44dfc254a22 100644 --- a/service/configservice/api_op_DescribeConformancePacks.go +++ b/service/configservice/api_op_DescribeConformancePacks.go @@ -169,12 +169,13 @@ func NewDescribeConformancePacksPaginator(client DescribeConformancePacksAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConformancePacksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConformancePacks page. @@ -197,7 +198,10 @@ func (p *DescribeConformancePacksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go b/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go index 40936cbc1db..593645724ce 100644 --- a/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go +++ b/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go @@ -178,12 +178,13 @@ func NewDescribeOrganizationConfigRuleStatusesPaginator(client DescribeOrganizat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrganizationConfigRuleStatusesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrganizationConfigRuleStatuses page. @@ -206,7 +207,10 @@ func (p *DescribeOrganizationConfigRuleStatusesPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeOrganizationConfigRules.go b/service/configservice/api_op_DescribeOrganizationConfigRules.go index cbd5149857a..d3cf997753e 100644 --- a/service/configservice/api_op_DescribeOrganizationConfigRules.go +++ b/service/configservice/api_op_DescribeOrganizationConfigRules.go @@ -175,12 +175,13 @@ func NewDescribeOrganizationConfigRulesPaginator(client DescribeOrganizationConf client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrganizationConfigRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrganizationConfigRules page. @@ -203,7 +204,10 @@ func (p *DescribeOrganizationConfigRulesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go b/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go index a2136df83f1..a88a00ada7b 100644 --- a/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go +++ b/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go @@ -178,12 +178,13 @@ func NewDescribeOrganizationConformancePackStatusesPaginator(client DescribeOrga client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrganizationConformancePackStatusesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrganizationConformancePackStatuses page. @@ -206,7 +207,10 @@ func (p *DescribeOrganizationConformancePackStatusesPaginator) NextPage(ctx cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeOrganizationConformancePacks.go b/service/configservice/api_op_DescribeOrganizationConformancePacks.go index 7773503a345..600ead92f10 100644 --- a/service/configservice/api_op_DescribeOrganizationConformancePacks.go +++ b/service/configservice/api_op_DescribeOrganizationConformancePacks.go @@ -173,12 +173,13 @@ func NewDescribeOrganizationConformancePacksPaginator(client DescribeOrganizatio client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrganizationConformancePacksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrganizationConformancePacks page. @@ -201,7 +202,10 @@ func (p *DescribeOrganizationConformancePacksPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribePendingAggregationRequests.go b/service/configservice/api_op_DescribePendingAggregationRequests.go index 8e794dd2630..4f4846a9748 100644 --- a/service/configservice/api_op_DescribePendingAggregationRequests.go +++ b/service/configservice/api_op_DescribePendingAggregationRequests.go @@ -167,12 +167,13 @@ func NewDescribePendingAggregationRequestsPaginator(client DescribePendingAggreg client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePendingAggregationRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePendingAggregationRequests page. @@ -195,7 +196,10 @@ func (p *DescribePendingAggregationRequestsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeRemediationExceptions.go b/service/configservice/api_op_DescribeRemediationExceptions.go index 55b329f0a10..6b9f8d1f2dc 100644 --- a/service/configservice/api_op_DescribeRemediationExceptions.go +++ b/service/configservice/api_op_DescribeRemediationExceptions.go @@ -188,12 +188,13 @@ func NewDescribeRemediationExceptionsPaginator(client DescribeRemediationExcepti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRemediationExceptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRemediationExceptions page. @@ -216,7 +217,10 @@ func (p *DescribeRemediationExceptionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeRemediationExecutionStatus.go b/service/configservice/api_op_DescribeRemediationExecutionStatus.go index 9a255b74a23..94f57eadd80 100644 --- a/service/configservice/api_op_DescribeRemediationExecutionStatus.go +++ b/service/configservice/api_op_DescribeRemediationExecutionStatus.go @@ -182,12 +182,13 @@ func NewDescribeRemediationExecutionStatusPaginator(client DescribeRemediationEx client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRemediationExecutionStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRemediationExecutionStatus page. @@ -210,7 +211,10 @@ func (p *DescribeRemediationExecutionStatusPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_DescribeRetentionConfigurations.go b/service/configservice/api_op_DescribeRetentionConfigurations.go index 559c42642d6..9b398e70ef1 100644 --- a/service/configservice/api_op_DescribeRetentionConfigurations.go +++ b/service/configservice/api_op_DescribeRetentionConfigurations.go @@ -165,12 +165,13 @@ func NewDescribeRetentionConfigurationsPaginator(client DescribeRetentionConfigu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRetentionConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRetentionConfigurations page. @@ -191,7 +192,10 @@ func (p *DescribeRetentionConfigurationsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go index 1d31cc84a23..cad9b629de4 100644 --- a/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go @@ -202,12 +202,13 @@ func NewGetAggregateComplianceDetailsByConfigRulePaginator(client GetAggregateCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAggregateComplianceDetailsByConfigRulePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAggregateComplianceDetailsByConfigRule page. @@ -230,7 +231,10 @@ func (p *GetAggregateComplianceDetailsByConfigRulePaginator) NextPage(ctx contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go b/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go index f6458d2cc3a..90a00f8864c 100644 --- a/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go +++ b/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go @@ -188,12 +188,13 @@ func NewGetAggregateConfigRuleComplianceSummaryPaginator(client GetAggregateConf client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAggregateConfigRuleComplianceSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAggregateConfigRuleComplianceSummary page. @@ -216,7 +217,10 @@ func (p *GetAggregateConfigRuleComplianceSummaryPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go b/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go index 32adec4a574..d299bde1d55 100644 --- a/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go +++ b/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go @@ -191,12 +191,13 @@ func NewGetAggregateConformancePackComplianceSummaryPaginator(client GetAggregat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAggregateConformancePackComplianceSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAggregateConformancePackComplianceSummary page. @@ -219,7 +220,10 @@ func (p *GetAggregateConformancePackComplianceSummaryPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go b/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go index e8e8aadc79e..23fa338f99e 100644 --- a/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go +++ b/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go @@ -199,12 +199,13 @@ func NewGetAggregateDiscoveredResourceCountsPaginator(client GetAggregateDiscove client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAggregateDiscoveredResourceCountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAggregateDiscoveredResourceCounts page. @@ -227,7 +228,10 @@ func (p *GetAggregateDiscoveredResourceCountsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go index d3208fa96a3..f2beafa0774 100644 --- a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go @@ -187,12 +187,13 @@ func NewGetComplianceDetailsByConfigRulePaginator(client GetComplianceDetailsByC client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetComplianceDetailsByConfigRulePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetComplianceDetailsByConfigRule page. @@ -215,7 +216,10 @@ func (p *GetComplianceDetailsByConfigRulePaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetComplianceDetailsByResource.go b/service/configservice/api_op_GetComplianceDetailsByResource.go index e27f30ac3bd..5df708b6405 100644 --- a/service/configservice/api_op_GetComplianceDetailsByResource.go +++ b/service/configservice/api_op_GetComplianceDetailsByResource.go @@ -180,12 +180,13 @@ func NewGetComplianceDetailsByResourcePaginator(client GetComplianceDetailsByRes client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetComplianceDetailsByResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetComplianceDetailsByResource page. @@ -206,7 +207,10 @@ func (p *GetComplianceDetailsByResourcePaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetConformancePackComplianceDetails.go b/service/configservice/api_op_GetConformancePackComplianceDetails.go index d4d533080b4..762e26ae826 100644 --- a/service/configservice/api_op_GetConformancePackComplianceDetails.go +++ b/service/configservice/api_op_GetConformancePackComplianceDetails.go @@ -184,12 +184,13 @@ func NewGetConformancePackComplianceDetailsPaginator(client GetConformancePackCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetConformancePackComplianceDetailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetConformancePackComplianceDetails page. @@ -212,7 +213,10 @@ func (p *GetConformancePackComplianceDetailsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetConformancePackComplianceSummary.go b/service/configservice/api_op_GetConformancePackComplianceSummary.go index 0337b321cc5..05cb7e2e4ca 100644 --- a/service/configservice/api_op_GetConformancePackComplianceSummary.go +++ b/service/configservice/api_op_GetConformancePackComplianceSummary.go @@ -174,12 +174,13 @@ func NewGetConformancePackComplianceSummaryPaginator(client GetConformancePackCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetConformancePackComplianceSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetConformancePackComplianceSummary page. @@ -202,7 +203,10 @@ func (p *GetConformancePackComplianceSummaryPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetDiscoveredResourceCounts.go b/service/configservice/api_op_GetDiscoveredResourceCounts.go index a1602eb5c61..b4c405b289b 100644 --- a/service/configservice/api_op_GetDiscoveredResourceCounts.go +++ b/service/configservice/api_op_GetDiscoveredResourceCounts.go @@ -232,12 +232,13 @@ func NewGetDiscoveredResourceCountsPaginator(client GetDiscoveredResourceCountsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDiscoveredResourceCountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDiscoveredResourceCounts page. @@ -260,7 +261,10 @@ func (p *GetDiscoveredResourceCountsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go b/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go index 29262fd9208..80b3547dfa5 100644 --- a/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go +++ b/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go @@ -182,12 +182,13 @@ func NewGetOrganizationConfigRuleDetailedStatusPaginator(client GetOrganizationC client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetOrganizationConfigRuleDetailedStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetOrganizationConfigRuleDetailedStatus page. @@ -210,7 +211,10 @@ func (p *GetOrganizationConfigRuleDetailedStatusPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go b/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go index 0582dd574ce..6792ac9e3a7 100644 --- a/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go +++ b/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go @@ -182,12 +182,13 @@ func NewGetOrganizationConformancePackDetailedStatusPaginator(client GetOrganiza client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetOrganizationConformancePackDetailedStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetOrganizationConformancePackDetailedStatus page. @@ -210,7 +211,10 @@ func (p *GetOrganizationConformancePackDetailedStatusPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_GetResourceConfigHistory.go b/service/configservice/api_op_GetResourceConfigHistory.go index 2cc8f298bbf..f9bd738a9b9 100644 --- a/service/configservice/api_op_GetResourceConfigHistory.go +++ b/service/configservice/api_op_GetResourceConfigHistory.go @@ -208,12 +208,13 @@ func NewGetResourceConfigHistoryPaginator(client GetResourceConfigHistoryAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourceConfigHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourceConfigHistory page. @@ -236,7 +237,10 @@ func (p *GetResourceConfigHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_ListAggregateDiscoveredResources.go b/service/configservice/api_op_ListAggregateDiscoveredResources.go index e95de2fc5df..4a0c2d36465 100644 --- a/service/configservice/api_op_ListAggregateDiscoveredResources.go +++ b/service/configservice/api_op_ListAggregateDiscoveredResources.go @@ -191,12 +191,13 @@ func NewListAggregateDiscoveredResourcesPaginator(client ListAggregateDiscovered client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAggregateDiscoveredResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAggregateDiscoveredResources page. @@ -219,7 +220,10 @@ func (p *ListAggregateDiscoveredResourcesPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_ListDiscoveredResources.go b/service/configservice/api_op_ListDiscoveredResources.go index 15521e5561b..2ca5794f63e 100644 --- a/service/configservice/api_op_ListDiscoveredResources.go +++ b/service/configservice/api_op_ListDiscoveredResources.go @@ -203,12 +203,13 @@ func NewListDiscoveredResourcesPaginator(client ListDiscoveredResourcesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDiscoveredResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDiscoveredResources page. @@ -231,7 +232,10 @@ func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_ListStoredQueries.go b/service/configservice/api_op_ListStoredQueries.go index 5d7745e8d81..295760f9b19 100644 --- a/service/configservice/api_op_ListStoredQueries.go +++ b/service/configservice/api_op_ListStoredQueries.go @@ -166,12 +166,13 @@ func NewListStoredQueriesPaginator(client ListStoredQueriesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStoredQueriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStoredQueries page. @@ -194,7 +195,10 @@ func (p *ListStoredQueriesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_ListTagsForResource.go b/service/configservice/api_op_ListTagsForResource.go index b1b4f87d872..702d9a93bdd 100644 --- a/service/configservice/api_op_ListTagsForResource.go +++ b/service/configservice/api_op_ListTagsForResource.go @@ -177,12 +177,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -205,7 +206,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_SelectAggregateResourceConfig.go b/service/configservice/api_op_SelectAggregateResourceConfig.go index 5c78abb252a..376b4b8a5b9 100644 --- a/service/configservice/api_op_SelectAggregateResourceConfig.go +++ b/service/configservice/api_op_SelectAggregateResourceConfig.go @@ -198,12 +198,13 @@ func NewSelectAggregateResourceConfigPaginator(client SelectAggregateResourceCon client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SelectAggregateResourceConfigPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SelectAggregateResourceConfig page. @@ -226,7 +227,10 @@ func (p *SelectAggregateResourceConfigPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/configservice/api_op_SelectResourceConfig.go b/service/configservice/api_op_SelectResourceConfig.go index 9d0abeaa8e1..fc77fde0b15 100644 --- a/service/configservice/api_op_SelectResourceConfig.go +++ b/service/configservice/api_op_SelectResourceConfig.go @@ -179,12 +179,13 @@ func NewSelectResourceConfigPaginator(client SelectResourceConfigAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SelectResourceConfigPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SelectResourceConfig page. @@ -207,7 +208,10 @@ func (p *SelectResourceConfigPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_GetCurrentMetricData.go b/service/connect/api_op_GetCurrentMetricData.go index 51386d7dfa6..078ad4f8a96 100644 --- a/service/connect/api_op_GetCurrentMetricData.go +++ b/service/connect/api_op_GetCurrentMetricData.go @@ -240,12 +240,13 @@ func NewGetCurrentMetricDataPaginator(client GetCurrentMetricDataAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCurrentMetricDataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCurrentMetricData page. @@ -268,7 +269,10 @@ func (p *GetCurrentMetricDataPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_GetMetricData.go b/service/connect/api_op_GetMetricData.go index a64ff5b481a..1f9f52a3667 100644 --- a/service/connect/api_op_GetMetricData.go +++ b/service/connect/api_op_GetMetricData.go @@ -240,12 +240,13 @@ func NewGetMetricDataPaginator(client GetMetricDataAPIClient, params *GetMetricD client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetMetricDataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetMetricData page. @@ -268,7 +269,10 @@ func (p *GetMetricDataPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListAgentStatuses.go b/service/connect/api_op_ListAgentStatuses.go index 41bb1074f1c..30789ccee95 100644 --- a/service/connect/api_op_ListAgentStatuses.go +++ b/service/connect/api_op_ListAgentStatuses.go @@ -174,12 +174,13 @@ func NewListAgentStatusesPaginator(client ListAgentStatusesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAgentStatusesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAgentStatuses page. @@ -202,7 +203,10 @@ func (p *ListAgentStatusesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListApprovedOrigins.go b/service/connect/api_op_ListApprovedOrigins.go index 987721ad936..3d5188c435c 100644 --- a/service/connect/api_op_ListApprovedOrigins.go +++ b/service/connect/api_op_ListApprovedOrigins.go @@ -171,12 +171,13 @@ func NewListApprovedOriginsPaginator(client ListApprovedOriginsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApprovedOriginsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApprovedOrigins page. @@ -199,7 +200,10 @@ func (p *ListApprovedOriginsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListBots.go b/service/connect/api_op_ListBots.go index 9a29d74a1bb..1ed1b678bfc 100644 --- a/service/connect/api_op_ListBots.go +++ b/service/connect/api_op_ListBots.go @@ -177,12 +177,13 @@ func NewListBotsPaginator(client ListBotsAPIClient, params *ListBotsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBots page. @@ -205,7 +206,10 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListContactFlowModules.go b/service/connect/api_op_ListContactFlowModules.go index 9e180a16c94..18961305e84 100644 --- a/service/connect/api_op_ListContactFlowModules.go +++ b/service/connect/api_op_ListContactFlowModules.go @@ -175,12 +175,13 @@ func NewListContactFlowModulesPaginator(client ListContactFlowModulesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactFlowModulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContactFlowModules page. @@ -203,7 +204,10 @@ func (p *ListContactFlowModulesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListContactFlows.go b/service/connect/api_op_ListContactFlows.go index b0c0ea1a8bd..71c37facbc1 100644 --- a/service/connect/api_op_ListContactFlows.go +++ b/service/connect/api_op_ListContactFlows.go @@ -179,12 +179,13 @@ func NewListContactFlowsPaginator(client ListContactFlowsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactFlowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContactFlows page. @@ -207,7 +208,10 @@ func (p *ListContactFlowsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListContactReferences.go b/service/connect/api_op_ListContactReferences.go index 94fd927338b..752a78435fd 100644 --- a/service/connect/api_op_ListContactReferences.go +++ b/service/connect/api_op_ListContactReferences.go @@ -177,12 +177,13 @@ func NewListContactReferencesPaginator(client ListContactReferencesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactReferencesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContactReferences page. @@ -203,7 +204,10 @@ func (p *ListContactReferencesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListHoursOfOperations.go b/service/connect/api_op_ListHoursOfOperations.go index 0fbb58ac28b..bd70c1f8a60 100644 --- a/service/connect/api_op_ListHoursOfOperations.go +++ b/service/connect/api_op_ListHoursOfOperations.go @@ -175,12 +175,13 @@ func NewListHoursOfOperationsPaginator(client ListHoursOfOperationsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHoursOfOperationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHoursOfOperations page. @@ -203,7 +204,10 @@ func (p *ListHoursOfOperationsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListInstanceAttributes.go b/service/connect/api_op_ListInstanceAttributes.go index 8410c3030f0..1e890cdc629 100644 --- a/service/connect/api_op_ListInstanceAttributes.go +++ b/service/connect/api_op_ListInstanceAttributes.go @@ -172,12 +172,13 @@ func NewListInstanceAttributesPaginator(client ListInstanceAttributesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceAttributes page. @@ -200,7 +201,10 @@ func (p *ListInstanceAttributesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListInstanceStorageConfigs.go b/service/connect/api_op_ListInstanceStorageConfigs.go index e106b1e6864..811c58e9fb7 100644 --- a/service/connect/api_op_ListInstanceStorageConfigs.go +++ b/service/connect/api_op_ListInstanceStorageConfigs.go @@ -180,12 +180,13 @@ func NewListInstanceStorageConfigsPaginator(client ListInstanceStorageConfigsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceStorageConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceStorageConfigs page. @@ -208,7 +209,10 @@ func (p *ListInstanceStorageConfigsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListInstances.go b/service/connect/api_op_ListInstances.go index 15044bcd552..53e3faa14b8 100644 --- a/service/connect/api_op_ListInstances.go +++ b/service/connect/api_op_ListInstances.go @@ -164,12 +164,13 @@ func NewListInstancesPaginator(client ListInstancesAPIClient, params *ListInstan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstances page. @@ -192,7 +193,10 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListIntegrationAssociations.go b/service/connect/api_op_ListIntegrationAssociations.go index c48cd96a572..99c5918873b 100644 --- a/service/connect/api_op_ListIntegrationAssociations.go +++ b/service/connect/api_op_ListIntegrationAssociations.go @@ -177,12 +177,13 @@ func NewListIntegrationAssociationsPaginator(client ListIntegrationAssociationsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIntegrationAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIntegrationAssociations page. @@ -205,7 +206,10 @@ func (p *ListIntegrationAssociationsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListLambdaFunctions.go b/service/connect/api_op_ListLambdaFunctions.go index 578b2924b51..092b2d9e5fc 100644 --- a/service/connect/api_op_ListLambdaFunctions.go +++ b/service/connect/api_op_ListLambdaFunctions.go @@ -172,12 +172,13 @@ func NewListLambdaFunctionsPaginator(client ListLambdaFunctionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLambdaFunctionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLambdaFunctions page. @@ -200,7 +201,10 @@ func (p *ListLambdaFunctionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListLexBots.go b/service/connect/api_op_ListLexBots.go index 8a754d696bd..10a8ef042aa 100644 --- a/service/connect/api_op_ListLexBots.go +++ b/service/connect/api_op_ListLexBots.go @@ -174,12 +174,13 @@ func NewListLexBotsPaginator(client ListLexBotsAPIClient, params *ListLexBotsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLexBotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLexBots page. @@ -202,7 +203,10 @@ func (p *ListLexBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListPhoneNumbers.go b/service/connect/api_op_ListPhoneNumbers.go index aa9ee6e2c89..6d0dc52e5af 100644 --- a/service/connect/api_op_ListPhoneNumbers.go +++ b/service/connect/api_op_ListPhoneNumbers.go @@ -180,12 +180,13 @@ func NewListPhoneNumbersPaginator(client ListPhoneNumbersAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPhoneNumbersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPhoneNumbers page. @@ -208,7 +209,10 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListPrompts.go b/service/connect/api_op_ListPrompts.go index 931ca16aa7f..3652bfc914e 100644 --- a/service/connect/api_op_ListPrompts.go +++ b/service/connect/api_op_ListPrompts.go @@ -169,12 +169,13 @@ func NewListPromptsPaginator(client ListPromptsAPIClient, params *ListPromptsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPromptsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPrompts page. @@ -197,7 +198,10 @@ func (p *ListPromptsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListQueueQuickConnects.go b/service/connect/api_op_ListQueueQuickConnects.go index 2eb5a3a3f93..714a6e75969 100644 --- a/service/connect/api_op_ListQueueQuickConnects.go +++ b/service/connect/api_op_ListQueueQuickConnects.go @@ -177,12 +177,13 @@ func NewListQueueQuickConnectsPaginator(client ListQueueQuickConnectsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQueueQuickConnectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQueueQuickConnects page. @@ -205,7 +206,10 @@ func (p *ListQueueQuickConnectsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListQueues.go b/service/connect/api_op_ListQueues.go index 324af345086..c72a8e1bdcc 100644 --- a/service/connect/api_op_ListQueues.go +++ b/service/connect/api_op_ListQueues.go @@ -178,12 +178,13 @@ func NewListQueuesPaginator(client ListQueuesAPIClient, params *ListQueuesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQueues page. @@ -206,7 +207,10 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListQuickConnects.go b/service/connect/api_op_ListQuickConnects.go index 6b7d438c6b7..7f8d0cddfd1 100644 --- a/service/connect/api_op_ListQuickConnects.go +++ b/service/connect/api_op_ListQuickConnects.go @@ -176,12 +176,13 @@ func NewListQuickConnectsPaginator(client ListQuickConnectsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQuickConnectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQuickConnects page. @@ -204,7 +205,10 @@ func (p *ListQuickConnectsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListRoutingProfileQueues.go b/service/connect/api_op_ListRoutingProfileQueues.go index c62388850d5..e2767978539 100644 --- a/service/connect/api_op_ListRoutingProfileQueues.go +++ b/service/connect/api_op_ListRoutingProfileQueues.go @@ -177,12 +177,13 @@ func NewListRoutingProfileQueuesPaginator(client ListRoutingProfileQueuesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoutingProfileQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoutingProfileQueues page. @@ -205,7 +206,10 @@ func (p *ListRoutingProfileQueuesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListRoutingProfiles.go b/service/connect/api_op_ListRoutingProfiles.go index f8735344abd..15cca9aee3a 100644 --- a/service/connect/api_op_ListRoutingProfiles.go +++ b/service/connect/api_op_ListRoutingProfiles.go @@ -177,12 +177,13 @@ func NewListRoutingProfilesPaginator(client ListRoutingProfilesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoutingProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoutingProfiles page. @@ -205,7 +206,10 @@ func (p *ListRoutingProfilesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListSecurityKeys.go b/service/connect/api_op_ListSecurityKeys.go index 3dc382d8737..dc96126626f 100644 --- a/service/connect/api_op_ListSecurityKeys.go +++ b/service/connect/api_op_ListSecurityKeys.go @@ -171,12 +171,13 @@ func NewListSecurityKeysPaginator(client ListSecurityKeysAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityKeys page. @@ -199,7 +200,10 @@ func (p *ListSecurityKeysPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListSecurityProfilePermissions.go b/service/connect/api_op_ListSecurityProfilePermissions.go index 4bbc4ab79b2..6156a35ff62 100644 --- a/service/connect/api_op_ListSecurityProfilePermissions.go +++ b/service/connect/api_op_ListSecurityProfilePermissions.go @@ -178,12 +178,13 @@ func NewListSecurityProfilePermissionsPaginator(client ListSecurityProfilePermis client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityProfilePermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityProfilePermissions page. @@ -206,7 +207,10 @@ func (p *ListSecurityProfilePermissionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListSecurityProfiles.go b/service/connect/api_op_ListSecurityProfiles.go index d4476e8559e..fe7e916ea1c 100644 --- a/service/connect/api_op_ListSecurityProfiles.go +++ b/service/connect/api_op_ListSecurityProfiles.go @@ -175,12 +175,13 @@ func NewListSecurityProfilesPaginator(client ListSecurityProfilesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityProfiles page. @@ -203,7 +204,10 @@ func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListUseCases.go b/service/connect/api_op_ListUseCases.go index 72456aec95a..8fe19cdf581 100644 --- a/service/connect/api_op_ListUseCases.go +++ b/service/connect/api_op_ListUseCases.go @@ -176,12 +176,13 @@ func NewListUseCasesPaginator(client ListUseCasesAPIClient, params *ListUseCases client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUseCasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUseCases page. @@ -204,7 +205,10 @@ func (p *ListUseCasesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListUserHierarchyGroups.go b/service/connect/api_op_ListUserHierarchyGroups.go index e717027f1d4..162fd6f6436 100644 --- a/service/connect/api_op_ListUserHierarchyGroups.go +++ b/service/connect/api_op_ListUserHierarchyGroups.go @@ -176,12 +176,13 @@ func NewListUserHierarchyGroupsPaginator(client ListUserHierarchyGroupsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserHierarchyGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserHierarchyGroups page. @@ -204,7 +205,10 @@ func (p *ListUserHierarchyGroupsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connect/api_op_ListUsers.go b/service/connect/api_op_ListUsers.go index 1b1e4959ef5..eabc7947e0b 100644 --- a/service/connect/api_op_ListUsers.go +++ b/service/connect/api_op_ListUsers.go @@ -170,12 +170,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -198,7 +199,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go b/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go index c2dff1a0518..4aee7a2e620 100644 --- a/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go +++ b/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go @@ -191,12 +191,13 @@ func NewListRealtimeContactAnalysisSegmentsPaginator(client ListRealtimeContactA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRealtimeContactAnalysisSegmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRealtimeContactAnalysisSegments page. @@ -219,7 +220,10 @@ func (p *ListRealtimeContactAnalysisSegmentsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/connectparticipant/api_op_GetTranscript.go b/service/connectparticipant/api_op_GetTranscript.go index 256a7940cfb..94308dc34b4 100644 --- a/service/connectparticipant/api_op_GetTranscript.go +++ b/service/connectparticipant/api_op_GetTranscript.go @@ -189,12 +189,13 @@ func NewGetTranscriptPaginator(client GetTranscriptAPIClient, params *GetTranscr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTranscriptPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTranscript page. @@ -217,7 +218,10 @@ func (p *GetTranscriptPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/costandusagereportservice/api_op_DescribeReportDefinitions.go b/service/costandusagereportservice/api_op_DescribeReportDefinitions.go index ede4da4382e..11d7df69c1c 100644 --- a/service/costandusagereportservice/api_op_DescribeReportDefinitions.go +++ b/service/costandusagereportservice/api_op_DescribeReportDefinitions.go @@ -164,12 +164,13 @@ func NewDescribeReportDefinitionsPaginator(client DescribeReportDefinitionsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReportDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReportDefinitions page. @@ -196,7 +197,10 @@ func (p *DescribeReportDefinitionsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/costexplorer/api_op_GetSavingsPlansCoverage.go b/service/costexplorer/api_op_GetSavingsPlansCoverage.go index aad937940a7..3d599089b5a 100644 --- a/service/costexplorer/api_op_GetSavingsPlansCoverage.go +++ b/service/costexplorer/api_op_GetSavingsPlansCoverage.go @@ -250,12 +250,13 @@ func NewGetSavingsPlansCoveragePaginator(client GetSavingsPlansCoverageAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSavingsPlansCoveragePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSavingsPlansCoverage page. @@ -278,7 +279,10 @@ func (p *GetSavingsPlansCoveragePaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go b/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go index 307bba1196a..6d010074b1e 100644 --- a/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go +++ b/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go @@ -242,12 +242,13 @@ func NewGetSavingsPlansUtilizationDetailsPaginator(client GetSavingsPlansUtiliza client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSavingsPlansUtilizationDetailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSavingsPlansUtilizationDetails page. @@ -270,7 +271,10 @@ func (p *GetSavingsPlansUtilizationDetailsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/costexplorer/api_op_ListCostCategoryDefinitions.go b/service/costexplorer/api_op_ListCostCategoryDefinitions.go index fcfa6c1ab73..3308c1e8731 100644 --- a/service/costexplorer/api_op_ListCostCategoryDefinitions.go +++ b/service/costexplorer/api_op_ListCostCategoryDefinitions.go @@ -177,12 +177,13 @@ func NewListCostCategoryDefinitionsPaginator(client ListCostCategoryDefinitionsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCostCategoryDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCostCategoryDefinitions page. @@ -205,7 +206,10 @@ func (p *ListCostCategoryDefinitionsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go b/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go index a6dd239048c..f6ef2d50fc5 100644 --- a/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go @@ -216,12 +216,13 @@ func NewDescribeApplicableIndividualAssessmentsPaginator(client DescribeApplicab client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeApplicableIndividualAssessmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeApplicableIndividualAssessments page. @@ -248,7 +249,10 @@ func (p *DescribeApplicableIndividualAssessmentsPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeCertificates.go b/service/databasemigrationservice/api_op_DescribeCertificates.go index ddb3d34a1c5..f548224f81d 100644 --- a/service/databasemigrationservice/api_op_DescribeCertificates.go +++ b/service/databasemigrationservice/api_op_DescribeCertificates.go @@ -177,12 +177,13 @@ func NewDescribeCertificatesPaginator(client DescribeCertificatesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCertificates page. @@ -209,7 +210,10 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeConnections.go b/service/databasemigrationservice/api_op_DescribeConnections.go index ecdbe576f4c..e9bfb862448 100644 --- a/service/databasemigrationservice/api_op_DescribeConnections.go +++ b/service/databasemigrationservice/api_op_DescribeConnections.go @@ -186,12 +186,13 @@ func NewDescribeConnectionsPaginator(client DescribeConnectionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeConnections page. @@ -218,7 +219,10 @@ func (p *DescribeConnectionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeEndpointSettings.go b/service/databasemigrationservice/api_op_DescribeEndpointSettings.go index 0187d56212c..8e1227ce1d2 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpointSettings.go +++ b/service/databasemigrationservice/api_op_DescribeEndpointSettings.go @@ -180,12 +180,13 @@ func NewDescribeEndpointSettingsPaginator(client DescribeEndpointSettingsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEndpointSettingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEndpointSettings page. @@ -212,7 +213,10 @@ func (p *DescribeEndpointSettingsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeEndpointTypes.go b/service/databasemigrationservice/api_op_DescribeEndpointTypes.go index a860fd00954..fdda508f6bf 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpointTypes.go +++ b/service/databasemigrationservice/api_op_DescribeEndpointTypes.go @@ -180,12 +180,13 @@ func NewDescribeEndpointTypesPaginator(client DescribeEndpointTypesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEndpointTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEndpointTypes page. @@ -212,7 +213,10 @@ func (p *DescribeEndpointTypesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeEndpoints.go b/service/databasemigrationservice/api_op_DescribeEndpoints.go index 1d122658c94..5f1e136dbb8 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpoints.go +++ b/service/databasemigrationservice/api_op_DescribeEndpoints.go @@ -184,12 +184,13 @@ func NewDescribeEndpointsPaginator(client DescribeEndpointsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEndpoints page. @@ -216,7 +217,10 @@ func (p *DescribeEndpointsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go b/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go index 327afec65ff..41d564708f8 100644 --- a/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go +++ b/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go @@ -188,12 +188,13 @@ func NewDescribeEventSubscriptionsPaginator(client DescribeEventSubscriptionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventSubscriptions page. @@ -220,7 +221,10 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeEvents.go b/service/databasemigrationservice/api_op_DescribeEvents.go index 25797443783..e864e9df719 100644 --- a/service/databasemigrationservice/api_op_DescribeEvents.go +++ b/service/databasemigrationservice/api_op_DescribeEvents.go @@ -202,12 +202,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -234,7 +235,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go index 02f9e950ca1..98f5d259481 100644 --- a/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go @@ -176,12 +176,13 @@ func NewDescribeOrderableReplicationInstancesPaginator(client DescribeOrderableR client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrderableReplicationInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrderableReplicationInstances page. @@ -208,7 +209,10 @@ func (p *DescribeOrderableReplicationInstancesPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go b/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go index 31d88c9bec1..a2f9a40dfdb 100644 --- a/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go +++ b/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go @@ -184,12 +184,13 @@ func NewDescribePendingMaintenanceActionsPaginator(client DescribePendingMainten client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePendingMaintenanceActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePendingMaintenanceActions page. @@ -216,7 +217,10 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go b/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go index 4b88bb6bfb8..d112288917d 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go @@ -185,12 +185,13 @@ func NewDescribeReplicationInstanceTaskLogsPaginator(client DescribeReplicationI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationInstanceTaskLogsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationInstanceTaskLogs page. @@ -217,7 +218,10 @@ func (p *DescribeReplicationInstanceTaskLogsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go index 78df557d08c..6ba3fab1389 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go @@ -189,12 +189,13 @@ func NewDescribeReplicationInstancesPaginator(client DescribeReplicationInstance client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationInstances page. @@ -221,7 +222,10 @@ func (p *DescribeReplicationInstancesPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go b/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go index 9e58477bd15..1152f624fcd 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go @@ -182,12 +182,13 @@ func NewDescribeReplicationSubnetGroupsPaginator(client DescribeReplicationSubne client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationSubnetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationSubnetGroups page. @@ -214,7 +215,10 @@ func (p *DescribeReplicationSubnetGroupsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go index a5bc57f2439..10ef4b32724 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go @@ -188,12 +188,13 @@ func NewDescribeReplicationTaskAssessmentResultsPaginator(client DescribeReplica client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationTaskAssessmentResultsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationTaskAssessmentResults page. @@ -220,7 +221,10 @@ func (p *DescribeReplicationTaskAssessmentResultsPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go index 71643823ef4..5f3ca07450c 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go @@ -187,12 +187,13 @@ func NewDescribeReplicationTaskAssessmentRunsPaginator(client DescribeReplicatio client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationTaskAssessmentRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationTaskAssessmentRuns page. @@ -219,7 +220,10 @@ func (p *DescribeReplicationTaskAssessmentRunsPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go index 7592787e348..7d90466f10b 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go @@ -184,12 +184,13 @@ func NewDescribeReplicationTaskIndividualAssessmentsPaginator(client DescribeRep client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationTaskIndividualAssessmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationTaskIndividualAssessments page. @@ -216,7 +217,10 @@ func (p *DescribeReplicationTaskIndividualAssessmentsPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go index 6d454a4389b..c78428920c6 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go @@ -192,12 +192,13 @@ func NewDescribeReplicationTasksPaginator(client DescribeReplicationTasksAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationTasks page. @@ -224,7 +225,10 @@ func (p *DescribeReplicationTasksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeSchemas.go b/service/databasemigrationservice/api_op_DescribeSchemas.go index e862d4ddbb4..ed7795f57c5 100644 --- a/service/databasemigrationservice/api_op_DescribeSchemas.go +++ b/service/databasemigrationservice/api_op_DescribeSchemas.go @@ -179,12 +179,13 @@ func NewDescribeSchemasPaginator(client DescribeSchemasAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSchemasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSchemas page. @@ -211,7 +212,10 @@ func (p *DescribeSchemasPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databasemigrationservice/api_op_DescribeTableStatistics.go b/service/databasemigrationservice/api_op_DescribeTableStatistics.go index f22a35f6ef0..5f3432369aa 100644 --- a/service/databasemigrationservice/api_op_DescribeTableStatistics.go +++ b/service/databasemigrationservice/api_op_DescribeTableStatistics.go @@ -194,12 +194,13 @@ func NewDescribeTableStatisticsPaginator(client DescribeTableStatisticsAPIClient client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTableStatisticsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTableStatistics page. @@ -226,7 +227,10 @@ func (p *DescribeTableStatisticsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListDatasets.go b/service/databrew/api_op_ListDatasets.go index c635a404cd6..e15bc1edaeb 100644 --- a/service/databrew/api_op_ListDatasets.go +++ b/service/databrew/api_op_ListDatasets.go @@ -162,12 +162,13 @@ func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasets page. @@ -194,7 +195,10 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListJobRuns.go b/service/databrew/api_op_ListJobRuns.go index 00f948e0422..2005d2d3108 100644 --- a/service/databrew/api_op_ListJobRuns.go +++ b/service/databrew/api_op_ListJobRuns.go @@ -170,12 +170,13 @@ func NewListJobRunsPaginator(client ListJobRunsAPIClient, params *ListJobRunsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobRuns page. @@ -202,7 +203,10 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListJobs.go b/service/databrew/api_op_ListJobs.go index d1ebfccc39b..a0d191eb14d 100644 --- a/service/databrew/api_op_ListJobs.go +++ b/service/databrew/api_op_ListJobs.go @@ -172,12 +172,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -204,7 +205,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListProjects.go b/service/databrew/api_op_ListProjects.go index 9a528854c81..56a40cec758 100644 --- a/service/databrew/api_op_ListProjects.go +++ b/service/databrew/api_op_ListProjects.go @@ -162,12 +162,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -194,7 +195,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListRecipeVersions.go b/service/databrew/api_op_ListRecipeVersions.go index 0fcdda014d5..d3f5d1de448 100644 --- a/service/databrew/api_op_ListRecipeVersions.go +++ b/service/databrew/api_op_ListRecipeVersions.go @@ -172,12 +172,13 @@ func NewListRecipeVersionsPaginator(client ListRecipeVersionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecipeVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecipeVersions page. @@ -204,7 +205,10 @@ func (p *ListRecipeVersionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListRecipes.go b/service/databrew/api_op_ListRecipes.go index f9744c62647..df306045805 100644 --- a/service/databrew/api_op_ListRecipes.go +++ b/service/databrew/api_op_ListRecipes.go @@ -168,12 +168,13 @@ func NewListRecipesPaginator(client ListRecipesAPIClient, params *ListRecipesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecipesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecipes page. @@ -200,7 +201,10 @@ func (p *ListRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListRulesets.go b/service/databrew/api_op_ListRulesets.go index 66b8bd6d32f..4ec3fb5d81b 100644 --- a/service/databrew/api_op_ListRulesets.go +++ b/service/databrew/api_op_ListRulesets.go @@ -170,12 +170,13 @@ func NewListRulesetsPaginator(client ListRulesetsAPIClient, params *ListRulesets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRulesetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRulesets page. @@ -202,7 +203,10 @@ func (p *ListRulesetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/databrew/api_op_ListSchedules.go b/service/databrew/api_op_ListSchedules.go index 5ed5822e270..207751a671b 100644 --- a/service/databrew/api_op_ListSchedules.go +++ b/service/databrew/api_op_ListSchedules.go @@ -165,12 +165,13 @@ func NewListSchedulesPaginator(client ListSchedulesAPIClient, params *ListSchedu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchedulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchedules page. @@ -197,7 +198,10 @@ func (p *ListSchedulesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dataexchange/api_op_ListDataSetRevisions.go b/service/dataexchange/api_op_ListDataSetRevisions.go index dcf5537b510..8145f215353 100644 --- a/service/dataexchange/api_op_ListDataSetRevisions.go +++ b/service/dataexchange/api_op_ListDataSetRevisions.go @@ -172,12 +172,13 @@ func NewListDataSetRevisionsPaginator(client ListDataSetRevisionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSetRevisionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSetRevisions page. @@ -200,7 +201,10 @@ func (p *ListDataSetRevisionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dataexchange/api_op_ListDataSets.go b/service/dataexchange/api_op_ListDataSets.go index 6940677ce36..2dfe5e11501 100644 --- a/service/dataexchange/api_op_ListDataSets.go +++ b/service/dataexchange/api_op_ListDataSets.go @@ -167,12 +167,13 @@ func NewListDataSetsPaginator(client ListDataSetsAPIClient, params *ListDataSets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSets page. @@ -195,7 +196,10 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dataexchange/api_op_ListEventActions.go b/service/dataexchange/api_op_ListEventActions.go index 6a89498d9c2..5157599c7dd 100644 --- a/service/dataexchange/api_op_ListEventActions.go +++ b/service/dataexchange/api_op_ListEventActions.go @@ -165,12 +165,13 @@ func NewListEventActionsPaginator(client ListEventActionsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEventActions page. @@ -193,7 +194,10 @@ func (p *ListEventActionsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dataexchange/api_op_ListJobs.go b/service/dataexchange/api_op_ListJobs.go index fd3ea5c27cd..115597bcb88 100644 --- a/service/dataexchange/api_op_ListJobs.go +++ b/service/dataexchange/api_op_ListJobs.go @@ -167,12 +167,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -195,7 +196,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dataexchange/api_op_ListRevisionAssets.go b/service/dataexchange/api_op_ListRevisionAssets.go index c309ac33a0d..d074c60a3d1 100644 --- a/service/dataexchange/api_op_ListRevisionAssets.go +++ b/service/dataexchange/api_op_ListRevisionAssets.go @@ -177,12 +177,13 @@ func NewListRevisionAssetsPaginator(client ListRevisionAssetsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRevisionAssetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRevisionAssets page. @@ -205,7 +206,10 @@ func (p *ListRevisionAssetsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datapipeline/api_op_DescribeObjects.go b/service/datapipeline/api_op_DescribeObjects.go index 66c6d712bff..699e9429333 100644 --- a/service/datapipeline/api_op_DescribeObjects.go +++ b/service/datapipeline/api_op_DescribeObjects.go @@ -197,12 +197,13 @@ func NewDescribeObjectsPaginator(client DescribeObjectsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeObjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeObjects page. @@ -223,7 +224,10 @@ func (p *DescribeObjectsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datapipeline/api_op_ListPipelines.go b/service/datapipeline/api_op_ListPipelines.go index f59398df17d..2ec6ad14f73 100644 --- a/service/datapipeline/api_op_ListPipelines.go +++ b/service/datapipeline/api_op_ListPipelines.go @@ -173,12 +173,13 @@ func NewListPipelinesPaginator(client ListPipelinesAPIClient, params *ListPipeli client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelines page. @@ -199,7 +200,10 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datapipeline/api_op_QueryObjects.go b/service/datapipeline/api_op_QueryObjects.go index 53643f55dc2..1a7cb44ebc2 100644 --- a/service/datapipeline/api_op_QueryObjects.go +++ b/service/datapipeline/api_op_QueryObjects.go @@ -200,12 +200,13 @@ func NewQueryObjectsPaginator(client QueryObjectsAPIClient, params *QueryObjects client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *QueryObjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next QueryObjects page. @@ -232,7 +233,10 @@ func (p *QueryObjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datasync/api_op_ListAgents.go b/service/datasync/api_op_ListAgents.go index b7129830c19..681d47cf9ba 100644 --- a/service/datasync/api_op_ListAgents.go +++ b/service/datasync/api_op_ListAgents.go @@ -170,12 +170,13 @@ func NewListAgentsPaginator(client ListAgentsAPIClient, params *ListAgentsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAgentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAgents page. @@ -202,7 +203,10 @@ func (p *ListAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datasync/api_op_ListLocations.go b/service/datasync/api_op_ListLocations.go index b1dc5d951aa..d7ccd042503 100644 --- a/service/datasync/api_op_ListLocations.go +++ b/service/datasync/api_op_ListLocations.go @@ -174,12 +174,13 @@ func NewListLocationsPaginator(client ListLocationsAPIClient, params *ListLocati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLocationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLocations page. @@ -206,7 +207,10 @@ func (p *ListLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datasync/api_op_ListTagsForResource.go b/service/datasync/api_op_ListTagsForResource.go index 56818665751..1889ec383f1 100644 --- a/service/datasync/api_op_ListTagsForResource.go +++ b/service/datasync/api_op_ListTagsForResource.go @@ -173,12 +173,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -205,7 +206,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datasync/api_op_ListTaskExecutions.go b/service/datasync/api_op_ListTaskExecutions.go index 00f70be5f5e..9851724c15b 100644 --- a/service/datasync/api_op_ListTaskExecutions.go +++ b/service/datasync/api_op_ListTaskExecutions.go @@ -168,12 +168,13 @@ func NewListTaskExecutionsPaginator(client ListTaskExecutionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTaskExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTaskExecutions page. @@ -200,7 +201,10 @@ func (p *ListTaskExecutionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/datasync/api_op_ListTasks.go b/service/datasync/api_op_ListTasks.go index 1e9a25b39bd..26a964db575 100644 --- a/service/datasync/api_op_ListTasks.go +++ b/service/datasync/api_op_ListTasks.go @@ -172,12 +172,13 @@ func NewListTasksPaginator(client ListTasksAPIClient, params *ListTasksInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTasks page. @@ -204,7 +205,10 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/detective/api_op_ListGraphs.go b/service/detective/api_op_ListGraphs.go index f44a2d74a59..bc84b386116 100644 --- a/service/detective/api_op_ListGraphs.go +++ b/service/detective/api_op_ListGraphs.go @@ -167,12 +167,13 @@ func NewListGraphsPaginator(client ListGraphsAPIClient, params *ListGraphsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGraphsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGraphs page. @@ -199,7 +200,10 @@ func (p *ListGraphsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/detective/api_op_ListInvitations.go b/service/detective/api_op_ListInvitations.go index 02facb5fe1a..0a38a65e892 100644 --- a/service/detective/api_op_ListInvitations.go +++ b/service/detective/api_op_ListInvitations.go @@ -173,12 +173,13 @@ func NewListInvitationsPaginator(client ListInvitationsAPIClient, params *ListIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInvitations page. @@ -205,7 +206,10 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/detective/api_op_ListMembers.go b/service/detective/api_op_ListMembers.go index d50e46f6a99..15843309fff 100644 --- a/service/detective/api_op_ListMembers.go +++ b/service/detective/api_op_ListMembers.go @@ -178,12 +178,13 @@ func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMembers page. @@ -210,7 +211,10 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_GetOfferingStatus.go b/service/devicefarm/api_op_GetOfferingStatus.go index 1a592619364..dfedf12e11a 100644 --- a/service/devicefarm/api_op_GetOfferingStatus.go +++ b/service/devicefarm/api_op_GetOfferingStatus.go @@ -164,12 +164,13 @@ func NewGetOfferingStatusPaginator(client GetOfferingStatusAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetOfferingStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetOfferingStatus page. @@ -190,7 +191,10 @@ func (p *GetOfferingStatusPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListArtifacts.go b/service/devicefarm/api_op_ListArtifacts.go index 4e0ce14f218..f09a58d25e8 100644 --- a/service/devicefarm/api_op_ListArtifacts.go +++ b/service/devicefarm/api_op_ListArtifacts.go @@ -174,12 +174,13 @@ func NewListArtifactsPaginator(client ListArtifactsAPIClient, params *ListArtifa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListArtifactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListArtifacts page. @@ -200,7 +201,10 @@ func (p *ListArtifactsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListDevicePools.go b/service/devicefarm/api_op_ListDevicePools.go index 257024b94b4..bd56cdb6d66 100644 --- a/service/devicefarm/api_op_ListDevicePools.go +++ b/service/devicefarm/api_op_ListDevicePools.go @@ -173,12 +173,13 @@ func NewListDevicePoolsPaginator(client ListDevicePoolsAPIClient, params *ListDe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicePoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevicePools page. @@ -199,7 +200,10 @@ func (p *ListDevicePoolsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListDevices.go b/service/devicefarm/api_op_ListDevices.go index 50f2082d6be..28385537b56 100644 --- a/service/devicefarm/api_op_ListDevices.go +++ b/service/devicefarm/api_op_ListDevices.go @@ -236,12 +236,13 @@ func NewListDevicesPaginator(client ListDevicesAPIClient, params *ListDevicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevices page. @@ -262,7 +263,10 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListJobs.go b/service/devicefarm/api_op_ListJobs.go index 8f326528e5c..51078ced52c 100644 --- a/service/devicefarm/api_op_ListJobs.go +++ b/service/devicefarm/api_op_ListJobs.go @@ -163,12 +163,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -189,7 +190,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListOfferingTransactions.go b/service/devicefarm/api_op_ListOfferingTransactions.go index d035581aacc..8bb7397d640 100644 --- a/service/devicefarm/api_op_ListOfferingTransactions.go +++ b/service/devicefarm/api_op_ListOfferingTransactions.go @@ -163,12 +163,13 @@ func NewListOfferingTransactionsPaginator(client ListOfferingTransactionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOfferingTransactionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOfferingTransactions page. @@ -189,7 +190,10 @@ func (p *ListOfferingTransactionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListOfferings.go b/service/devicefarm/api_op_ListOfferings.go index 6227d0c11f8..d69708aafb1 100644 --- a/service/devicefarm/api_op_ListOfferings.go +++ b/service/devicefarm/api_op_ListOfferings.go @@ -159,12 +159,13 @@ func NewListOfferingsPaginator(client ListOfferingsAPIClient, params *ListOfferi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOfferings page. @@ -185,7 +186,10 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListProjects.go b/service/devicefarm/api_op_ListProjects.go index 710cacc9259..de7228eeb04 100644 --- a/service/devicefarm/api_op_ListProjects.go +++ b/service/devicefarm/api_op_ListProjects.go @@ -160,12 +160,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -186,7 +187,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListRuns.go b/service/devicefarm/api_op_ListRuns.go index e17646eb028..763e2d790c8 100644 --- a/service/devicefarm/api_op_ListRuns.go +++ b/service/devicefarm/api_op_ListRuns.go @@ -163,12 +163,13 @@ func NewListRunsPaginator(client ListRunsAPIClient, params *ListRunsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRuns page. @@ -189,7 +190,10 @@ func (p *ListRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListSamples.go b/service/devicefarm/api_op_ListSamples.go index 02236b247b5..d5052b4d668 100644 --- a/service/devicefarm/api_op_ListSamples.go +++ b/service/devicefarm/api_op_ListSamples.go @@ -163,12 +163,13 @@ func NewListSamplesPaginator(client ListSamplesAPIClient, params *ListSamplesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSamplesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSamples page. @@ -189,7 +190,10 @@ func (p *ListSamplesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListSuites.go b/service/devicefarm/api_op_ListSuites.go index 842213bf76e..d06cca72aa3 100644 --- a/service/devicefarm/api_op_ListSuites.go +++ b/service/devicefarm/api_op_ListSuites.go @@ -163,12 +163,13 @@ func NewListSuitesPaginator(client ListSuitesAPIClient, params *ListSuitesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSuitesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSuites page. @@ -189,7 +190,10 @@ func (p *ListSuitesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListTestGridProjects.go b/service/devicefarm/api_op_ListTestGridProjects.go index e7a31681bc5..864bb20f08d 100644 --- a/service/devicefarm/api_op_ListTestGridProjects.go +++ b/service/devicefarm/api_op_ListTestGridProjects.go @@ -162,12 +162,13 @@ func NewListTestGridProjectsPaginator(client ListTestGridProjectsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTestGridProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTestGridProjects page. @@ -194,7 +195,10 @@ func (p *ListTestGridProjectsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListTestGridSessionActions.go b/service/devicefarm/api_op_ListTestGridSessionActions.go index 66ddf9935db..18328761de8 100644 --- a/service/devicefarm/api_op_ListTestGridSessionActions.go +++ b/service/devicefarm/api_op_ListTestGridSessionActions.go @@ -171,12 +171,13 @@ func NewListTestGridSessionActionsPaginator(client ListTestGridSessionActionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTestGridSessionActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTestGridSessionActions page. @@ -203,7 +204,10 @@ func (p *ListTestGridSessionActionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListTestGridSessionArtifacts.go b/service/devicefarm/api_op_ListTestGridSessionArtifacts.go index e71944362fd..7fa4b545b29 100644 --- a/service/devicefarm/api_op_ListTestGridSessionArtifacts.go +++ b/service/devicefarm/api_op_ListTestGridSessionArtifacts.go @@ -174,12 +174,13 @@ func NewListTestGridSessionArtifactsPaginator(client ListTestGridSessionArtifact client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTestGridSessionArtifactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTestGridSessionArtifacts page. @@ -206,7 +207,10 @@ func (p *ListTestGridSessionArtifactsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListTestGridSessions.go b/service/devicefarm/api_op_ListTestGridSessions.go index 55e291430b9..245c1fdff03 100644 --- a/service/devicefarm/api_op_ListTestGridSessions.go +++ b/service/devicefarm/api_op_ListTestGridSessions.go @@ -185,12 +185,13 @@ func NewListTestGridSessionsPaginator(client ListTestGridSessionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTestGridSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTestGridSessions page. @@ -217,7 +218,10 @@ func (p *ListTestGridSessionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListTests.go b/service/devicefarm/api_op_ListTests.go index 160c150c016..f57f070e345 100644 --- a/service/devicefarm/api_op_ListTests.go +++ b/service/devicefarm/api_op_ListTests.go @@ -163,12 +163,13 @@ func NewListTestsPaginator(client ListTestsAPIClient, params *ListTestsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTests page. @@ -189,7 +190,10 @@ func (p *ListTestsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListUniqueProblems.go b/service/devicefarm/api_op_ListUniqueProblems.go index f6ac5fe1d59..e6c35dd6c6d 100644 --- a/service/devicefarm/api_op_ListUniqueProblems.go +++ b/service/devicefarm/api_op_ListUniqueProblems.go @@ -184,12 +184,13 @@ func NewListUniqueProblemsPaginator(client ListUniqueProblemsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUniqueProblemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUniqueProblems page. @@ -210,7 +211,10 @@ func (p *ListUniqueProblemsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devicefarm/api_op_ListUploads.go b/service/devicefarm/api_op_ListUploads.go index 780b47509d3..e9533277d31 100644 --- a/service/devicefarm/api_op_ListUploads.go +++ b/service/devicefarm/api_op_ListUploads.go @@ -244,12 +244,13 @@ func NewListUploadsPaginator(client ListUploadsAPIClient, params *ListUploadsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUploadsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUploads page. @@ -270,7 +271,10 @@ func (p *ListUploadsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go b/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go index e508afc70eb..b3eabff051c 100644 --- a/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go +++ b/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go @@ -190,12 +190,13 @@ func NewDescribeOrganizationResourceCollectionHealthPaginator(client DescribeOrg client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrganizationResourceCollectionHealthPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrganizationResourceCollectionHealth page. @@ -216,7 +217,10 @@ func (p *DescribeOrganizationResourceCollectionHealthPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_DescribeResourceCollectionHealth.go b/service/devopsguru/api_op_DescribeResourceCollectionHealth.go index 1dc404478a2..7125f70e749 100644 --- a/service/devopsguru/api_op_DescribeResourceCollectionHealth.go +++ b/service/devopsguru/api_op_DescribeResourceCollectionHealth.go @@ -212,12 +212,13 @@ func NewDescribeResourceCollectionHealthPaginator(client DescribeResourceCollect client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeResourceCollectionHealthPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeResourceCollectionHealth page. @@ -238,7 +239,10 @@ func (p *DescribeResourceCollectionHealthPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_GetCostEstimation.go b/service/devopsguru/api_op_GetCostEstimation.go index d022845476b..31bcee487d0 100644 --- a/service/devopsguru/api_op_GetCostEstimation.go +++ b/service/devopsguru/api_op_GetCostEstimation.go @@ -174,12 +174,13 @@ func NewGetCostEstimationPaginator(client GetCostEstimationAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCostEstimationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCostEstimation page. @@ -200,7 +201,10 @@ func (p *GetCostEstimationPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_GetResourceCollection.go b/service/devopsguru/api_op_GetResourceCollection.go index 787e430fd30..1f646068684 100644 --- a/service/devopsguru/api_op_GetResourceCollection.go +++ b/service/devopsguru/api_op_GetResourceCollection.go @@ -175,12 +175,13 @@ func NewGetResourceCollectionPaginator(client GetResourceCollectionAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourceCollectionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourceCollection page. @@ -201,7 +202,10 @@ func (p *GetResourceCollectionPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_ListAnomaliesForInsight.go b/service/devopsguru/api_op_ListAnomaliesForInsight.go index ac609bf1b55..6420c4e19ea 100644 --- a/service/devopsguru/api_op_ListAnomaliesForInsight.go +++ b/service/devopsguru/api_op_ListAnomaliesForInsight.go @@ -187,12 +187,13 @@ func NewListAnomaliesForInsightPaginator(client ListAnomaliesForInsightAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnomaliesForInsightPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnomaliesForInsight page. @@ -219,7 +220,10 @@ func (p *ListAnomaliesForInsightPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_ListEvents.go b/service/devopsguru/api_op_ListEvents.go index 432a2b16eca..81d7d1ab612 100644 --- a/service/devopsguru/api_op_ListEvents.go +++ b/service/devopsguru/api_op_ListEvents.go @@ -177,12 +177,13 @@ func NewListEventsPaginator(client ListEventsAPIClient, params *ListEventsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEvents page. @@ -209,7 +210,10 @@ func (p *ListEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_ListInsights.go b/service/devopsguru/api_op_ListInsights.go index 4d3aedc546c..ef588854eb2 100644 --- a/service/devopsguru/api_op_ListInsights.go +++ b/service/devopsguru/api_op_ListInsights.go @@ -177,12 +177,13 @@ func NewListInsightsPaginator(client ListInsightsAPIClient, params *ListInsights client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInsights page. @@ -209,7 +210,10 @@ func (p *ListInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_ListNotificationChannels.go b/service/devopsguru/api_op_ListNotificationChannels.go index 2fe81918a34..89223499784 100644 --- a/service/devopsguru/api_op_ListNotificationChannels.go +++ b/service/devopsguru/api_op_ListNotificationChannels.go @@ -159,12 +159,13 @@ func NewListNotificationChannelsPaginator(client ListNotificationChannelsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotificationChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotificationChannels page. @@ -185,7 +186,10 @@ func (p *ListNotificationChannelsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_ListOrganizationInsights.go b/service/devopsguru/api_op_ListOrganizationInsights.go index 423d5024c3b..f93a0721492 100644 --- a/service/devopsguru/api_op_ListOrganizationInsights.go +++ b/service/devopsguru/api_op_ListOrganizationInsights.go @@ -185,12 +185,13 @@ func NewListOrganizationInsightsPaginator(client ListOrganizationInsightsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizationInsights page. @@ -217,7 +218,10 @@ func (p *ListOrganizationInsightsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_ListRecommendations.go b/service/devopsguru/api_op_ListRecommendations.go index cba0b0c16db..7e474bfc590 100644 --- a/service/devopsguru/api_op_ListRecommendations.go +++ b/service/devopsguru/api_op_ListRecommendations.go @@ -169,12 +169,13 @@ func NewListRecommendationsPaginator(client ListRecommendationsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecommendations page. @@ -195,7 +196,10 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_SearchInsights.go b/service/devopsguru/api_op_SearchInsights.go index 79af97dbeaa..bcc1739b4c6 100644 --- a/service/devopsguru/api_op_SearchInsights.go +++ b/service/devopsguru/api_op_SearchInsights.go @@ -190,12 +190,13 @@ func NewSearchInsightsPaginator(client SearchInsightsAPIClient, params *SearchIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchInsights page. @@ -222,7 +223,10 @@ func (p *SearchInsightsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/devopsguru/api_op_SearchOrganizationInsights.go b/service/devopsguru/api_op_SearchOrganizationInsights.go index 4c60a2a5f93..d688ed29f04 100644 --- a/service/devopsguru/api_op_SearchOrganizationInsights.go +++ b/service/devopsguru/api_op_SearchOrganizationInsights.go @@ -199,12 +199,13 @@ func NewSearchOrganizationInsightsPaginator(client SearchOrganizationInsightsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchOrganizationInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchOrganizationInsights page. @@ -231,7 +232,10 @@ func (p *SearchOrganizationInsightsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/directoryservice/api_op_DescribeDomainControllers.go b/service/directoryservice/api_op_DescribeDomainControllers.go index 6b32edaaac7..8ebb37daaf3 100644 --- a/service/directoryservice/api_op_DescribeDomainControllers.go +++ b/service/directoryservice/api_op_DescribeDomainControllers.go @@ -178,12 +178,13 @@ func NewDescribeDomainControllersPaginator(client DescribeDomainControllersAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDomainControllersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDomainControllers page. @@ -210,7 +211,10 @@ func (p *DescribeDomainControllersPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeCertificates.go b/service/docdb/api_op_DescribeCertificates.go index e9074be3071..e8da0ce59bd 100644 --- a/service/docdb/api_op_DescribeCertificates.go +++ b/service/docdb/api_op_DescribeCertificates.go @@ -195,12 +195,13 @@ func NewDescribeCertificatesPaginator(client DescribeCertificatesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCertificates page. @@ -227,7 +228,10 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBClusterParameterGroups.go b/service/docdb/api_op_DescribeDBClusterParameterGroups.go index d726424c585..723a98214d8 100644 --- a/service/docdb/api_op_DescribeDBClusterParameterGroups.go +++ b/service/docdb/api_op_DescribeDBClusterParameterGroups.go @@ -190,12 +190,13 @@ func NewDescribeDBClusterParameterGroupsPaginator(client DescribeDBClusterParame client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterParameterGroups page. @@ -222,7 +223,10 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBClusterParameters.go b/service/docdb/api_op_DescribeDBClusterParameters.go index fa654cc09c9..accdde32b1a 100644 --- a/service/docdb/api_op_DescribeDBClusterParameters.go +++ b/service/docdb/api_op_DescribeDBClusterParameters.go @@ -194,12 +194,13 @@ func NewDescribeDBClusterParametersPaginator(client DescribeDBClusterParametersA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterParameters page. @@ -226,7 +227,10 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBClusterSnapshots.go b/service/docdb/api_op_DescribeDBClusterSnapshots.go index ebf7bba1b11..56b40987290 100644 --- a/service/docdb/api_op_DescribeDBClusterSnapshots.go +++ b/service/docdb/api_op_DescribeDBClusterSnapshots.go @@ -236,12 +236,13 @@ func NewDescribeDBClusterSnapshotsPaginator(client DescribeDBClusterSnapshotsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterSnapshots page. @@ -268,7 +269,10 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBClusters.go b/service/docdb/api_op_DescribeDBClusters.go index d03e4360986..fedabb57d2d 100644 --- a/service/docdb/api_op_DescribeDBClusters.go +++ b/service/docdb/api_op_DescribeDBClusters.go @@ -197,12 +197,13 @@ func NewDescribeDBClustersPaginator(client DescribeDBClustersAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusters page. @@ -229,7 +230,10 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBEngineVersions.go b/service/docdb/api_op_DescribeDBEngineVersions.go index 6548e667af5..81bdaf0731c 100644 --- a/service/docdb/api_op_DescribeDBEngineVersions.go +++ b/service/docdb/api_op_DescribeDBEngineVersions.go @@ -206,12 +206,13 @@ func NewDescribeDBEngineVersionsPaginator(client DescribeDBEngineVersionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBEngineVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBEngineVersions page. @@ -238,7 +239,10 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBInstances.go b/service/docdb/api_op_DescribeDBInstances.go index 286d5ad4c71..d5b65364512 100644 --- a/service/docdb/api_op_DescribeDBInstances.go +++ b/service/docdb/api_op_DescribeDBInstances.go @@ -202,12 +202,13 @@ func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBInstances page. @@ -234,7 +235,10 @@ func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeDBSubnetGroups.go b/service/docdb/api_op_DescribeDBSubnetGroups.go index 7d358d3ea09..45922fc3a82 100644 --- a/service/docdb/api_op_DescribeDBSubnetGroups.go +++ b/service/docdb/api_op_DescribeDBSubnetGroups.go @@ -184,12 +184,13 @@ func NewDescribeDBSubnetGroupsPaginator(client DescribeDBSubnetGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBSubnetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBSubnetGroups page. @@ -216,7 +217,10 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeEventSubscriptions.go b/service/docdb/api_op_DescribeEventSubscriptions.go index 56f796e80a4..a37a50ed851 100644 --- a/service/docdb/api_op_DescribeEventSubscriptions.go +++ b/service/docdb/api_op_DescribeEventSubscriptions.go @@ -188,12 +188,13 @@ func NewDescribeEventSubscriptionsPaginator(client DescribeEventSubscriptionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventSubscriptions page. @@ -220,7 +221,10 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeEvents.go b/service/docdb/api_op_DescribeEvents.go index 7fe0651c1c1..b0c79dce32a 100644 --- a/service/docdb/api_op_DescribeEvents.go +++ b/service/docdb/api_op_DescribeEvents.go @@ -224,12 +224,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -256,7 +257,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeGlobalClusters.go b/service/docdb/api_op_DescribeGlobalClusters.go index d0fe534bb31..790be13c7a4 100644 --- a/service/docdb/api_op_DescribeGlobalClusters.go +++ b/service/docdb/api_op_DescribeGlobalClusters.go @@ -182,12 +182,13 @@ func NewDescribeGlobalClustersPaginator(client DescribeGlobalClustersAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGlobalClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGlobalClusters page. @@ -214,7 +215,10 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go b/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go index 08e8ef36bff..c429aa64bb7 100644 --- a/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go @@ -202,12 +202,13 @@ func NewDescribeOrderableDBInstanceOptionsPaginator(client DescribeOrderableDBIn client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrderableDBInstanceOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrderableDBInstanceOptions page. @@ -234,7 +235,10 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/docdb/api_op_DescribePendingMaintenanceActions.go b/service/docdb/api_op_DescribePendingMaintenanceActions.go index 9dba442e4a8..7745a341e10 100644 --- a/service/docdb/api_op_DescribePendingMaintenanceActions.go +++ b/service/docdb/api_op_DescribePendingMaintenanceActions.go @@ -194,12 +194,13 @@ func NewDescribePendingMaintenanceActionsPaginator(client DescribePendingMainten client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePendingMaintenanceActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePendingMaintenanceActions page. @@ -226,7 +227,10 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/drs/api_op_DescribeJobLogItems.go b/service/drs/api_op_DescribeJobLogItems.go index 8c270d7516e..fd1efbdab96 100644 --- a/service/drs/api_op_DescribeJobLogItems.go +++ b/service/drs/api_op_DescribeJobLogItems.go @@ -169,12 +169,13 @@ func NewDescribeJobLogItemsPaginator(client DescribeJobLogItemsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeJobLogItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeJobLogItems page. @@ -197,7 +198,10 @@ func (p *DescribeJobLogItemsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/drs/api_op_DescribeJobs.go b/service/drs/api_op_DescribeJobs.go index 06a6156899b..5d0642992d3 100644 --- a/service/drs/api_op_DescribeJobs.go +++ b/service/drs/api_op_DescribeJobs.go @@ -172,12 +172,13 @@ func NewDescribeJobsPaginator(client DescribeJobsAPIClient, params *DescribeJobs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeJobs page. @@ -200,7 +201,10 @@ func (p *DescribeJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/drs/api_op_DescribeRecoveryInstances.go b/service/drs/api_op_DescribeRecoveryInstances.go index 0ddd75f145e..acbbaa64d37 100644 --- a/service/drs/api_op_DescribeRecoveryInstances.go +++ b/service/drs/api_op_DescribeRecoveryInstances.go @@ -170,12 +170,13 @@ func NewDescribeRecoveryInstancesPaginator(client DescribeRecoveryInstancesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRecoveryInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRecoveryInstances page. @@ -198,7 +199,10 @@ func (p *DescribeRecoveryInstancesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/drs/api_op_DescribeRecoverySnapshots.go b/service/drs/api_op_DescribeRecoverySnapshots.go index 541e33601e4..5aa03a85a0d 100644 --- a/service/drs/api_op_DescribeRecoverySnapshots.go +++ b/service/drs/api_op_DescribeRecoverySnapshots.go @@ -176,12 +176,13 @@ func NewDescribeRecoverySnapshotsPaginator(client DescribeRecoverySnapshotsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRecoverySnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRecoverySnapshots page. @@ -204,7 +205,10 @@ func (p *DescribeRecoverySnapshotsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/drs/api_op_DescribeReplicationConfigurationTemplates.go b/service/drs/api_op_DescribeReplicationConfigurationTemplates.go index 7ec45db9138..a234e36ae00 100644 --- a/service/drs/api_op_DescribeReplicationConfigurationTemplates.go +++ b/service/drs/api_op_DescribeReplicationConfigurationTemplates.go @@ -172,12 +172,13 @@ func NewDescribeReplicationConfigurationTemplatesPaginator(client DescribeReplic client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationConfigurationTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationConfigurationTemplates page. @@ -200,7 +201,10 @@ func (p *DescribeReplicationConfigurationTemplatesPaginator) NextPage(ctx contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/drs/api_op_DescribeSourceServers.go b/service/drs/api_op_DescribeSourceServers.go index 1d98ef5141e..51ed6138412 100644 --- a/service/drs/api_op_DescribeSourceServers.go +++ b/service/drs/api_op_DescribeSourceServers.go @@ -169,12 +169,13 @@ func NewDescribeSourceServersPaginator(client DescribeSourceServersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSourceServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSourceServers page. @@ -197,7 +198,10 @@ func (p *DescribeSourceServersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dynamodb/api_op_ListContributorInsights.go b/service/dynamodb/api_op_ListContributorInsights.go index 32490ed1e30..864d2085f0f 100644 --- a/service/dynamodb/api_op_ListContributorInsights.go +++ b/service/dynamodb/api_op_ListContributorInsights.go @@ -172,12 +172,13 @@ func NewListContributorInsightsPaginator(client ListContributorInsightsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContributorInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContributorInsights page. @@ -200,7 +201,10 @@ func (p *ListContributorInsightsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dynamodb/api_op_ListExports.go b/service/dynamodb/api_op_ListExports.go index 89898208c06..3395a00876c 100644 --- a/service/dynamodb/api_op_ListExports.go +++ b/service/dynamodb/api_op_ListExports.go @@ -171,12 +171,13 @@ func NewListExportsPaginator(client ListExportsAPIClient, params *ListExportsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExports page. @@ -203,7 +204,10 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dynamodb/api_op_ListTables.go b/service/dynamodb/api_op_ListTables.go index 3108405f591..4882b636fc2 100644 --- a/service/dynamodb/api_op_ListTables.go +++ b/service/dynamodb/api_op_ListTables.go @@ -224,12 +224,13 @@ func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, client: client, params: params, firstPage: true, + nextToken: params.ExclusiveStartTableName, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTables page. @@ -256,7 +257,10 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.LastEvaluatedTableName - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/dynamodb/api_op_Query.go b/service/dynamodb/api_op_Query.go index 8517cefba5d..2628a1b3b71 100644 --- a/service/dynamodb/api_op_Query.go +++ b/service/dynamodb/api_op_Query.go @@ -563,6 +563,7 @@ func NewQueryPaginator(client QueryAPIClient, params *QueryInput, optFns ...func client: client, params: params, firstPage: true, + nextToken: params.ExclusiveStartKey, } } diff --git a/service/dynamodb/api_op_Scan.go b/service/dynamodb/api_op_Scan.go index c2f47691dca..e7448edaeff 100644 --- a/service/dynamodb/api_op_Scan.go +++ b/service/dynamodb/api_op_Scan.go @@ -486,6 +486,7 @@ func NewScanPaginator(client ScanAPIClient, params *ScanInput, optFns ...func(*S client: client, params: params, firstPage: true, + nextToken: params.ExclusiveStartKey, } } diff --git a/service/ebs/api_op_ListChangedBlocks.go b/service/ebs/api_op_ListChangedBlocks.go index 1edd48d4022..3894240f7a2 100644 --- a/service/ebs/api_op_ListChangedBlocks.go +++ b/service/ebs/api_op_ListChangedBlocks.go @@ -191,12 +191,13 @@ func NewListChangedBlocksPaginator(client ListChangedBlocksAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChangedBlocksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChangedBlocks page. @@ -223,7 +224,10 @@ func (p *ListChangedBlocksPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ebs/api_op_ListSnapshotBlocks.go b/service/ebs/api_op_ListSnapshotBlocks.go index df709853c26..b95abcc0446 100644 --- a/service/ebs/api_op_ListSnapshotBlocks.go +++ b/service/ebs/api_op_ListSnapshotBlocks.go @@ -184,12 +184,13 @@ func NewListSnapshotBlocksPaginator(client ListSnapshotBlocksAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSnapshotBlocksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSnapshotBlocks page. @@ -216,7 +217,10 @@ func (p *ListSnapshotBlocksPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeAddressesAttribute.go b/service/ec2/api_op_DescribeAddressesAttribute.go index 92767fb1f79..9359dbd5159 100644 --- a/service/ec2/api_op_DescribeAddressesAttribute.go +++ b/service/ec2/api_op_DescribeAddressesAttribute.go @@ -180,12 +180,13 @@ func NewDescribeAddressesAttributePaginator(client DescribeAddressesAttributeAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAddressesAttributePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAddressesAttribute page. @@ -212,7 +213,10 @@ func (p *DescribeAddressesAttributePaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeByoipCidrs.go b/service/ec2/api_op_DescribeByoipCidrs.go index cababadf903..fb694cc6bd0 100644 --- a/service/ec2/api_op_DescribeByoipCidrs.go +++ b/service/ec2/api_op_DescribeByoipCidrs.go @@ -178,12 +178,13 @@ func NewDescribeByoipCidrsPaginator(client DescribeByoipCidrsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeByoipCidrsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeByoipCidrs page. @@ -210,7 +211,10 @@ func (p *DescribeByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeCapacityReservationFleets.go b/service/ec2/api_op_DescribeCapacityReservationFleets.go index 3d7d8a2be5c..59d104e2ee9 100644 --- a/service/ec2/api_op_DescribeCapacityReservationFleets.go +++ b/service/ec2/api_op_DescribeCapacityReservationFleets.go @@ -195,12 +195,13 @@ func NewDescribeCapacityReservationFleetsPaginator(client DescribeCapacityReserv client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCapacityReservationFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCapacityReservationFleets page. @@ -227,7 +228,10 @@ func (p *DescribeCapacityReservationFleetsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeCapacityReservations.go b/service/ec2/api_op_DescribeCapacityReservations.go index 8dd2b494cc7..0e7f2c9b6f4 100644 --- a/service/ec2/api_op_DescribeCapacityReservations.go +++ b/service/ec2/api_op_DescribeCapacityReservations.go @@ -270,12 +270,13 @@ func NewDescribeCapacityReservationsPaginator(client DescribeCapacityReservation client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCapacityReservationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCapacityReservations page. @@ -302,7 +303,10 @@ func (p *DescribeCapacityReservationsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeCarrierGateways.go b/service/ec2/api_op_DescribeCarrierGateways.go index f59dba19c98..77ca363a416 100644 --- a/service/ec2/api_op_DescribeCarrierGateways.go +++ b/service/ec2/api_op_DescribeCarrierGateways.go @@ -199,12 +199,13 @@ func NewDescribeCarrierGatewaysPaginator(client DescribeCarrierGatewaysAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCarrierGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCarrierGateways page. @@ -231,7 +232,10 @@ func (p *DescribeCarrierGatewaysPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeClassicLinkInstances.go b/service/ec2/api_op_DescribeClassicLinkInstances.go index 63f61783f1b..8c0f237e545 100644 --- a/service/ec2/api_op_DescribeClassicLinkInstances.go +++ b/service/ec2/api_op_DescribeClassicLinkInstances.go @@ -202,12 +202,13 @@ func NewDescribeClassicLinkInstancesPaginator(client DescribeClassicLinkInstance client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClassicLinkInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClassicLinkInstances page. @@ -234,7 +235,10 @@ func (p *DescribeClassicLinkInstancesPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go b/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go index 28173d24457..91f49995e1b 100644 --- a/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go +++ b/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go @@ -194,12 +194,13 @@ func NewDescribeClientVpnAuthorizationRulesPaginator(client DescribeClientVpnAut client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClientVpnAuthorizationRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClientVpnAuthorizationRules page. @@ -226,7 +227,10 @@ func (p *DescribeClientVpnAuthorizationRulesPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeClientVpnConnections.go b/service/ec2/api_op_DescribeClientVpnConnections.go index 07cc11e8249..8b35f2a3498 100644 --- a/service/ec2/api_op_DescribeClientVpnConnections.go +++ b/service/ec2/api_op_DescribeClientVpnConnections.go @@ -193,12 +193,13 @@ func NewDescribeClientVpnConnectionsPaginator(client DescribeClientVpnConnection client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClientVpnConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClientVpnConnections page. @@ -225,7 +226,10 @@ func (p *DescribeClientVpnConnectionsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeClientVpnEndpoints.go b/service/ec2/api_op_DescribeClientVpnEndpoints.go index 89d811d54e8..8160ace7b72 100644 --- a/service/ec2/api_op_DescribeClientVpnEndpoints.go +++ b/service/ec2/api_op_DescribeClientVpnEndpoints.go @@ -186,12 +186,13 @@ func NewDescribeClientVpnEndpointsPaginator(client DescribeClientVpnEndpointsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClientVpnEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClientVpnEndpoints page. @@ -218,7 +219,10 @@ func (p *DescribeClientVpnEndpointsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeClientVpnRoutes.go b/service/ec2/api_op_DescribeClientVpnRoutes.go index e7607f5700f..fc8220f2e10 100644 --- a/service/ec2/api_op_DescribeClientVpnRoutes.go +++ b/service/ec2/api_op_DescribeClientVpnRoutes.go @@ -193,12 +193,13 @@ func NewDescribeClientVpnRoutesPaginator(client DescribeClientVpnRoutesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClientVpnRoutesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClientVpnRoutes page. @@ -225,7 +226,10 @@ func (p *DescribeClientVpnRoutesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeClientVpnTargetNetworks.go b/service/ec2/api_op_DescribeClientVpnTargetNetworks.go index 991179c6c4f..a9f2b6cd77c 100644 --- a/service/ec2/api_op_DescribeClientVpnTargetNetworks.go +++ b/service/ec2/api_op_DescribeClientVpnTargetNetworks.go @@ -197,12 +197,13 @@ func NewDescribeClientVpnTargetNetworksPaginator(client DescribeClientVpnTargetN client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClientVpnTargetNetworksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClientVpnTargetNetworks page. @@ -229,7 +230,10 @@ func (p *DescribeClientVpnTargetNetworksPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeCoipPools.go b/service/ec2/api_op_DescribeCoipPools.go index 3f9b5a4dc4f..82a20c8d04a 100644 --- a/service/ec2/api_op_DescribeCoipPools.go +++ b/service/ec2/api_op_DescribeCoipPools.go @@ -181,12 +181,13 @@ func NewDescribeCoipPoolsPaginator(client DescribeCoipPoolsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCoipPoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCoipPools page. @@ -213,7 +214,10 @@ func (p *DescribeCoipPoolsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeDhcpOptions.go b/service/ec2/api_op_DescribeDhcpOptions.go index 76414644524..ac28e587b76 100644 --- a/service/ec2/api_op_DescribeDhcpOptions.go +++ b/service/ec2/api_op_DescribeDhcpOptions.go @@ -201,12 +201,13 @@ func NewDescribeDhcpOptionsPaginator(client DescribeDhcpOptionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDhcpOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDhcpOptions page. @@ -233,7 +234,10 @@ func (p *DescribeDhcpOptionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go b/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go index 0c2bb15c8bb..cc27e093eb1 100644 --- a/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go +++ b/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go @@ -188,12 +188,13 @@ func NewDescribeEgressOnlyInternetGatewaysPaginator(client DescribeEgressOnlyInt client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEgressOnlyInternetGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEgressOnlyInternetGateways page. @@ -220,7 +221,10 @@ func (p *DescribeEgressOnlyInternetGatewaysPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeExportImageTasks.go b/service/ec2/api_op_DescribeExportImageTasks.go index d01fa8dab6a..6d2ac468a02 100644 --- a/service/ec2/api_op_DescribeExportImageTasks.go +++ b/service/ec2/api_op_DescribeExportImageTasks.go @@ -176,12 +176,13 @@ func NewDescribeExportImageTasksPaginator(client DescribeExportImageTasksAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeExportImageTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeExportImageTasks page. @@ -208,7 +209,10 @@ func (p *DescribeExportImageTasksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeFastSnapshotRestores.go b/service/ec2/api_op_DescribeFastSnapshotRestores.go index 1355444a565..3b7562069c5 100644 --- a/service/ec2/api_op_DescribeFastSnapshotRestores.go +++ b/service/ec2/api_op_DescribeFastSnapshotRestores.go @@ -187,12 +187,13 @@ func NewDescribeFastSnapshotRestoresPaginator(client DescribeFastSnapshotRestore client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFastSnapshotRestoresPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFastSnapshotRestores page. @@ -219,7 +220,10 @@ func (p *DescribeFastSnapshotRestoresPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeFleets.go b/service/ec2/api_op_DescribeFleets.go index 3f647bca106..334478ffc80 100644 --- a/service/ec2/api_op_DescribeFleets.go +++ b/service/ec2/api_op_DescribeFleets.go @@ -197,12 +197,13 @@ func NewDescribeFleetsPaginator(client DescribeFleetsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFleets page. @@ -229,7 +230,10 @@ func (p *DescribeFleetsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeFlowLogs.go b/service/ec2/api_op_DescribeFlowLogs.go index e1bbaee0726..23fd214f91e 100644 --- a/service/ec2/api_op_DescribeFlowLogs.go +++ b/service/ec2/api_op_DescribeFlowLogs.go @@ -204,12 +204,13 @@ func NewDescribeFlowLogsPaginator(client DescribeFlowLogsAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFlowLogsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFlowLogs page. @@ -236,7 +237,10 @@ func (p *DescribeFlowLogsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeFpgaImages.go b/service/ec2/api_op_DescribeFpgaImages.go index b49dce59215..e9fe35645bf 100644 --- a/service/ec2/api_op_DescribeFpgaImages.go +++ b/service/ec2/api_op_DescribeFpgaImages.go @@ -216,12 +216,13 @@ func NewDescribeFpgaImagesPaginator(client DescribeFpgaImagesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFpgaImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFpgaImages page. @@ -248,7 +249,10 @@ func (p *DescribeFpgaImagesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeHostReservationOfferings.go b/service/ec2/api_op_DescribeHostReservationOfferings.go index d6a2212e8ff..4c146798552 100644 --- a/service/ec2/api_op_DescribeHostReservationOfferings.go +++ b/service/ec2/api_op_DescribeHostReservationOfferings.go @@ -204,12 +204,13 @@ func NewDescribeHostReservationOfferingsPaginator(client DescribeHostReservation client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeHostReservationOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeHostReservationOfferings page. @@ -236,7 +237,10 @@ func (p *DescribeHostReservationOfferingsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeHostReservations.go b/service/ec2/api_op_DescribeHostReservations.go index 0613dabcf75..5dffd1614c9 100644 --- a/service/ec2/api_op_DescribeHostReservations.go +++ b/service/ec2/api_op_DescribeHostReservations.go @@ -194,12 +194,13 @@ func NewDescribeHostReservationsPaginator(client DescribeHostReservationsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeHostReservationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeHostReservations page. @@ -226,7 +227,10 @@ func (p *DescribeHostReservationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeHosts.go b/service/ec2/api_op_DescribeHosts.go index f51be0bfe77..cf3c8e695e5 100644 --- a/service/ec2/api_op_DescribeHosts.go +++ b/service/ec2/api_op_DescribeHosts.go @@ -200,12 +200,13 @@ func NewDescribeHostsPaginator(client DescribeHostsAPIClient, params *DescribeHo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeHostsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeHosts page. @@ -232,7 +233,10 @@ func (p *DescribeHostsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go b/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go index 29e86061f91..7bc55cdc193 100644 --- a/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go +++ b/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go @@ -177,12 +177,13 @@ func NewDescribeIamInstanceProfileAssociationsPaginator(client DescribeIamInstan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeIamInstanceProfileAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeIamInstanceProfileAssociations page. @@ -209,7 +210,10 @@ func (p *DescribeIamInstanceProfileAssociationsPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeImportImageTasks.go b/service/ec2/api_op_DescribeImportImageTasks.go index 6171f3c1980..232e4e2c69c 100644 --- a/service/ec2/api_op_DescribeImportImageTasks.go +++ b/service/ec2/api_op_DescribeImportImageTasks.go @@ -178,12 +178,13 @@ func NewDescribeImportImageTasksPaginator(client DescribeImportImageTasksAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImportImageTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImportImageTasks page. @@ -210,7 +211,10 @@ func (p *DescribeImportImageTasksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeImportSnapshotTasks.go b/service/ec2/api_op_DescribeImportSnapshotTasks.go index 56d84118282..e6633c42700 100644 --- a/service/ec2/api_op_DescribeImportSnapshotTasks.go +++ b/service/ec2/api_op_DescribeImportSnapshotTasks.go @@ -179,12 +179,13 @@ func NewDescribeImportSnapshotTasksPaginator(client DescribeImportSnapshotTasksA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImportSnapshotTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImportSnapshotTasks page. @@ -211,7 +212,10 @@ func (p *DescribeImportSnapshotTasksPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInstanceCreditSpecifications.go b/service/ec2/api_op_DescribeInstanceCreditSpecifications.go index b3e7c450d6c..37bc5587635 100644 --- a/service/ec2/api_op_DescribeInstanceCreditSpecifications.go +++ b/service/ec2/api_op_DescribeInstanceCreditSpecifications.go @@ -202,12 +202,13 @@ func NewDescribeInstanceCreditSpecificationsPaginator(client DescribeInstanceCre client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceCreditSpecificationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceCreditSpecifications page. @@ -234,7 +235,10 @@ func (p *DescribeInstanceCreditSpecificationsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInstanceEventWindows.go b/service/ec2/api_op_DescribeInstanceEventWindows.go index 47b1318932f..96b5f65a066 100644 --- a/service/ec2/api_op_DescribeInstanceEventWindows.go +++ b/service/ec2/api_op_DescribeInstanceEventWindows.go @@ -225,12 +225,13 @@ func NewDescribeInstanceEventWindowsPaginator(client DescribeInstanceEventWindow client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceEventWindowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceEventWindows page. @@ -257,7 +258,10 @@ func (p *DescribeInstanceEventWindowsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInstanceStatus.go b/service/ec2/api_op_DescribeInstanceStatus.go index 2e2bc70281a..66fe214c424 100644 --- a/service/ec2/api_op_DescribeInstanceStatus.go +++ b/service/ec2/api_op_DescribeInstanceStatus.go @@ -263,12 +263,13 @@ func NewDescribeInstanceStatusPaginator(client DescribeInstanceStatusAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceStatus page. @@ -295,7 +296,10 @@ func (p *DescribeInstanceStatusPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInstanceTypeOfferings.go b/service/ec2/api_op_DescribeInstanceTypeOfferings.go index 739ee7d7d39..04613d47927 100644 --- a/service/ec2/api_op_DescribeInstanceTypeOfferings.go +++ b/service/ec2/api_op_DescribeInstanceTypeOfferings.go @@ -189,12 +189,13 @@ func NewDescribeInstanceTypeOfferingsPaginator(client DescribeInstanceTypeOfferi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceTypeOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceTypeOfferings page. @@ -221,7 +222,10 @@ func (p *DescribeInstanceTypeOfferingsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInstanceTypes.go b/service/ec2/api_op_DescribeInstanceTypes.go index b504a68aef1..9747e083c1b 100644 --- a/service/ec2/api_op_DescribeInstanceTypes.go +++ b/service/ec2/api_op_DescribeInstanceTypes.go @@ -341,12 +341,13 @@ func NewDescribeInstanceTypesPaginator(client DescribeInstanceTypesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceTypes page. @@ -373,7 +374,10 @@ func (p *DescribeInstanceTypesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInstances.go b/service/ec2/api_op_DescribeInstances.go index c66173aed15..64ca8b3245d 100644 --- a/service/ec2/api_op_DescribeInstances.go +++ b/service/ec2/api_op_DescribeInstances.go @@ -507,12 +507,13 @@ func NewDescribeInstancesPaginator(client DescribeInstancesAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstances page. @@ -539,7 +540,10 @@ func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeInternetGateways.go b/service/ec2/api_op_DescribeInternetGateways.go index 5309e65a3c3..21b06f733c4 100644 --- a/service/ec2/api_op_DescribeInternetGateways.go +++ b/service/ec2/api_op_DescribeInternetGateways.go @@ -199,12 +199,13 @@ func NewDescribeInternetGatewaysPaginator(client DescribeInternetGatewaysAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInternetGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInternetGateways page. @@ -231,7 +232,10 @@ func (p *DescribeInternetGatewaysPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeIpamPools.go b/service/ec2/api_op_DescribeIpamPools.go index 70cb371f6f5..ef33ef219c9 100644 --- a/service/ec2/api_op_DescribeIpamPools.go +++ b/service/ec2/api_op_DescribeIpamPools.go @@ -175,12 +175,13 @@ func NewDescribeIpamPoolsPaginator(client DescribeIpamPoolsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeIpamPoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeIpamPools page. @@ -207,7 +208,10 @@ func (p *DescribeIpamPoolsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeIpamScopes.go b/service/ec2/api_op_DescribeIpamScopes.go index 8c0918aa4fe..54bc75678a5 100644 --- a/service/ec2/api_op_DescribeIpamScopes.go +++ b/service/ec2/api_op_DescribeIpamScopes.go @@ -176,12 +176,13 @@ func NewDescribeIpamScopesPaginator(client DescribeIpamScopesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeIpamScopesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeIpamScopes page. @@ -208,7 +209,10 @@ func (p *DescribeIpamScopesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeIpams.go b/service/ec2/api_op_DescribeIpams.go index 1ab227b3a87..2d1d01f215e 100644 --- a/service/ec2/api_op_DescribeIpams.go +++ b/service/ec2/api_op_DescribeIpams.go @@ -175,12 +175,13 @@ func NewDescribeIpamsPaginator(client DescribeIpamsAPIClient, params *DescribeIp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeIpamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeIpams page. @@ -207,7 +208,10 @@ func (p *DescribeIpamsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeIpv6Pools.go b/service/ec2/api_op_DescribeIpv6Pools.go index e3e714f1dab..4c2af8fd401 100644 --- a/service/ec2/api_op_DescribeIpv6Pools.go +++ b/service/ec2/api_op_DescribeIpv6Pools.go @@ -185,12 +185,13 @@ func NewDescribeIpv6PoolsPaginator(client DescribeIpv6PoolsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeIpv6PoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeIpv6Pools page. @@ -217,7 +218,10 @@ func (p *DescribeIpv6PoolsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLaunchTemplateVersions.go b/service/ec2/api_op_DescribeLaunchTemplateVersions.go index e1023be4688..fd269ef4e97 100644 --- a/service/ec2/api_op_DescribeLaunchTemplateVersions.go +++ b/service/ec2/api_op_DescribeLaunchTemplateVersions.go @@ -230,12 +230,13 @@ func NewDescribeLaunchTemplateVersionsPaginator(client DescribeLaunchTemplateVer client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLaunchTemplateVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLaunchTemplateVersions page. @@ -262,7 +263,10 @@ func (p *DescribeLaunchTemplateVersionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLaunchTemplates.go b/service/ec2/api_op_DescribeLaunchTemplates.go index 33e3247045a..53825a19ad2 100644 --- a/service/ec2/api_op_DescribeLaunchTemplates.go +++ b/service/ec2/api_op_DescribeLaunchTemplates.go @@ -197,12 +197,13 @@ func NewDescribeLaunchTemplatesPaginator(client DescribeLaunchTemplatesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLaunchTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLaunchTemplates page. @@ -229,7 +230,10 @@ func (p *DescribeLaunchTemplatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go b/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go index 6d0ba0256f7..55e4954e313 100644 --- a/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go +++ b/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go @@ -196,12 +196,13 @@ func NewDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next @@ -229,7 +230,10 @@ func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginato prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go b/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go index e5e22f48189..4ec42fc6a96 100644 --- a/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go +++ b/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go @@ -192,12 +192,13 @@ func NewDescribeLocalGatewayRouteTableVpcAssociationsPaginator(client DescribeLo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLocalGatewayRouteTableVpcAssociations page. @@ -224,7 +225,10 @@ func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) NextPage(ctx co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLocalGatewayRouteTables.go b/service/ec2/api_op_DescribeLocalGatewayRouteTables.go index 84fc2d940f0..040e8edaa09 100644 --- a/service/ec2/api_op_DescribeLocalGatewayRouteTables.go +++ b/service/ec2/api_op_DescribeLocalGatewayRouteTables.go @@ -190,12 +190,13 @@ func NewDescribeLocalGatewayRouteTablesPaginator(client DescribeLocalGatewayRout client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLocalGatewayRouteTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLocalGatewayRouteTables page. @@ -222,7 +223,10 @@ func (p *DescribeLocalGatewayRouteTablesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go index e6c7551fccc..ece842c608f 100644 --- a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go +++ b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go @@ -187,12 +187,13 @@ func NewDescribeLocalGatewayVirtualInterfaceGroupsPaginator(client DescribeLocal client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLocalGatewayVirtualInterfaceGroups page. @@ -219,7 +220,10 @@ func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) NextPage(ctx conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go index 4388447795f..899221e28df 100644 --- a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go +++ b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go @@ -178,12 +178,13 @@ func NewDescribeLocalGatewayVirtualInterfacesPaginator(client DescribeLocalGatew client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLocalGatewayVirtualInterfacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLocalGatewayVirtualInterfaces page. @@ -210,7 +211,10 @@ func (p *DescribeLocalGatewayVirtualInterfacesPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeLocalGateways.go b/service/ec2/api_op_DescribeLocalGateways.go index 8b7dd3d05b7..d9585ae3e59 100644 --- a/service/ec2/api_op_DescribeLocalGateways.go +++ b/service/ec2/api_op_DescribeLocalGateways.go @@ -194,12 +194,13 @@ func NewDescribeLocalGatewaysPaginator(client DescribeLocalGatewaysAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLocalGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLocalGateways page. @@ -226,7 +227,10 @@ func (p *DescribeLocalGatewaysPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeManagedPrefixLists.go b/service/ec2/api_op_DescribeManagedPrefixLists.go index 02aab84abae..b30055ea67f 100644 --- a/service/ec2/api_op_DescribeManagedPrefixLists.go +++ b/service/ec2/api_op_DescribeManagedPrefixLists.go @@ -188,12 +188,13 @@ func NewDescribeManagedPrefixListsPaginator(client DescribeManagedPrefixListsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeManagedPrefixListsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeManagedPrefixLists page. @@ -220,7 +221,10 @@ func (p *DescribeManagedPrefixListsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeMovingAddresses.go b/service/ec2/api_op_DescribeMovingAddresses.go index 9aae75c82c4..105d497443d 100644 --- a/service/ec2/api_op_DescribeMovingAddresses.go +++ b/service/ec2/api_op_DescribeMovingAddresses.go @@ -189,12 +189,13 @@ func NewDescribeMovingAddressesPaginator(client DescribeMovingAddressesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMovingAddressesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMovingAddresses page. @@ -221,7 +222,10 @@ func (p *DescribeMovingAddressesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNatGateways.go b/service/ec2/api_op_DescribeNatGateways.go index 8d225d95992..119e37a10e8 100644 --- a/service/ec2/api_op_DescribeNatGateways.go +++ b/service/ec2/api_op_DescribeNatGateways.go @@ -203,12 +203,13 @@ func NewDescribeNatGatewaysPaginator(client DescribeNatGatewaysAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNatGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNatGateways page. @@ -235,7 +236,10 @@ func (p *DescribeNatGatewaysPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkAcls.go b/service/ec2/api_op_DescribeNetworkAcls.go index b825cc5beeb..52007776675 100644 --- a/service/ec2/api_op_DescribeNetworkAcls.go +++ b/service/ec2/api_op_DescribeNetworkAcls.go @@ -235,12 +235,13 @@ func NewDescribeNetworkAclsPaginator(client DescribeNetworkAclsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkAclsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkAcls page. @@ -267,7 +268,10 @@ func (p *DescribeNetworkAclsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go b/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go index 5f02afba0d0..e319f8c3a2f 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go +++ b/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go @@ -190,12 +190,13 @@ func NewDescribeNetworkInsightsAccessScopeAnalysesPaginator(client DescribeNetwo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkInsightsAccessScopeAnalysesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkInsightsAccessScopeAnalyses page. @@ -222,7 +223,10 @@ func (p *DescribeNetworkInsightsAccessScopeAnalysesPaginator) NextPage(ctx conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go b/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go index baa5cbf6d7a..b68cd18aa3a 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go +++ b/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go @@ -178,12 +178,13 @@ func NewDescribeNetworkInsightsAccessScopesPaginator(client DescribeNetworkInsig client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkInsightsAccessScopesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkInsightsAccessScopes page. @@ -210,7 +211,10 @@ func (p *DescribeNetworkInsightsAccessScopesPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go b/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go index d7fa1f9d3a4..1cc91a0d177 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go +++ b/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go @@ -195,12 +195,13 @@ func NewDescribeNetworkInsightsAnalysesPaginator(client DescribeNetworkInsightsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkInsightsAnalysesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkInsightsAnalyses page. @@ -227,7 +228,10 @@ func (p *DescribeNetworkInsightsAnalysesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkInsightsPaths.go b/service/ec2/api_op_DescribeNetworkInsightsPaths.go index cadfed0c527..506501b71d6 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsPaths.go +++ b/service/ec2/api_op_DescribeNetworkInsightsPaths.go @@ -190,12 +190,13 @@ func NewDescribeNetworkInsightsPathsPaginator(client DescribeNetworkInsightsPath client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkInsightsPathsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkInsightsPaths page. @@ -222,7 +223,10 @@ func (p *DescribeNetworkInsightsPathsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkInterfacePermissions.go b/service/ec2/api_op_DescribeNetworkInterfacePermissions.go index da06300b346..23d91e51304 100644 --- a/service/ec2/api_op_DescribeNetworkInterfacePermissions.go +++ b/service/ec2/api_op_DescribeNetworkInterfacePermissions.go @@ -191,12 +191,13 @@ func NewDescribeNetworkInterfacePermissionsPaginator(client DescribeNetworkInter client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkInterfacePermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkInterfacePermissions page. @@ -223,7 +224,10 @@ func (p *DescribeNetworkInterfacePermissionsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeNetworkInterfaces.go b/service/ec2/api_op_DescribeNetworkInterfaces.go index 554d50b278d..8853ee703ef 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaces.go +++ b/service/ec2/api_op_DescribeNetworkInterfaces.go @@ -307,12 +307,13 @@ func NewDescribeNetworkInterfacesPaginator(client DescribeNetworkInterfacesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNetworkInterfacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNetworkInterfaces page. @@ -339,7 +340,10 @@ func (p *DescribeNetworkInterfacesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribePrefixLists.go b/service/ec2/api_op_DescribePrefixLists.go index 6f03fdc5a19..2514ef49e50 100644 --- a/service/ec2/api_op_DescribePrefixLists.go +++ b/service/ec2/api_op_DescribePrefixLists.go @@ -184,12 +184,13 @@ func NewDescribePrefixListsPaginator(client DescribePrefixListsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePrefixListsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePrefixLists page. @@ -216,7 +217,10 @@ func (p *DescribePrefixListsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribePrincipalIdFormat.go b/service/ec2/api_op_DescribePrincipalIdFormat.go index efebc3a626d..fc01360d56f 100644 --- a/service/ec2/api_op_DescribePrincipalIdFormat.go +++ b/service/ec2/api_op_DescribePrincipalIdFormat.go @@ -193,12 +193,13 @@ func NewDescribePrincipalIdFormatPaginator(client DescribePrincipalIdFormatAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePrincipalIdFormatPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePrincipalIdFormat page. @@ -225,7 +226,10 @@ func (p *DescribePrincipalIdFormatPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribePublicIpv4Pools.go b/service/ec2/api_op_DescribePublicIpv4Pools.go index a6c5f7c038c..03bbde66f16 100644 --- a/service/ec2/api_op_DescribePublicIpv4Pools.go +++ b/service/ec2/api_op_DescribePublicIpv4Pools.go @@ -181,12 +181,13 @@ func NewDescribePublicIpv4PoolsPaginator(client DescribePublicIpv4PoolsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePublicIpv4PoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePublicIpv4Pools page. @@ -213,7 +214,10 @@ func (p *DescribePublicIpv4PoolsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go b/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go index a966c86e4be..7f62a792761 100644 --- a/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go +++ b/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go @@ -184,12 +184,13 @@ func NewDescribeReplaceRootVolumeTasksPaginator(client DescribeReplaceRootVolume client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplaceRootVolumeTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplaceRootVolumeTasks page. @@ -216,7 +217,10 @@ func (p *DescribeReplaceRootVolumeTasksPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeReservedInstancesModifications.go b/service/ec2/api_op_DescribeReservedInstancesModifications.go index c81f72674e8..e7ca28048e6 100644 --- a/service/ec2/api_op_DescribeReservedInstancesModifications.go +++ b/service/ec2/api_op_DescribeReservedInstancesModifications.go @@ -212,12 +212,13 @@ func NewDescribeReservedInstancesModificationsPaginator(client DescribeReservedI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedInstancesModificationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedInstancesModifications page. @@ -238,7 +239,10 @@ func (p *DescribeReservedInstancesModificationsPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeReservedInstancesOfferings.go b/service/ec2/api_op_DescribeReservedInstancesOfferings.go index e9e19322222..e52eabdaff0 100644 --- a/service/ec2/api_op_DescribeReservedInstancesOfferings.go +++ b/service/ec2/api_op_DescribeReservedInstancesOfferings.go @@ -272,12 +272,13 @@ func NewDescribeReservedInstancesOfferingsPaginator(client DescribeReservedInsta client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedInstancesOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedInstancesOfferings page. @@ -304,7 +305,10 @@ func (p *DescribeReservedInstancesOfferingsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeRouteTables.go b/service/ec2/api_op_DescribeRouteTables.go index dff2a4300c0..834e5381ae7 100644 --- a/service/ec2/api_op_DescribeRouteTables.go +++ b/service/ec2/api_op_DescribeRouteTables.go @@ -255,12 +255,13 @@ func NewDescribeRouteTablesPaginator(client DescribeRouteTablesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRouteTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRouteTables page. @@ -287,7 +288,10 @@ func (p *DescribeRouteTablesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeScheduledInstanceAvailability.go b/service/ec2/api_op_DescribeScheduledInstanceAvailability.go index df41c64a757..0c13269735a 100644 --- a/service/ec2/api_op_DescribeScheduledInstanceAvailability.go +++ b/service/ec2/api_op_DescribeScheduledInstanceAvailability.go @@ -218,12 +218,13 @@ func NewDescribeScheduledInstanceAvailabilityPaginator(client DescribeScheduledI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScheduledInstanceAvailabilityPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScheduledInstanceAvailability page. @@ -250,7 +251,10 @@ func (p *DescribeScheduledInstanceAvailabilityPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeScheduledInstances.go b/service/ec2/api_op_DescribeScheduledInstances.go index a6fa1a8d913..e51c8c09015 100644 --- a/service/ec2/api_op_DescribeScheduledInstances.go +++ b/service/ec2/api_op_DescribeScheduledInstances.go @@ -196,12 +196,13 @@ func NewDescribeScheduledInstancesPaginator(client DescribeScheduledInstancesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScheduledInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScheduledInstances page. @@ -228,7 +229,10 @@ func (p *DescribeScheduledInstancesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSecurityGroupRules.go b/service/ec2/api_op_DescribeSecurityGroupRules.go index 6c245aebe4f..9baf77749b7 100644 --- a/service/ec2/api_op_DescribeSecurityGroupRules.go +++ b/service/ec2/api_op_DescribeSecurityGroupRules.go @@ -193,12 +193,13 @@ func NewDescribeSecurityGroupRulesPaginator(client DescribeSecurityGroupRulesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSecurityGroupRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSecurityGroupRules page. @@ -225,7 +226,10 @@ func (p *DescribeSecurityGroupRulesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSecurityGroups.go b/service/ec2/api_op_DescribeSecurityGroups.go index 0a79c1e127e..d603cbcc82b 100644 --- a/service/ec2/api_op_DescribeSecurityGroups.go +++ b/service/ec2/api_op_DescribeSecurityGroups.go @@ -290,12 +290,13 @@ func NewDescribeSecurityGroupsPaginator(client DescribeSecurityGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSecurityGroups page. @@ -322,7 +323,10 @@ func (p *DescribeSecurityGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSnapshotTierStatus.go b/service/ec2/api_op_DescribeSnapshotTierStatus.go index aeffc8fe42f..d755a1599ce 100644 --- a/service/ec2/api_op_DescribeSnapshotTierStatus.go +++ b/service/ec2/api_op_DescribeSnapshotTierStatus.go @@ -184,12 +184,13 @@ func NewDescribeSnapshotTierStatusPaginator(client DescribeSnapshotTierStatusAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSnapshotTierStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSnapshotTierStatus page. @@ -216,7 +217,10 @@ func (p *DescribeSnapshotTierStatusPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSnapshots.go b/service/ec2/api_op_DescribeSnapshots.go index 4bdecfeb342..aae09b3d74c 100644 --- a/service/ec2/api_op_DescribeSnapshots.go +++ b/service/ec2/api_op_DescribeSnapshots.go @@ -292,12 +292,13 @@ func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSnapshots page. @@ -324,7 +325,10 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSpotFleetRequests.go b/service/ec2/api_op_DescribeSpotFleetRequests.go index 27ec0cc18cb..5e80ebed79b 100644 --- a/service/ec2/api_op_DescribeSpotFleetRequests.go +++ b/service/ec2/api_op_DescribeSpotFleetRequests.go @@ -179,12 +179,13 @@ func NewDescribeSpotFleetRequestsPaginator(client DescribeSpotFleetRequestsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSpotFleetRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSpotFleetRequests page. @@ -211,7 +212,10 @@ func (p *DescribeSpotFleetRequestsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSpotInstanceRequests.go b/service/ec2/api_op_DescribeSpotInstanceRequests.go index f6e304fb8b7..51cd6dda203 100644 --- a/service/ec2/api_op_DescribeSpotInstanceRequests.go +++ b/service/ec2/api_op_DescribeSpotInstanceRequests.go @@ -330,12 +330,13 @@ func NewDescribeSpotInstanceRequestsPaginator(client DescribeSpotInstanceRequest client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSpotInstanceRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSpotInstanceRequests page. @@ -362,7 +363,10 @@ func (p *DescribeSpotInstanceRequestsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSpotPriceHistory.go b/service/ec2/api_op_DescribeSpotPriceHistory.go index a644f621731..607c3b78a8a 100644 --- a/service/ec2/api_op_DescribeSpotPriceHistory.go +++ b/service/ec2/api_op_DescribeSpotPriceHistory.go @@ -221,12 +221,13 @@ func NewDescribeSpotPriceHistoryPaginator(client DescribeSpotPriceHistoryAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSpotPriceHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSpotPriceHistory page. @@ -253,7 +254,10 @@ func (p *DescribeSpotPriceHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeStaleSecurityGroups.go b/service/ec2/api_op_DescribeStaleSecurityGroups.go index 5e3be0545d7..21ca1034698 100644 --- a/service/ec2/api_op_DescribeStaleSecurityGroups.go +++ b/service/ec2/api_op_DescribeStaleSecurityGroups.go @@ -184,12 +184,13 @@ func NewDescribeStaleSecurityGroupsPaginator(client DescribeStaleSecurityGroupsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStaleSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStaleSecurityGroups page. @@ -216,7 +217,10 @@ func (p *DescribeStaleSecurityGroupsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeStoreImageTasks.go b/service/ec2/api_op_DescribeStoreImageTasks.go index 650c30041fb..38689f8217a 100644 --- a/service/ec2/api_op_DescribeStoreImageTasks.go +++ b/service/ec2/api_op_DescribeStoreImageTasks.go @@ -200,12 +200,13 @@ func NewDescribeStoreImageTasksPaginator(client DescribeStoreImageTasksAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStoreImageTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStoreImageTasks page. @@ -232,7 +233,10 @@ func (p *DescribeStoreImageTasksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeSubnets.go b/service/ec2/api_op_DescribeSubnets.go index 5df58b29ce0..b3a6605cb4f 100644 --- a/service/ec2/api_op_DescribeSubnets.go +++ b/service/ec2/api_op_DescribeSubnets.go @@ -240,12 +240,13 @@ func NewDescribeSubnetsPaginator(client DescribeSubnetsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSubnetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSubnets page. @@ -272,7 +273,10 @@ func (p *DescribeSubnetsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTags.go b/service/ec2/api_op_DescribeTags.go index 3fd2a85a6ef..e59af42dcee 100644 --- a/service/ec2/api_op_DescribeTags.go +++ b/service/ec2/api_op_DescribeTags.go @@ -195,12 +195,13 @@ func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTags client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTags page. @@ -227,7 +228,10 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTrafficMirrorFilters.go b/service/ec2/api_op_DescribeTrafficMirrorFilters.go index 04750e4b951..8c99d058c69 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorFilters.go +++ b/service/ec2/api_op_DescribeTrafficMirrorFilters.go @@ -184,12 +184,13 @@ func NewDescribeTrafficMirrorFiltersPaginator(client DescribeTrafficMirrorFilter client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTrafficMirrorFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTrafficMirrorFilters page. @@ -216,7 +217,10 @@ func (p *DescribeTrafficMirrorFiltersPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTrafficMirrorSessions.go b/service/ec2/api_op_DescribeTrafficMirrorSessions.go index e1beb14b74a..c54018e84b3 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorSessions.go +++ b/service/ec2/api_op_DescribeTrafficMirrorSessions.go @@ -206,12 +206,13 @@ func NewDescribeTrafficMirrorSessionsPaginator(client DescribeTrafficMirrorSessi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTrafficMirrorSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTrafficMirrorSessions page. @@ -238,7 +239,10 @@ func (p *DescribeTrafficMirrorSessionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTrafficMirrorTargets.go b/service/ec2/api_op_DescribeTrafficMirrorTargets.go index 6e9a15e3041..8e256a0da61 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorTargets.go +++ b/service/ec2/api_op_DescribeTrafficMirrorTargets.go @@ -193,12 +193,13 @@ func NewDescribeTrafficMirrorTargetsPaginator(client DescribeTrafficMirrorTarget client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTrafficMirrorTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTrafficMirrorTargets page. @@ -225,7 +226,10 @@ func (p *DescribeTrafficMirrorTargetsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayAttachments.go b/service/ec2/api_op_DescribeTransitGatewayAttachments.go index a80be189a4c..ab32c870c81 100644 --- a/service/ec2/api_op_DescribeTransitGatewayAttachments.go +++ b/service/ec2/api_op_DescribeTransitGatewayAttachments.go @@ -210,12 +210,13 @@ func NewDescribeTransitGatewayAttachmentsPaginator(client DescribeTransitGateway client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayAttachments page. @@ -242,7 +243,10 @@ func (p *DescribeTransitGatewayAttachmentsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go b/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go index 85a55c9b331..64df1e69812 100644 --- a/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go +++ b/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go @@ -187,12 +187,13 @@ func NewDescribeTransitGatewayConnectPeersPaginator(client DescribeTransitGatewa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayConnectPeersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayConnectPeers page. @@ -219,7 +220,10 @@ func (p *DescribeTransitGatewayConnectPeersPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayConnects.go b/service/ec2/api_op_DescribeTransitGatewayConnects.go index c5fd8d3aa95..4989e1c74d0 100644 --- a/service/ec2/api_op_DescribeTransitGatewayConnects.go +++ b/service/ec2/api_op_DescribeTransitGatewayConnects.go @@ -195,12 +195,13 @@ func NewDescribeTransitGatewayConnectsPaginator(client DescribeTransitGatewayCon client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayConnectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayConnects page. @@ -227,7 +228,10 @@ func (p *DescribeTransitGatewayConnectsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go b/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go index 7dc53b6f90e..0cd49e0bd1d 100644 --- a/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go +++ b/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go @@ -188,12 +188,13 @@ func NewDescribeTransitGatewayMulticastDomainsPaginator(client DescribeTransitGa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayMulticastDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayMulticastDomains page. @@ -220,7 +221,10 @@ func (p *DescribeTransitGatewayMulticastDomainsPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go b/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go index 09a17fc7f45..d3d757741a6 100644 --- a/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go +++ b/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go @@ -205,12 +205,13 @@ func NewDescribeTransitGatewayPeeringAttachmentsPaginator(client DescribeTransit client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayPeeringAttachments page. @@ -237,7 +238,10 @@ func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayRouteTables.go b/service/ec2/api_op_DescribeTransitGatewayRouteTables.go index 1b547a236ee..c753d60d87b 100644 --- a/service/ec2/api_op_DescribeTransitGatewayRouteTables.go +++ b/service/ec2/api_op_DescribeTransitGatewayRouteTables.go @@ -195,12 +195,13 @@ func NewDescribeTransitGatewayRouteTablesPaginator(client DescribeTransitGateway client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayRouteTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayRouteTables page. @@ -227,7 +228,10 @@ func (p *DescribeTransitGatewayRouteTablesPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go b/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go index 8f56cc654df..63477876eee 100644 --- a/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go +++ b/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go @@ -192,12 +192,13 @@ func NewDescribeTransitGatewayVpcAttachmentsPaginator(client DescribeTransitGate client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewayVpcAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGatewayVpcAttachments page. @@ -224,7 +225,10 @@ func (p *DescribeTransitGatewayVpcAttachmentsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTransitGateways.go b/service/ec2/api_op_DescribeTransitGateways.go index 37b2d18334b..cdbc5c1e5a9 100644 --- a/service/ec2/api_op_DescribeTransitGateways.go +++ b/service/ec2/api_op_DescribeTransitGateways.go @@ -216,12 +216,13 @@ func NewDescribeTransitGatewaysPaginator(client DescribeTransitGatewaysAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTransitGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTransitGateways page. @@ -248,7 +249,10 @@ func (p *DescribeTransitGatewaysPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go b/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go index ac56ad8ddcf..aee4039a22f 100644 --- a/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go +++ b/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go @@ -185,12 +185,13 @@ func NewDescribeTrunkInterfaceAssociationsPaginator(client DescribeTrunkInterfac client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTrunkInterfaceAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTrunkInterfaceAssociations page. @@ -217,7 +218,10 @@ func (p *DescribeTrunkInterfaceAssociationsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVolumeStatus.go b/service/ec2/api_op_DescribeVolumeStatus.go index 5e4ee0f61d7..0221411dc4c 100644 --- a/service/ec2/api_op_DescribeVolumeStatus.go +++ b/service/ec2/api_op_DescribeVolumeStatus.go @@ -258,12 +258,13 @@ func NewDescribeVolumeStatusPaginator(client DescribeVolumeStatusAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVolumeStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVolumeStatus page. @@ -290,7 +291,10 @@ func (p *DescribeVolumeStatusPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVolumes.go b/service/ec2/api_op_DescribeVolumes.go index 96ffe8260bd..09fc34cdb8f 100644 --- a/service/ec2/api_op_DescribeVolumes.go +++ b/service/ec2/api_op_DescribeVolumes.go @@ -261,12 +261,13 @@ func NewDescribeVolumesPaginator(client DescribeVolumesAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVolumesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVolumes page. @@ -293,7 +294,10 @@ func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVolumesModifications.go b/service/ec2/api_op_DescribeVolumesModifications.go index afc77da948a..22e333a839f 100644 --- a/service/ec2/api_op_DescribeVolumesModifications.go +++ b/service/ec2/api_op_DescribeVolumesModifications.go @@ -218,12 +218,13 @@ func NewDescribeVolumesModificationsPaginator(client DescribeVolumesModification client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVolumesModificationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVolumesModifications page. @@ -250,7 +251,10 @@ func (p *DescribeVolumesModificationsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go b/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go index fde5fb8cbcb..9e2dbd94975 100644 --- a/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go +++ b/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go @@ -176,12 +176,13 @@ func NewDescribeVpcClassicLinkDnsSupportPaginator(client DescribeVpcClassicLinkD client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcClassicLinkDnsSupportPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcClassicLinkDnsSupport page. @@ -208,7 +209,10 @@ func (p *DescribeVpcClassicLinkDnsSupportPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go b/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go index 471f8d66132..ec76907cffa 100644 --- a/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go +++ b/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go @@ -196,12 +196,13 @@ func NewDescribeVpcEndpointConnectionNotificationsPaginator(client DescribeVpcEn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcEndpointConnectionNotificationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcEndpointConnectionNotifications page. @@ -228,7 +229,10 @@ func (p *DescribeVpcEndpointConnectionNotificationsPaginator) NextPage(ctx conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcEndpointConnections.go b/service/ec2/api_op_DescribeVpcEndpointConnections.go index e9eb1dda3dd..46ad19c0272 100644 --- a/service/ec2/api_op_DescribeVpcEndpointConnections.go +++ b/service/ec2/api_op_DescribeVpcEndpointConnections.go @@ -192,12 +192,13 @@ func NewDescribeVpcEndpointConnectionsPaginator(client DescribeVpcEndpointConnec client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcEndpointConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcEndpointConnections page. @@ -224,7 +225,10 @@ func (p *DescribeVpcEndpointConnectionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go b/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go index 0ed4335e8eb..d9f0c0e8bdb 100644 --- a/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go +++ b/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go @@ -201,12 +201,13 @@ func NewDescribeVpcEndpointServiceConfigurationsPaginator(client DescribeVpcEndp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcEndpointServiceConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcEndpointServiceConfigurations page. @@ -233,7 +234,10 @@ func (p *DescribeVpcEndpointServiceConfigurationsPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go b/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go index 449619561c2..5d4a83a7573 100644 --- a/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go +++ b/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go @@ -193,12 +193,13 @@ func NewDescribeVpcEndpointServicePermissionsPaginator(client DescribeVpcEndpoin client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcEndpointServicePermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcEndpointServicePermissions page. @@ -225,7 +226,10 @@ func (p *DescribeVpcEndpointServicePermissionsPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcEndpoints.go b/service/ec2/api_op_DescribeVpcEndpoints.go index 456b1811651..5102b669db9 100644 --- a/service/ec2/api_op_DescribeVpcEndpoints.go +++ b/service/ec2/api_op_DescribeVpcEndpoints.go @@ -206,12 +206,13 @@ func NewDescribeVpcEndpointsPaginator(client DescribeVpcEndpointsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcEndpoints page. @@ -238,7 +239,10 @@ func (p *DescribeVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcPeeringConnections.go b/service/ec2/api_op_DescribeVpcPeeringConnections.go index 7ff851b330c..2b97cc38bf5 100644 --- a/service/ec2/api_op_DescribeVpcPeeringConnections.go +++ b/service/ec2/api_op_DescribeVpcPeeringConnections.go @@ -227,12 +227,13 @@ func NewDescribeVpcPeeringConnectionsPaginator(client DescribeVpcPeeringConnecti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcPeeringConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcPeeringConnections page. @@ -259,7 +260,10 @@ func (p *DescribeVpcPeeringConnectionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_DescribeVpcs.go b/service/ec2/api_op_DescribeVpcs.go index d7e563cc782..a56bd5e50f9 100644 --- a/service/ec2/api_op_DescribeVpcs.go +++ b/service/ec2/api_op_DescribeVpcs.go @@ -232,12 +232,13 @@ func NewDescribeVpcsPaginator(client DescribeVpcsAPIClient, params *DescribeVpcs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVpcsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVpcs page. @@ -264,7 +265,10 @@ func (p *DescribeVpcsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go b/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go index 34ee9985e5a..061477b6e33 100644 --- a/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go +++ b/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go @@ -181,12 +181,13 @@ func NewGetAssociatedIpv6PoolCidrsPaginator(client GetAssociatedIpv6PoolCidrsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAssociatedIpv6PoolCidrsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAssociatedIpv6PoolCidrs page. @@ -213,7 +214,10 @@ func (p *GetAssociatedIpv6PoolCidrsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetGroupsForCapacityReservation.go b/service/ec2/api_op_GetGroupsForCapacityReservation.go index 098844db6c1..eef46474be4 100644 --- a/service/ec2/api_op_GetGroupsForCapacityReservation.go +++ b/service/ec2/api_op_GetGroupsForCapacityReservation.go @@ -185,12 +185,13 @@ func NewGetGroupsForCapacityReservationPaginator(client GetGroupsForCapacityRese client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetGroupsForCapacityReservationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetGroupsForCapacityReservation page. @@ -217,7 +218,10 @@ func (p *GetGroupsForCapacityReservationPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go b/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go index 98711c17566..9e073a2d372 100644 --- a/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go +++ b/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go @@ -208,12 +208,13 @@ func NewGetInstanceTypesFromInstanceRequirementsPaginator(client GetInstanceType client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInstanceTypesFromInstanceRequirementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInstanceTypesFromInstanceRequirements page. @@ -240,7 +241,10 @@ func (p *GetInstanceTypesFromInstanceRequirementsPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetIpamAddressHistory.go b/service/ec2/api_op_GetIpamAddressHistory.go index ebf1258f908..fd666171123 100644 --- a/service/ec2/api_op_GetIpamAddressHistory.go +++ b/service/ec2/api_op_GetIpamAddressHistory.go @@ -201,12 +201,13 @@ func NewGetIpamAddressHistoryPaginator(client GetIpamAddressHistoryAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetIpamAddressHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetIpamAddressHistory page. @@ -233,7 +234,10 @@ func (p *GetIpamAddressHistoryPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetIpamPoolAllocations.go b/service/ec2/api_op_GetIpamPoolAllocations.go index 30814977c73..536798a4226 100644 --- a/service/ec2/api_op_GetIpamPoolAllocations.go +++ b/service/ec2/api_op_GetIpamPoolAllocations.go @@ -184,12 +184,13 @@ func NewGetIpamPoolAllocationsPaginator(client GetIpamPoolAllocationsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetIpamPoolAllocationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetIpamPoolAllocations page. @@ -216,7 +217,10 @@ func (p *GetIpamPoolAllocationsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetIpamPoolCidrs.go b/service/ec2/api_op_GetIpamPoolCidrs.go index f08772d86c8..e48bcdda4be 100644 --- a/service/ec2/api_op_GetIpamPoolCidrs.go +++ b/service/ec2/api_op_GetIpamPoolCidrs.go @@ -180,12 +180,13 @@ func NewGetIpamPoolCidrsPaginator(client GetIpamPoolCidrsAPIClient, params *GetI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetIpamPoolCidrsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetIpamPoolCidrs page. @@ -212,7 +213,10 @@ func (p *GetIpamPoolCidrsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetIpamResourceCidrs.go b/service/ec2/api_op_GetIpamResourceCidrs.go index 727ddeee65c..56f16b8fe1c 100644 --- a/service/ec2/api_op_GetIpamResourceCidrs.go +++ b/service/ec2/api_op_GetIpamResourceCidrs.go @@ -196,12 +196,13 @@ func NewGetIpamResourceCidrsPaginator(client GetIpamResourceCidrsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetIpamResourceCidrsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetIpamResourceCidrs page. @@ -228,7 +229,10 @@ func (p *GetIpamResourceCidrsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetManagedPrefixListAssociations.go b/service/ec2/api_op_GetManagedPrefixListAssociations.go index 52e19317b75..1a7eb459109 100644 --- a/service/ec2/api_op_GetManagedPrefixListAssociations.go +++ b/service/ec2/api_op_GetManagedPrefixListAssociations.go @@ -181,12 +181,13 @@ func NewGetManagedPrefixListAssociationsPaginator(client GetManagedPrefixListAss client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetManagedPrefixListAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetManagedPrefixListAssociations page. @@ -213,7 +214,10 @@ func (p *GetManagedPrefixListAssociationsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetManagedPrefixListEntries.go b/service/ec2/api_op_GetManagedPrefixListEntries.go index 8b357d6d928..c3fdc31f9bb 100644 --- a/service/ec2/api_op_GetManagedPrefixListEntries.go +++ b/service/ec2/api_op_GetManagedPrefixListEntries.go @@ -184,12 +184,13 @@ func NewGetManagedPrefixListEntriesPaginator(client GetManagedPrefixListEntriesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetManagedPrefixListEntriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetManagedPrefixListEntries page. @@ -216,7 +217,10 @@ func (p *GetManagedPrefixListEntriesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetSpotPlacementScores.go b/service/ec2/api_op_GetSpotPlacementScores.go index 546c5157b86..6eeb1c3656e 100644 --- a/service/ec2/api_op_GetSpotPlacementScores.go +++ b/service/ec2/api_op_GetSpotPlacementScores.go @@ -224,12 +224,13 @@ func NewGetSpotPlacementScoresPaginator(client GetSpotPlacementScoresAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSpotPlacementScoresPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSpotPlacementScores page. @@ -256,7 +257,10 @@ func (p *GetSpotPlacementScoresPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go b/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go index 69e25dee179..330fea42aa8 100644 --- a/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go +++ b/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go @@ -187,12 +187,13 @@ func NewGetTransitGatewayAttachmentPropagationsPaginator(client GetTransitGatewa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayAttachmentPropagationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayAttachmentPropagations page. @@ -219,7 +220,10 @@ func (p *GetTransitGatewayAttachmentPropagationsPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go b/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go index 92115d508f9..3aedb956ae9 100644 --- a/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go +++ b/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go @@ -194,12 +194,13 @@ func NewGetTransitGatewayMulticastDomainAssociationsPaginator(client GetTransitG client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayMulticastDomainAssociations page. @@ -226,7 +227,10 @@ func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go b/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go index f26df2986b9..b5fee978c86 100644 --- a/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go +++ b/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go @@ -205,12 +205,13 @@ func NewGetTransitGatewayPrefixListReferencesPaginator(client GetTransitGatewayP client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayPrefixListReferencesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayPrefixListReferences page. @@ -237,7 +238,10 @@ func (p *GetTransitGatewayPrefixListReferencesPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go b/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go index 057f9923b27..0c79089cbbd 100644 --- a/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go +++ b/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go @@ -193,12 +193,13 @@ func NewGetTransitGatewayRouteTableAssociationsPaginator(client GetTransitGatewa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayRouteTableAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayRouteTableAssociations page. @@ -225,7 +226,10 @@ func (p *GetTransitGatewayRouteTableAssociationsPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go b/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go index 0b2de5e0284..3b1625146df 100644 --- a/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go +++ b/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go @@ -193,12 +193,13 @@ func NewGetTransitGatewayRouteTablePropagationsPaginator(client GetTransitGatewa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayRouteTablePropagationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayRouteTablePropagations page. @@ -225,7 +226,10 @@ func (p *GetTransitGatewayRouteTablePropagationsPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_GetVpnConnectionDeviceTypes.go b/service/ec2/api_op_GetVpnConnectionDeviceTypes.go index 0bb501b8897..849fd6f7ad5 100644 --- a/service/ec2/api_op_GetVpnConnectionDeviceTypes.go +++ b/service/ec2/api_op_GetVpnConnectionDeviceTypes.go @@ -194,12 +194,13 @@ func NewGetVpnConnectionDeviceTypesPaginator(client GetVpnConnectionDeviceTypesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetVpnConnectionDeviceTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetVpnConnectionDeviceTypes page. @@ -226,7 +227,10 @@ func (p *GetVpnConnectionDeviceTypesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_ListSnapshotsInRecycleBin.go b/service/ec2/api_op_ListSnapshotsInRecycleBin.go index f89cceeb51d..90667549a37 100644 --- a/service/ec2/api_op_ListSnapshotsInRecycleBin.go +++ b/service/ec2/api_op_ListSnapshotsInRecycleBin.go @@ -175,12 +175,13 @@ func NewListSnapshotsInRecycleBinPaginator(client ListSnapshotsInRecycleBinAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSnapshotsInRecycleBinPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSnapshotsInRecycleBin page. @@ -207,7 +208,10 @@ func (p *ListSnapshotsInRecycleBinPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_SearchLocalGatewayRoutes.go b/service/ec2/api_op_SearchLocalGatewayRoutes.go index 79fcda8f988..5282fb384e5 100644 --- a/service/ec2/api_op_SearchLocalGatewayRoutes.go +++ b/service/ec2/api_op_SearchLocalGatewayRoutes.go @@ -182,12 +182,13 @@ func NewSearchLocalGatewayRoutesPaginator(client SearchLocalGatewayRoutesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchLocalGatewayRoutesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchLocalGatewayRoutes page. @@ -214,7 +215,10 @@ func (p *SearchLocalGatewayRoutesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go b/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go index 5c831a6d4dc..8bc5bd19e8c 100644 --- a/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go +++ b/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go @@ -205,12 +205,13 @@ func NewSearchTransitGatewayMulticastGroupsPaginator(client SearchTransitGateway client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchTransitGatewayMulticastGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchTransitGatewayMulticastGroups page. @@ -237,7 +238,10 @@ func (p *SearchTransitGatewayMulticastGroupsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecr/api_op_DescribeImageScanFindings.go b/service/ecr/api_op_DescribeImageScanFindings.go index 25617b3f995..5908d7ed0a3 100644 --- a/service/ecr/api_op_DescribeImageScanFindings.go +++ b/service/ecr/api_op_DescribeImageScanFindings.go @@ -217,12 +217,13 @@ func NewDescribeImageScanFindingsPaginator(client DescribeImageScanFindingsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImageScanFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImageScanFindings page. @@ -249,7 +250,10 @@ func (p *DescribeImageScanFindingsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecr/api_op_DescribeImages.go b/service/ecr/api_op_DescribeImages.go index 04df99e24c8..f4b654290b8 100644 --- a/service/ecr/api_op_DescribeImages.go +++ b/service/ecr/api_op_DescribeImages.go @@ -204,12 +204,13 @@ func NewDescribeImagesPaginator(client DescribeImagesAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImages page. @@ -236,7 +237,10 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecr/api_op_DescribePullThroughCacheRules.go b/service/ecr/api_op_DescribePullThroughCacheRules.go index 1ccaabcc0d8..2bfefbd7a93 100644 --- a/service/ecr/api_op_DescribePullThroughCacheRules.go +++ b/service/ecr/api_op_DescribePullThroughCacheRules.go @@ -196,12 +196,13 @@ func NewDescribePullThroughCacheRulesPaginator(client DescribePullThroughCacheRu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePullThroughCacheRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePullThroughCacheRules page. @@ -228,7 +229,10 @@ func (p *DescribePullThroughCacheRulesPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecr/api_op_DescribeRepositories.go b/service/ecr/api_op_DescribeRepositories.go index 38f11ed46cd..cef08268c3e 100644 --- a/service/ecr/api_op_DescribeRepositories.go +++ b/service/ecr/api_op_DescribeRepositories.go @@ -194,12 +194,13 @@ func NewDescribeRepositoriesPaginator(client DescribeRepositoriesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRepositoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRepositories page. @@ -226,7 +227,10 @@ func (p *DescribeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecr/api_op_GetLifecyclePolicyPreview.go b/service/ecr/api_op_GetLifecyclePolicyPreview.go index 165392e1a66..5114fd1b06b 100644 --- a/service/ecr/api_op_GetLifecyclePolicyPreview.go +++ b/service/ecr/api_op_GetLifecyclePolicyPreview.go @@ -228,12 +228,13 @@ func NewGetLifecyclePolicyPreviewPaginator(client GetLifecyclePolicyPreviewAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetLifecyclePolicyPreviewPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetLifecyclePolicyPreview page. @@ -260,7 +261,10 @@ func (p *GetLifecyclePolicyPreviewPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecr/api_op_ListImages.go b/service/ecr/api_op_ListImages.go index 6fda154e28b..b3d096d5b76 100644 --- a/service/ecr/api_op_ListImages.go +++ b/service/ecr/api_op_ListImages.go @@ -200,12 +200,13 @@ func NewListImagesPaginator(client ListImagesAPIClient, params *ListImagesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImages page. @@ -232,7 +233,10 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecrpublic/api_op_DescribeImageTags.go b/service/ecrpublic/api_op_DescribeImageTags.go index 4a93838fef1..e59efd5ac40 100644 --- a/service/ecrpublic/api_op_DescribeImageTags.go +++ b/service/ecrpublic/api_op_DescribeImageTags.go @@ -194,12 +194,13 @@ func NewDescribeImageTagsPaginator(client DescribeImageTagsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImageTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImageTags page. @@ -226,7 +227,10 @@ func (p *DescribeImageTagsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecrpublic/api_op_DescribeImages.go b/service/ecrpublic/api_op_DescribeImages.go index 607e0dae2d7..6d6df97a226 100644 --- a/service/ecrpublic/api_op_DescribeImages.go +++ b/service/ecrpublic/api_op_DescribeImages.go @@ -201,12 +201,13 @@ func NewDescribeImagesPaginator(client DescribeImagesAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeImages page. @@ -233,7 +234,10 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecrpublic/api_op_DescribeRegistries.go b/service/ecrpublic/api_op_DescribeRegistries.go index 4b0fc075ba7..e9297dfe9a8 100644 --- a/service/ecrpublic/api_op_DescribeRegistries.go +++ b/service/ecrpublic/api_op_DescribeRegistries.go @@ -184,12 +184,13 @@ func NewDescribeRegistriesPaginator(client DescribeRegistriesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRegistriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRegistries page. @@ -216,7 +217,10 @@ func (p *DescribeRegistriesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecrpublic/api_op_DescribeRepositories.go b/service/ecrpublic/api_op_DescribeRepositories.go index dd62a28ad7f..6f446f513de 100644 --- a/service/ecrpublic/api_op_DescribeRepositories.go +++ b/service/ecrpublic/api_op_DescribeRepositories.go @@ -194,12 +194,13 @@ func NewDescribeRepositoriesPaginator(client DescribeRepositoriesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRepositoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRepositories page. @@ -226,7 +227,10 @@ func (p *DescribeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListAccountSettings.go b/service/ecs/api_op_ListAccountSettings.go index cbc445d0a26..6e604deca53 100644 --- a/service/ecs/api_op_ListAccountSettings.go +++ b/service/ecs/api_op_ListAccountSettings.go @@ -200,12 +200,13 @@ func NewListAccountSettingsPaginator(client ListAccountSettingsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountSettingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountSettings page. @@ -228,7 +229,10 @@ func (p *ListAccountSettingsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListAttributes.go b/service/ecs/api_op_ListAttributes.go index 14315931365..aa317fce4ce 100644 --- a/service/ecs/api_op_ListAttributes.go +++ b/service/ecs/api_op_ListAttributes.go @@ -205,12 +205,13 @@ func NewListAttributesPaginator(client ListAttributesAPIClient, params *ListAttr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttributes page. @@ -237,7 +238,10 @@ func (p *ListAttributesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListClusters.go b/service/ecs/api_op_ListClusters.go index 73c5054543b..58357bad38e 100644 --- a/service/ecs/api_op_ListClusters.go +++ b/service/ecs/api_op_ListClusters.go @@ -179,12 +179,13 @@ func NewListClustersPaginator(client ListClustersAPIClient, params *ListClusters client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClusters page. @@ -211,7 +212,10 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListContainerInstances.go b/service/ecs/api_op_ListContainerInstances.go index 93fefc64698..17f23bd8c50 100644 --- a/service/ecs/api_op_ListContainerInstances.go +++ b/service/ecs/api_op_ListContainerInstances.go @@ -207,12 +207,13 @@ func NewListContainerInstancesPaginator(client ListContainerInstancesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContainerInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContainerInstances page. @@ -239,7 +240,10 @@ func (p *ListContainerInstancesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListServices.go b/service/ecs/api_op_ListServices.go index 335c6bdfbc3..821c6724555 100644 --- a/service/ecs/api_op_ListServices.go +++ b/service/ecs/api_op_ListServices.go @@ -192,12 +192,13 @@ func NewListServicesPaginator(client ListServicesAPIClient, params *ListServices client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServices page. @@ -224,7 +225,10 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListTaskDefinitionFamilies.go b/service/ecs/api_op_ListTaskDefinitionFamilies.go index 8bf1922b5d5..6349c652aaf 100644 --- a/service/ecs/api_op_ListTaskDefinitionFamilies.go +++ b/service/ecs/api_op_ListTaskDefinitionFamilies.go @@ -204,12 +204,13 @@ func NewListTaskDefinitionFamiliesPaginator(client ListTaskDefinitionFamiliesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTaskDefinitionFamiliesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTaskDefinitionFamilies page. @@ -236,7 +237,10 @@ func (p *ListTaskDefinitionFamiliesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListTaskDefinitions.go b/service/ecs/api_op_ListTaskDefinitions.go index c5781e330c5..744aea0d3bd 100644 --- a/service/ecs/api_op_ListTaskDefinitions.go +++ b/service/ecs/api_op_ListTaskDefinitions.go @@ -206,12 +206,13 @@ func NewListTaskDefinitionsPaginator(client ListTaskDefinitionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTaskDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTaskDefinitions page. @@ -238,7 +239,10 @@ func (p *ListTaskDefinitionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ecs/api_op_ListTasks.go b/service/ecs/api_op_ListTasks.go index 0fd92eed26e..b3f738d22c6 100644 --- a/service/ecs/api_op_ListTasks.go +++ b/service/ecs/api_op_ListTasks.go @@ -219,12 +219,13 @@ func NewListTasksPaginator(client ListTasksAPIClient, params *ListTasksInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTasks page. @@ -251,7 +252,10 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/efs/api_op_DescribeAccessPoints.go b/service/efs/api_op_DescribeAccessPoints.go index 4956c796300..1763b89af3c 100644 --- a/service/efs/api_op_DescribeAccessPoints.go +++ b/service/efs/api_op_DescribeAccessPoints.go @@ -180,12 +180,13 @@ func NewDescribeAccessPointsPaginator(client DescribeAccessPointsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAccessPointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAccessPoints page. @@ -212,7 +213,10 @@ func (p *DescribeAccessPointsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/efs/api_op_DescribeFileSystems.go b/service/efs/api_op_DescribeFileSystems.go index 33111115fb5..67fd540b35a 100644 --- a/service/efs/api_op_DescribeFileSystems.go +++ b/service/efs/api_op_DescribeFileSystems.go @@ -198,12 +198,13 @@ func NewDescribeFileSystemsPaginator(client DescribeFileSystemsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFileSystemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFileSystems page. @@ -230,7 +231,10 @@ func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/efs/api_op_DescribeTags.go b/service/efs/api_op_DescribeTags.go index 36e339a8814..affee17ac7e 100644 --- a/service/efs/api_op_DescribeTags.go +++ b/service/efs/api_op_DescribeTags.go @@ -191,12 +191,13 @@ func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTags client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTags page. @@ -223,7 +224,10 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/efs/api_op_ListTagsForResource.go b/service/efs/api_op_ListTagsForResource.go index 1f4473d22b2..d46ee0e6c67 100644 --- a/service/efs/api_op_ListTagsForResource.go +++ b/service/efs/api_op_ListTagsForResource.go @@ -176,12 +176,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -208,7 +209,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_DescribeAddonVersions.go b/service/eks/api_op_DescribeAddonVersions.go index 07dc41fe948..5d742c1bedd 100644 --- a/service/eks/api_op_DescribeAddonVersions.go +++ b/service/eks/api_op_DescribeAddonVersions.go @@ -179,12 +179,13 @@ func NewDescribeAddonVersionsPaginator(client DescribeAddonVersionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAddonVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAddonVersions page. @@ -211,7 +212,10 @@ func (p *DescribeAddonVersionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_ListAddons.go b/service/eks/api_op_ListAddons.go index 6d1c2b27ce6..fc3b1455c6f 100644 --- a/service/eks/api_op_ListAddons.go +++ b/service/eks/api_op_ListAddons.go @@ -188,12 +188,13 @@ func NewListAddonsPaginator(client ListAddonsAPIClient, params *ListAddonsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAddonsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAddons page. @@ -220,7 +221,10 @@ func (p *ListAddonsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_ListClusters.go b/service/eks/api_op_ListClusters.go index 34bc39ae0ae..29fe17aac9a 100644 --- a/service/eks/api_op_ListClusters.go +++ b/service/eks/api_op_ListClusters.go @@ -184,12 +184,13 @@ func NewListClustersPaginator(client ListClustersAPIClient, params *ListClusters client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClusters page. @@ -216,7 +217,10 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_ListFargateProfiles.go b/service/eks/api_op_ListFargateProfiles.go index f102946e544..84b7a0d68f5 100644 --- a/service/eks/api_op_ListFargateProfiles.go +++ b/service/eks/api_op_ListFargateProfiles.go @@ -188,12 +188,13 @@ func NewListFargateProfilesPaginator(client ListFargateProfilesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFargateProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFargateProfiles page. @@ -220,7 +221,10 @@ func (p *ListFargateProfilesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_ListIdentityProviderConfigs.go b/service/eks/api_op_ListIdentityProviderConfigs.go index 7efb3de5c2c..037e10fcb23 100644 --- a/service/eks/api_op_ListIdentityProviderConfigs.go +++ b/service/eks/api_op_ListIdentityProviderConfigs.go @@ -191,12 +191,13 @@ func NewListIdentityProviderConfigsPaginator(client ListIdentityProviderConfigsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIdentityProviderConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIdentityProviderConfigs page. @@ -223,7 +224,10 @@ func (p *ListIdentityProviderConfigsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_ListNodegroups.go b/service/eks/api_op_ListNodegroups.go index 1c4d42ce72b..7f9a56ba0ab 100644 --- a/service/eks/api_op_ListNodegroups.go +++ b/service/eks/api_op_ListNodegroups.go @@ -187,12 +187,13 @@ func NewListNodegroupsPaginator(client ListNodegroupsAPIClient, params *ListNode client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNodegroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNodegroups page. @@ -219,7 +220,10 @@ func (p *ListNodegroupsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/eks/api_op_ListUpdates.go b/service/eks/api_op_ListUpdates.go index ff368c393ca..84ea11b26ed 100644 --- a/service/eks/api_op_ListUpdates.go +++ b/service/eks/api_op_ListUpdates.go @@ -191,12 +191,13 @@ func NewListUpdatesPaginator(client ListUpdatesAPIClient, params *ListUpdatesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUpdatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUpdates page. @@ -223,7 +224,10 @@ func (p *ListUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeCacheClusters.go b/service/elasticache/api_op_DescribeCacheClusters.go index 5bda712ede6..058e80300a8 100644 --- a/service/elasticache/api_op_DescribeCacheClusters.go +++ b/service/elasticache/api_op_DescribeCacheClusters.go @@ -206,12 +206,13 @@ func NewDescribeCacheClustersPaginator(client DescribeCacheClustersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCacheClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCacheClusters page. @@ -238,7 +239,10 @@ func (p *DescribeCacheClustersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeCacheEngineVersions.go b/service/elasticache/api_op_DescribeCacheEngineVersions.go index 0902463b12f..dca040077fd 100644 --- a/service/elasticache/api_op_DescribeCacheEngineVersions.go +++ b/service/elasticache/api_op_DescribeCacheEngineVersions.go @@ -198,12 +198,13 @@ func NewDescribeCacheEngineVersionsPaginator(client DescribeCacheEngineVersionsA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCacheEngineVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCacheEngineVersions page. @@ -230,7 +231,10 @@ func (p *DescribeCacheEngineVersionsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeCacheParameterGroups.go b/service/elasticache/api_op_DescribeCacheParameterGroups.go index ffced6cde03..c82d5be9b46 100644 --- a/service/elasticache/api_op_DescribeCacheParameterGroups.go +++ b/service/elasticache/api_op_DescribeCacheParameterGroups.go @@ -179,12 +179,13 @@ func NewDescribeCacheParameterGroupsPaginator(client DescribeCacheParameterGroup client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCacheParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCacheParameterGroups page. @@ -211,7 +212,10 @@ func (p *DescribeCacheParameterGroupsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeCacheParameters.go b/service/elasticache/api_op_DescribeCacheParameters.go index 519d7314e57..7de7483a8c4 100644 --- a/service/elasticache/api_op_DescribeCacheParameters.go +++ b/service/elasticache/api_op_DescribeCacheParameters.go @@ -188,12 +188,13 @@ func NewDescribeCacheParametersPaginator(client DescribeCacheParametersAPIClient client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCacheParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCacheParameters page. @@ -220,7 +221,10 @@ func (p *DescribeCacheParametersPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeCacheSecurityGroups.go b/service/elasticache/api_op_DescribeCacheSecurityGroups.go index 59ec78c6068..bd87cb3c194 100644 --- a/service/elasticache/api_op_DescribeCacheSecurityGroups.go +++ b/service/elasticache/api_op_DescribeCacheSecurityGroups.go @@ -180,12 +180,13 @@ func NewDescribeCacheSecurityGroupsPaginator(client DescribeCacheSecurityGroupsA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCacheSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCacheSecurityGroups page. @@ -212,7 +213,10 @@ func (p *DescribeCacheSecurityGroupsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeCacheSubnetGroups.go b/service/elasticache/api_op_DescribeCacheSubnetGroups.go index f4f14cd9675..4fa5d4b9677 100644 --- a/service/elasticache/api_op_DescribeCacheSubnetGroups.go +++ b/service/elasticache/api_op_DescribeCacheSubnetGroups.go @@ -180,12 +180,13 @@ func NewDescribeCacheSubnetGroupsPaginator(client DescribeCacheSubnetGroupsAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCacheSubnetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCacheSubnetGroups page. @@ -212,7 +213,10 @@ func (p *DescribeCacheSubnetGroupsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeEngineDefaultParameters.go b/service/elasticache/api_op_DescribeEngineDefaultParameters.go index b32649f78fe..75e464eafa1 100644 --- a/service/elasticache/api_op_DescribeEngineDefaultParameters.go +++ b/service/elasticache/api_op_DescribeEngineDefaultParameters.go @@ -181,12 +181,13 @@ func NewDescribeEngineDefaultParametersPaginator(client DescribeEngineDefaultPar client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEngineDefaultParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEngineDefaultParameters page. @@ -216,7 +217,10 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, p.nextToken = result.EngineDefaults.Marker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeEvents.go b/service/elasticache/api_op_DescribeEvents.go index f4d96031a61..4aa4d1c7e68 100644 --- a/service/elasticache/api_op_DescribeEvents.go +++ b/service/elasticache/api_op_DescribeEvents.go @@ -196,12 +196,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -228,7 +229,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeGlobalReplicationGroups.go b/service/elasticache/api_op_DescribeGlobalReplicationGroups.go index dda72da4dad..fe196455c3c 100644 --- a/service/elasticache/api_op_DescribeGlobalReplicationGroups.go +++ b/service/elasticache/api_op_DescribeGlobalReplicationGroups.go @@ -180,12 +180,13 @@ func NewDescribeGlobalReplicationGroupsPaginator(client DescribeGlobalReplicatio client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGlobalReplicationGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGlobalReplicationGroups page. @@ -212,7 +213,10 @@ func (p *DescribeGlobalReplicationGroupsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeReplicationGroups.go b/service/elasticache/api_op_DescribeReplicationGroups.go index 79ab71d0d17..a733be48363 100644 --- a/service/elasticache/api_op_DescribeReplicationGroups.go +++ b/service/elasticache/api_op_DescribeReplicationGroups.go @@ -186,12 +186,13 @@ func NewDescribeReplicationGroupsPaginator(client DescribeReplicationGroupsAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationGroups page. @@ -218,7 +219,10 @@ func (p *DescribeReplicationGroupsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeReservedCacheNodes.go b/service/elasticache/api_op_DescribeReservedCacheNodes.go index 7917713339d..d91ae077c8d 100644 --- a/service/elasticache/api_op_DescribeReservedCacheNodes.go +++ b/service/elasticache/api_op_DescribeReservedCacheNodes.go @@ -276,12 +276,13 @@ func NewDescribeReservedCacheNodesPaginator(client DescribeReservedCacheNodesAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedCacheNodesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedCacheNodes page. @@ -308,7 +309,10 @@ func (p *DescribeReservedCacheNodesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go b/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go index 3c95f14cbd7..958dbe0d442 100644 --- a/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go +++ b/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go @@ -272,12 +272,13 @@ func NewDescribeReservedCacheNodesOfferingsPaginator(client DescribeReservedCach client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedCacheNodesOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedCacheNodesOfferings page. @@ -304,7 +305,10 @@ func (p *DescribeReservedCacheNodesOfferingsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeServiceUpdates.go b/service/elasticache/api_op_DescribeServiceUpdates.go index ce64cff6129..bdbe6a48688 100644 --- a/service/elasticache/api_op_DescribeServiceUpdates.go +++ b/service/elasticache/api_op_DescribeServiceUpdates.go @@ -173,12 +173,13 @@ func NewDescribeServiceUpdatesPaginator(client DescribeServiceUpdatesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeServiceUpdatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeServiceUpdates page. @@ -205,7 +206,10 @@ func (p *DescribeServiceUpdatesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeSnapshots.go b/service/elasticache/api_op_DescribeSnapshots.go index 014f646ac73..10d2275271f 100644 --- a/service/elasticache/api_op_DescribeSnapshots.go +++ b/service/elasticache/api_op_DescribeSnapshots.go @@ -200,12 +200,13 @@ func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSnapshots page. @@ -232,7 +233,10 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeUpdateActions.go b/service/elasticache/api_op_DescribeUpdateActions.go index fcf4bc7017e..0e0ba8b3e01 100644 --- a/service/elasticache/api_op_DescribeUpdateActions.go +++ b/service/elasticache/api_op_DescribeUpdateActions.go @@ -192,12 +192,13 @@ func NewDescribeUpdateActionsPaginator(client DescribeUpdateActionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeUpdateActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeUpdateActions page. @@ -224,7 +225,10 @@ func (p *DescribeUpdateActionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeUserGroups.go b/service/elasticache/api_op_DescribeUserGroups.go index 3d84cc29ddd..a706254d0d2 100644 --- a/service/elasticache/api_op_DescribeUserGroups.go +++ b/service/elasticache/api_op_DescribeUserGroups.go @@ -174,12 +174,13 @@ func NewDescribeUserGroupsPaginator(client DescribeUserGroupsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeUserGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeUserGroups page. @@ -206,7 +207,10 @@ func (p *DescribeUserGroupsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticache/api_op_DescribeUsers.go b/service/elasticache/api_op_DescribeUsers.go index 7f7313ec29d..f6b2f3e5a2b 100644 --- a/service/elasticache/api_op_DescribeUsers.go +++ b/service/elasticache/api_op_DescribeUsers.go @@ -181,12 +181,13 @@ func NewDescribeUsersPaginator(client DescribeUsersAPIClient, params *DescribeUs client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeUsers page. @@ -213,7 +214,10 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go b/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go index 5e681f576e8..14e0526a242 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go @@ -172,12 +172,13 @@ func NewDescribeEnvironmentManagedActionHistoryPaginator(client DescribeEnvironm client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEnvironmentManagedActionHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEnvironmentManagedActionHistory page. @@ -204,7 +205,10 @@ func (p *DescribeEnvironmentManagedActionHistoryPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticbeanstalk/api_op_DescribeEvents.go b/service/elasticbeanstalk/api_op_DescribeEvents.go index cd6211430ac..8d4aad28609 100644 --- a/service/elasticbeanstalk/api_op_DescribeEvents.go +++ b/service/elasticbeanstalk/api_op_DescribeEvents.go @@ -208,12 +208,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -240,7 +241,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticbeanstalk/api_op_ListPlatformBranches.go b/service/elasticbeanstalk/api_op_ListPlatformBranches.go index 48883544317..c12d15bc58a 100644 --- a/service/elasticbeanstalk/api_op_ListPlatformBranches.go +++ b/service/elasticbeanstalk/api_op_ListPlatformBranches.go @@ -204,12 +204,13 @@ func NewListPlatformBranchesPaginator(client ListPlatformBranchesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlatformBranchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlatformBranches page. @@ -236,7 +237,10 @@ func (p *ListPlatformBranchesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticbeanstalk/api_op_ListPlatformVersions.go b/service/elasticbeanstalk/api_op_ListPlatformVersions.go index e7b637787ff..ac72c9609dd 100644 --- a/service/elasticbeanstalk/api_op_ListPlatformVersions.go +++ b/service/elasticbeanstalk/api_op_ListPlatformVersions.go @@ -174,12 +174,13 @@ func NewListPlatformVersionsPaginator(client ListPlatformVersionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlatformVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlatformVersions page. @@ -206,7 +207,10 @@ func (p *ListPlatformVersionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticinference/api_op_DescribeAccelerators.go b/service/elasticinference/api_op_DescribeAccelerators.go index fe5edd09887..bcee2c2a007 100644 --- a/service/elasticinference/api_op_DescribeAccelerators.go +++ b/service/elasticinference/api_op_DescribeAccelerators.go @@ -180,12 +180,13 @@ func NewDescribeAcceleratorsPaginator(client DescribeAcceleratorsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAcceleratorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAccelerators page. @@ -208,7 +209,10 @@ func (p *DescribeAcceleratorsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go b/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go index f520f4f579b..9d1ebed3175 100644 --- a/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go +++ b/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go @@ -164,12 +164,13 @@ func NewDescribeLoadBalancersPaginator(client DescribeLoadBalancersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLoadBalancersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLoadBalancers page. @@ -190,7 +191,10 @@ func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticloadbalancingv2/api_op_DescribeListeners.go b/service/elasticloadbalancingv2/api_op_DescribeListeners.go index 0e85339612d..e65dff37e30 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeListeners.go +++ b/service/elasticloadbalancingv2/api_op_DescribeListeners.go @@ -164,12 +164,13 @@ func NewDescribeListenersPaginator(client DescribeListenersAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeListenersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeListeners page. @@ -190,7 +191,10 @@ func (p *DescribeListenersPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go index 8b4e28dae1b..a31ce49b424 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go +++ b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go @@ -170,12 +170,13 @@ func NewDescribeLoadBalancersPaginator(client DescribeLoadBalancersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeLoadBalancersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeLoadBalancers page. @@ -196,7 +197,10 @@ func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go b/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go index da31f517657..ddc87329b30 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go @@ -169,12 +169,13 @@ func NewDescribeTargetGroupsPaginator(client DescribeTargetGroupsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTargetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTargetGroups page. @@ -195,7 +196,10 @@ func (p *DescribeTargetGroupsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go b/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go index 1c6526a6f75..73db450a529 100644 --- a/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go +++ b/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go @@ -181,12 +181,13 @@ func NewDescribeDomainAutoTunesPaginator(client DescribeDomainAutoTunesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDomainAutoTunesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDomainAutoTunes page. @@ -209,7 +210,10 @@ func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go b/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go index b9da7fe9a9a..ff79406486e 100644 --- a/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go +++ b/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go @@ -189,12 +189,13 @@ func NewDescribeInboundCrossClusterSearchConnectionsPaginator(client DescribeInb client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInboundCrossClusterSearchConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInboundCrossClusterSearchConnections page. @@ -217,7 +218,10 @@ func (p *DescribeInboundCrossClusterSearchConnectionsPaginator) NextPage(ctx con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go b/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go index 21a62111f58..22fc5003818 100644 --- a/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go +++ b/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go @@ -189,12 +189,13 @@ func NewDescribeOutboundCrossClusterSearchConnectionsPaginator(client DescribeOu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOutboundCrossClusterSearchConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOutboundCrossClusterSearchConnections page. @@ -217,7 +218,10 @@ func (p *DescribeOutboundCrossClusterSearchConnectionsPaginator) NextPage(ctx co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_DescribePackages.go b/service/elasticsearchservice/api_op_DescribePackages.go index 84422e014b8..07743a3e89d 100644 --- a/service/elasticsearchservice/api_op_DescribePackages.go +++ b/service/elasticsearchservice/api_op_DescribePackages.go @@ -165,12 +165,13 @@ func NewDescribePackagesPaginator(client DescribePackagesAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePackages page. @@ -193,7 +194,10 @@ func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go index ba3835e68ef..e8b59c25ac5 100644 --- a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go +++ b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go @@ -172,12 +172,13 @@ func NewDescribeReservedElasticsearchInstanceOfferingsPaginator(client DescribeR client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedElasticsearchInstanceOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedElasticsearchInstanceOfferings page. @@ -200,7 +201,10 @@ func (p *DescribeReservedElasticsearchInstanceOfferingsPaginator) NextPage(ctx c prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go index b12d70482c7..430d014ecac 100644 --- a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go +++ b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go @@ -172,12 +172,13 @@ func NewDescribeReservedElasticsearchInstancesPaginator(client DescribeReservedE client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedElasticsearchInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedElasticsearchInstances page. @@ -200,7 +201,10 @@ func (p *DescribeReservedElasticsearchInstancesPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_GetPackageVersionHistory.go b/service/elasticsearchservice/api_op_GetPackageVersionHistory.go index 90027cf6044..e94375f8af3 100644 --- a/service/elasticsearchservice/api_op_GetPackageVersionHistory.go +++ b/service/elasticsearchservice/api_op_GetPackageVersionHistory.go @@ -174,12 +174,13 @@ func NewGetPackageVersionHistoryPaginator(client GetPackageVersionHistoryAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetPackageVersionHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetPackageVersionHistory page. @@ -202,7 +203,10 @@ func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_GetUpgradeHistory.go b/service/elasticsearchservice/api_op_GetUpgradeHistory.go index 63fe9c0f540..555a4dd200b 100644 --- a/service/elasticsearchservice/api_op_GetUpgradeHistory.go +++ b/service/elasticsearchservice/api_op_GetUpgradeHistory.go @@ -179,12 +179,13 @@ func NewGetUpgradeHistoryPaginator(client GetUpgradeHistoryAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUpgradeHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUpgradeHistory page. @@ -207,7 +208,10 @@ func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_ListDomainsForPackage.go b/service/elasticsearchservice/api_op_ListDomainsForPackage.go index ba70bcb2722..5c668eddf68 100644 --- a/service/elasticsearchservice/api_op_ListDomainsForPackage.go +++ b/service/elasticsearchservice/api_op_ListDomainsForPackage.go @@ -171,12 +171,13 @@ func NewListDomainsForPackagePaginator(client ListDomainsForPackageAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsForPackagePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomainsForPackage page. @@ -199,7 +200,10 @@ func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go b/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go index 0d940e4b191..ea81ce71bec 100644 --- a/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go +++ b/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go @@ -187,12 +187,13 @@ func NewListElasticsearchInstanceTypesPaginator(client ListElasticsearchInstance client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListElasticsearchInstanceTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListElasticsearchInstanceTypes page. @@ -215,7 +216,10 @@ func (p *ListElasticsearchInstanceTypesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_ListElasticsearchVersions.go b/service/elasticsearchservice/api_op_ListElasticsearchVersions.go index b53feadfe22..1a218784aa3 100644 --- a/service/elasticsearchservice/api_op_ListElasticsearchVersions.go +++ b/service/elasticsearchservice/api_op_ListElasticsearchVersions.go @@ -174,12 +174,13 @@ func NewListElasticsearchVersionsPaginator(client ListElasticsearchVersionsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListElasticsearchVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListElasticsearchVersions page. @@ -202,7 +203,10 @@ func (p *ListElasticsearchVersionsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elasticsearchservice/api_op_ListPackagesForDomain.go b/service/elasticsearchservice/api_op_ListPackagesForDomain.go index f0049bf0098..fb5e2244eaa 100644 --- a/service/elasticsearchservice/api_op_ListPackagesForDomain.go +++ b/service/elasticsearchservice/api_op_ListPackagesForDomain.go @@ -173,12 +173,13 @@ func NewListPackagesForDomainPaginator(client ListPackagesForDomainAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagesForDomainPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackagesForDomain page. @@ -201,7 +202,10 @@ func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elastictranscoder/api_op_ListJobsByPipeline.go b/service/elastictranscoder/api_op_ListJobsByPipeline.go index 6dfc44bc95a..923356bbb5c 100644 --- a/service/elastictranscoder/api_op_ListJobsByPipeline.go +++ b/service/elastictranscoder/api_op_ListJobsByPipeline.go @@ -172,12 +172,13 @@ func NewListJobsByPipelinePaginator(client ListJobsByPipelineAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsByPipelinePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobsByPipeline page. @@ -198,7 +199,10 @@ func (p *ListJobsByPipelinePaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elastictranscoder/api_op_ListJobsByStatus.go b/service/elastictranscoder/api_op_ListJobsByStatus.go index ded2a73bb12..2a04c01fc44 100644 --- a/service/elastictranscoder/api_op_ListJobsByStatus.go +++ b/service/elastictranscoder/api_op_ListJobsByStatus.go @@ -172,12 +172,13 @@ func NewListJobsByStatusPaginator(client ListJobsByStatusAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsByStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobsByStatus page. @@ -198,7 +199,10 @@ func (p *ListJobsByStatusPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elastictranscoder/api_op_ListPipelines.go b/service/elastictranscoder/api_op_ListPipelines.go index 7cfc355a818..86a05c8d747 100644 --- a/service/elastictranscoder/api_op_ListPipelines.go +++ b/service/elastictranscoder/api_op_ListPipelines.go @@ -161,12 +161,13 @@ func NewListPipelinesPaginator(client ListPipelinesAPIClient, params *ListPipeli client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelines page. @@ -187,7 +188,10 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/elastictranscoder/api_op_ListPresets.go b/service/elastictranscoder/api_op_ListPresets.go index edeb473c81d..328c00d91ab 100644 --- a/service/elastictranscoder/api_op_ListPresets.go +++ b/service/elastictranscoder/api_op_ListPresets.go @@ -161,12 +161,13 @@ func NewListPresetsPaginator(client ListPresetsAPIClient, params *ListPresetsInp client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPresetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPresets page. @@ -187,7 +188,10 @@ func (p *ListPresetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListBootstrapActions.go b/service/emr/api_op_ListBootstrapActions.go index bb75c498bfe..bbce2700aaa 100644 --- a/service/emr/api_op_ListBootstrapActions.go +++ b/service/emr/api_op_ListBootstrapActions.go @@ -162,12 +162,13 @@ func NewListBootstrapActionsPaginator(client ListBootstrapActionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBootstrapActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBootstrapActions page. @@ -188,7 +189,10 @@ func (p *ListBootstrapActionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListClusters.go b/service/emr/api_op_ListClusters.go index 0c197ab5273..d32612fda93 100644 --- a/service/emr/api_op_ListClusters.go +++ b/service/emr/api_op_ListClusters.go @@ -171,12 +171,13 @@ func NewListClustersPaginator(client ListClustersAPIClient, params *ListClusters client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClusters page. @@ -197,7 +198,10 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListInstanceFleets.go b/service/emr/api_op_ListInstanceFleets.go index 396c761fcf6..f20cadf08ac 100644 --- a/service/emr/api_op_ListInstanceFleets.go +++ b/service/emr/api_op_ListInstanceFleets.go @@ -162,12 +162,13 @@ func NewListInstanceFleetsPaginator(client ListInstanceFleetsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceFleets page. @@ -188,7 +189,10 @@ func (p *ListInstanceFleetsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListInstanceGroups.go b/service/emr/api_op_ListInstanceGroups.go index 6dcdc9d9997..9bad8ee8c72 100644 --- a/service/emr/api_op_ListInstanceGroups.go +++ b/service/emr/api_op_ListInstanceGroups.go @@ -162,12 +162,13 @@ func NewListInstanceGroupsPaginator(client ListInstanceGroupsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceGroups page. @@ -188,7 +189,10 @@ func (p *ListInstanceGroupsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListInstances.go b/service/emr/api_op_ListInstances.go index cecadd449e6..1d67513cb2e 100644 --- a/service/emr/api_op_ListInstances.go +++ b/service/emr/api_op_ListInstances.go @@ -179,12 +179,13 @@ func NewListInstancesPaginator(client ListInstancesAPIClient, params *ListInstan client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstances page. @@ -205,7 +206,10 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListNotebookExecutions.go b/service/emr/api_op_ListNotebookExecutions.go index 5f6ad5e2d28..34388d4bff3 100644 --- a/service/emr/api_op_ListNotebookExecutions.go +++ b/service/emr/api_op_ListNotebookExecutions.go @@ -203,12 +203,13 @@ func NewListNotebookExecutionsPaginator(client ListNotebookExecutionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotebookExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotebookExecutions page. @@ -229,7 +230,10 @@ func (p *ListNotebookExecutionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListReleaseLabels.go b/service/emr/api_op_ListReleaseLabels.go index 2919fa0acee..cdcbd3f2589 100644 --- a/service/emr/api_op_ListReleaseLabels.go +++ b/service/emr/api_op_ListReleaseLabels.go @@ -173,12 +173,13 @@ func NewListReleaseLabelsPaginator(client ListReleaseLabelsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReleaseLabelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReleaseLabels page. @@ -205,7 +206,10 @@ func (p *ListReleaseLabelsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListSecurityConfigurations.go b/service/emr/api_op_ListSecurityConfigurations.go index 7c78871fd3b..4b359bec8b0 100644 --- a/service/emr/api_op_ListSecurityConfigurations.go +++ b/service/emr/api_op_ListSecurityConfigurations.go @@ -159,12 +159,13 @@ func NewListSecurityConfigurationsPaginator(client ListSecurityConfigurationsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityConfigurations page. @@ -185,7 +186,10 @@ func (p *ListSecurityConfigurationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListSteps.go b/service/emr/api_op_ListSteps.go index c87a8377a2b..e3bbcb9c31e 100644 --- a/service/emr/api_op_ListSteps.go +++ b/service/emr/api_op_ListSteps.go @@ -179,12 +179,13 @@ func NewListStepsPaginator(client ListStepsAPIClient, params *ListStepsInput, op client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStepsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSteps page. @@ -205,7 +206,10 @@ func (p *ListStepsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListStudioSessionMappings.go b/service/emr/api_op_ListStudioSessionMappings.go index 2b95a235c3a..02088a229ee 100644 --- a/service/emr/api_op_ListStudioSessionMappings.go +++ b/service/emr/api_op_ListStudioSessionMappings.go @@ -164,12 +164,13 @@ func NewListStudioSessionMappingsPaginator(client ListStudioSessionMappingsAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStudioSessionMappingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStudioSessionMappings page. @@ -190,7 +191,10 @@ func (p *ListStudioSessionMappingsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emr/api_op_ListStudios.go b/service/emr/api_op_ListStudios.go index 881fa60512c..7d596c78578 100644 --- a/service/emr/api_op_ListStudios.go +++ b/service/emr/api_op_ListStudios.go @@ -152,12 +152,13 @@ func NewListStudiosPaginator(client ListStudiosAPIClient, params *ListStudiosInp client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStudiosPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStudios page. @@ -178,7 +179,10 @@ func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emrcontainers/api_op_ListJobRuns.go b/service/emrcontainers/api_op_ListJobRuns.go index 8ab673336a8..4f56df021ca 100644 --- a/service/emrcontainers/api_op_ListJobRuns.go +++ b/service/emrcontainers/api_op_ListJobRuns.go @@ -182,12 +182,13 @@ func NewListJobRunsPaginator(client ListJobRunsAPIClient, params *ListJobRunsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobRuns page. @@ -214,7 +215,10 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emrcontainers/api_op_ListManagedEndpoints.go b/service/emrcontainers/api_op_ListManagedEndpoints.go index 8cf8301bb4b..beb83f5dec6 100644 --- a/service/emrcontainers/api_op_ListManagedEndpoints.go +++ b/service/emrcontainers/api_op_ListManagedEndpoints.go @@ -184,12 +184,13 @@ func NewListManagedEndpointsPaginator(client ListManagedEndpointsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListManagedEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListManagedEndpoints page. @@ -216,7 +217,10 @@ func (p *ListManagedEndpointsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/emrcontainers/api_op_ListVirtualClusters.go b/service/emrcontainers/api_op_ListVirtualClusters.go index 94402d0db78..4fe270de676 100644 --- a/service/emrcontainers/api_op_ListVirtualClusters.go +++ b/service/emrcontainers/api_op_ListVirtualClusters.go @@ -183,12 +183,13 @@ func NewListVirtualClustersPaginator(client ListVirtualClustersAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualClusters page. @@ -215,7 +216,10 @@ func (p *ListVirtualClustersPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/evidently/api_op_ListExperiments.go b/service/evidently/api_op_ListExperiments.go index 89e501cbe1e..dda3a0a8bd9 100644 --- a/service/evidently/api_op_ListExperiments.go +++ b/service/evidently/api_op_ListExperiments.go @@ -172,12 +172,13 @@ func NewListExperimentsPaginator(client ListExperimentsAPIClient, params *ListEx client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperimentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperiments page. @@ -204,7 +205,10 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/evidently/api_op_ListFeatures.go b/service/evidently/api_op_ListFeatures.go index aaf32fb7e94..cbe05500896 100644 --- a/service/evidently/api_op_ListFeatures.go +++ b/service/evidently/api_op_ListFeatures.go @@ -170,12 +170,13 @@ func NewListFeaturesPaginator(client ListFeaturesAPIClient, params *ListFeatures client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFeaturesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFeatures page. @@ -202,7 +203,10 @@ func (p *ListFeaturesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/evidently/api_op_ListLaunches.go b/service/evidently/api_op_ListLaunches.go index d1649edd449..d68e00c3a4a 100644 --- a/service/evidently/api_op_ListLaunches.go +++ b/service/evidently/api_op_ListLaunches.go @@ -170,12 +170,13 @@ func NewListLaunchesPaginator(client ListLaunchesAPIClient, params *ListLaunches client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLaunchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLaunches page. @@ -202,7 +203,10 @@ func (p *ListLaunchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/evidently/api_op_ListProjects.go b/service/evidently/api_op_ListProjects.go index 0ba000b89ce..0a6fec8d3f9 100644 --- a/service/evidently/api_op_ListProjects.go +++ b/service/evidently/api_op_ListProjects.go @@ -163,12 +163,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -195,7 +196,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/finspacedata/api_op_ListChangesets.go b/service/finspacedata/api_op_ListChangesets.go index 125f961639b..96d6bb20f33 100644 --- a/service/finspacedata/api_op_ListChangesets.go +++ b/service/finspacedata/api_op_ListChangesets.go @@ -174,12 +174,13 @@ func NewListChangesetsPaginator(client ListChangesetsAPIClient, params *ListChan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChangesetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChangesets page. @@ -202,7 +203,10 @@ func (p *ListChangesetsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/finspacedata/api_op_ListDataViews.go b/service/finspacedata/api_op_ListDataViews.go index e5d93b89889..b2200116216 100644 --- a/service/finspacedata/api_op_ListDataViews.go +++ b/service/finspacedata/api_op_ListDataViews.go @@ -171,12 +171,13 @@ func NewListDataViewsPaginator(client ListDataViewsAPIClient, params *ListDataVi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataViewsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataViews page. @@ -199,7 +200,10 @@ func (p *ListDataViewsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/finspacedata/api_op_ListDatasets.go b/service/finspacedata/api_op_ListDatasets.go index a6d37cdcd63..b15b5156d8e 100644 --- a/service/finspacedata/api_op_ListDatasets.go +++ b/service/finspacedata/api_op_ListDatasets.go @@ -164,12 +164,13 @@ func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasets page. @@ -192,7 +193,10 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fis/api_op_ListActions.go b/service/fis/api_op_ListActions.go index 6707c2e8e40..8c872a3edce 100644 --- a/service/fis/api_op_ListActions.go +++ b/service/fis/api_op_ListActions.go @@ -162,12 +162,13 @@ func NewListActionsPaginator(client ListActionsAPIClient, params *ListActionsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActions page. @@ -190,7 +191,10 @@ func (p *ListActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fis/api_op_ListExperimentTemplates.go b/service/fis/api_op_ListExperimentTemplates.go index 164426fa5fd..ab828bf5b85 100644 --- a/service/fis/api_op_ListExperimentTemplates.go +++ b/service/fis/api_op_ListExperimentTemplates.go @@ -165,12 +165,13 @@ func NewListExperimentTemplatesPaginator(client ListExperimentTemplatesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperimentTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperimentTemplates page. @@ -193,7 +194,10 @@ func (p *ListExperimentTemplatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fis/api_op_ListExperiments.go b/service/fis/api_op_ListExperiments.go index ddb3563a51f..29230f9409b 100644 --- a/service/fis/api_op_ListExperiments.go +++ b/service/fis/api_op_ListExperiments.go @@ -163,12 +163,13 @@ func NewListExperimentsPaginator(client ListExperimentsAPIClient, params *ListEx client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperimentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperiments page. @@ -191,7 +192,10 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fms/api_op_ListAppsLists.go b/service/fms/api_op_ListAppsLists.go index fb1d66d215b..0ebd5bf2cbc 100644 --- a/service/fms/api_op_ListAppsLists.go +++ b/service/fms/api_op_ListAppsLists.go @@ -182,12 +182,13 @@ func NewListAppsListsPaginator(client ListAppsListsAPIClient, params *ListAppsLi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppsListsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppsLists page. @@ -214,7 +215,10 @@ func (p *ListAppsListsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fms/api_op_ListComplianceStatus.go b/service/fms/api_op_ListComplianceStatus.go index 0c831f28066..bd9a43c6370 100644 --- a/service/fms/api_op_ListComplianceStatus.go +++ b/service/fms/api_op_ListComplianceStatus.go @@ -188,12 +188,13 @@ func NewListComplianceStatusPaginator(client ListComplianceStatusAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComplianceStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComplianceStatus page. @@ -220,7 +221,10 @@ func (p *ListComplianceStatusPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fms/api_op_ListMemberAccounts.go b/service/fms/api_op_ListMemberAccounts.go index 759ff2bc4f1..dc5301fc5d7 100644 --- a/service/fms/api_op_ListMemberAccounts.go +++ b/service/fms/api_op_ListMemberAccounts.go @@ -176,12 +176,13 @@ func NewListMemberAccountsPaginator(client ListMemberAccountsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMemberAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMemberAccounts page. @@ -208,7 +209,10 @@ func (p *ListMemberAccountsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fms/api_op_ListPolicies.go b/service/fms/api_op_ListPolicies.go index 9942394ef10..285cd16a505 100644 --- a/service/fms/api_op_ListPolicies.go +++ b/service/fms/api_op_ListPolicies.go @@ -173,12 +173,13 @@ func NewListPoliciesPaginator(client ListPoliciesAPIClient, params *ListPolicies client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicies page. @@ -205,7 +206,10 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fms/api_op_ListProtocolsLists.go b/service/fms/api_op_ListProtocolsLists.go index 3f8cbcc0197..26f74ce99cb 100644 --- a/service/fms/api_op_ListProtocolsLists.go +++ b/service/fms/api_op_ListProtocolsLists.go @@ -184,12 +184,13 @@ func NewListProtocolsListsPaginator(client ListProtocolsListsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProtocolsListsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProtocolsLists page. @@ -216,7 +217,10 @@ func (p *ListProtocolsListsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListDatasetGroups.go b/service/forecast/api_op_ListDatasetGroups.go index be8cdc2d9fe..36995358749 100644 --- a/service/forecast/api_op_ListDatasetGroups.go +++ b/service/forecast/api_op_ListDatasetGroups.go @@ -167,12 +167,13 @@ func NewListDatasetGroupsPaginator(client ListDatasetGroupsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetGroups page. @@ -199,7 +200,10 @@ func (p *ListDatasetGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListDatasetImportJobs.go b/service/forecast/api_op_ListDatasetImportJobs.go index 5619988106c..d4d95d93f11 100644 --- a/service/forecast/api_op_ListDatasetImportJobs.go +++ b/service/forecast/api_op_ListDatasetImportJobs.go @@ -192,12 +192,13 @@ func NewListDatasetImportJobsPaginator(client ListDatasetImportJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetImportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetImportJobs page. @@ -224,7 +225,10 @@ func (p *ListDatasetImportJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListDatasets.go b/service/forecast/api_op_ListDatasets.go index 072a32c35aa..0b320f7c8c5 100644 --- a/service/forecast/api_op_ListDatasets.go +++ b/service/forecast/api_op_ListDatasets.go @@ -165,12 +165,13 @@ func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasets page. @@ -197,7 +198,10 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListForecastExportJobs.go b/service/forecast/api_op_ListForecastExportJobs.go index 17a0de343da..4f51ef41fca 100644 --- a/service/forecast/api_op_ListForecastExportJobs.go +++ b/service/forecast/api_op_ListForecastExportJobs.go @@ -193,12 +193,13 @@ func NewListForecastExportJobsPaginator(client ListForecastExportJobsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListForecastExportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListForecastExportJobs page. @@ -225,7 +226,10 @@ func (p *ListForecastExportJobsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListForecasts.go b/service/forecast/api_op_ListForecasts.go index fd260ffa294..caec3e599e3 100644 --- a/service/forecast/api_op_ListForecasts.go +++ b/service/forecast/api_op_ListForecasts.go @@ -190,12 +190,13 @@ func NewListForecastsPaginator(client ListForecastsAPIClient, params *ListForeca client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListForecastsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListForecasts page. @@ -222,7 +223,10 @@ func (p *ListForecastsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListPredictorBacktestExportJobs.go b/service/forecast/api_op_ListPredictorBacktestExportJobs.go index 4ad3d806bec..f266e6f97c7 100644 --- a/service/forecast/api_op_ListPredictorBacktestExportJobs.go +++ b/service/forecast/api_op_ListPredictorBacktestExportJobs.go @@ -191,12 +191,13 @@ func NewListPredictorBacktestExportJobsPaginator(client ListPredictorBacktestExp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPredictorBacktestExportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPredictorBacktestExportJobs page. @@ -223,7 +224,10 @@ func (p *ListPredictorBacktestExportJobsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/forecast/api_op_ListPredictors.go b/service/forecast/api_op_ListPredictors.go index 4b04134720e..d1dcc5e8cf7 100644 --- a/service/forecast/api_op_ListPredictors.go +++ b/service/forecast/api_op_ListPredictors.go @@ -191,12 +191,13 @@ func NewListPredictorsPaginator(client ListPredictorsAPIClient, params *ListPred client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPredictorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPredictors page. @@ -223,7 +224,10 @@ func (p *ListPredictorsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_DescribeModelVersions.go b/service/frauddetector/api_op_DescribeModelVersions.go index 58ecabe3540..34348a6395c 100644 --- a/service/frauddetector/api_op_DescribeModelVersions.go +++ b/service/frauddetector/api_op_DescribeModelVersions.go @@ -172,12 +172,13 @@ func NewDescribeModelVersionsPaginator(client DescribeModelVersionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeModelVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeModelVersions page. @@ -204,7 +205,10 @@ func (p *DescribeModelVersionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetBatchImportJobs.go b/service/frauddetector/api_op_GetBatchImportJobs.go index d3240328022..b23d2fe000c 100644 --- a/service/frauddetector/api_op_GetBatchImportJobs.go +++ b/service/frauddetector/api_op_GetBatchImportJobs.go @@ -169,12 +169,13 @@ func NewGetBatchImportJobsPaginator(client GetBatchImportJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBatchImportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBatchImportJobs page. @@ -201,7 +202,10 @@ func (p *GetBatchImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetBatchPredictionJobs.go b/service/frauddetector/api_op_GetBatchPredictionJobs.go index 3e80fa4f408..1dd08758185 100644 --- a/service/frauddetector/api_op_GetBatchPredictionJobs.go +++ b/service/frauddetector/api_op_GetBatchPredictionJobs.go @@ -169,12 +169,13 @@ func NewGetBatchPredictionJobsPaginator(client GetBatchPredictionJobsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBatchPredictionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBatchPredictionJobs page. @@ -201,7 +202,10 @@ func (p *GetBatchPredictionJobsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetDetectors.go b/service/frauddetector/api_op_GetDetectors.go index b16777c9ecf..c92965aee60 100644 --- a/service/frauddetector/api_op_GetDetectors.go +++ b/service/frauddetector/api_op_GetDetectors.go @@ -167,12 +167,13 @@ func NewGetDetectorsPaginator(client GetDetectorsAPIClient, params *GetDetectors client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDetectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDetectors page. @@ -199,7 +200,10 @@ func (p *GetDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetEntityTypes.go b/service/frauddetector/api_op_GetEntityTypes.go index e4c683d5d7e..c2cb79f4025 100644 --- a/service/frauddetector/api_op_GetEntityTypes.go +++ b/service/frauddetector/api_op_GetEntityTypes.go @@ -168,12 +168,13 @@ func NewGetEntityTypesPaginator(client GetEntityTypesAPIClient, params *GetEntit client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEntityTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEntityTypes page. @@ -200,7 +201,10 @@ func (p *GetEntityTypesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetEventTypes.go b/service/frauddetector/api_op_GetEventTypes.go index eebc00dc7be..2e78f5e9bb5 100644 --- a/service/frauddetector/api_op_GetEventTypes.go +++ b/service/frauddetector/api_op_GetEventTypes.go @@ -167,12 +167,13 @@ func NewGetEventTypesPaginator(client GetEventTypesAPIClient, params *GetEventTy client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEventTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEventTypes page. @@ -199,7 +200,10 @@ func (p *GetEventTypesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetExternalModels.go b/service/frauddetector/api_op_GetExternalModels.go index bd668cc4ac0..398eec2139a 100644 --- a/service/frauddetector/api_op_GetExternalModels.go +++ b/service/frauddetector/api_op_GetExternalModels.go @@ -168,12 +168,13 @@ func NewGetExternalModelsPaginator(client GetExternalModelsAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetExternalModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetExternalModels page. @@ -200,7 +201,10 @@ func (p *GetExternalModelsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetLabels.go b/service/frauddetector/api_op_GetLabels.go index 47c6e5bb991..8c505c01a45 100644 --- a/service/frauddetector/api_op_GetLabels.go +++ b/service/frauddetector/api_op_GetLabels.go @@ -167,12 +167,13 @@ func NewGetLabelsPaginator(client GetLabelsAPIClient, params *GetLabelsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetLabelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetLabels page. @@ -199,7 +200,10 @@ func (p *GetLabelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetModels.go b/service/frauddetector/api_op_GetModels.go index f2062c4a17b..601a7ffb872 100644 --- a/service/frauddetector/api_op_GetModels.go +++ b/service/frauddetector/api_op_GetModels.go @@ -173,12 +173,13 @@ func NewGetModelsPaginator(client GetModelsAPIClient, params *GetModelsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetModels page. @@ -205,7 +206,10 @@ func (p *GetModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetOutcomes.go b/service/frauddetector/api_op_GetOutcomes.go index ad15e777a11..86c49f00543 100644 --- a/service/frauddetector/api_op_GetOutcomes.go +++ b/service/frauddetector/api_op_GetOutcomes.go @@ -166,12 +166,13 @@ func NewGetOutcomesPaginator(client GetOutcomesAPIClient, params *GetOutcomesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetOutcomesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetOutcomes page. @@ -198,7 +199,10 @@ func (p *GetOutcomesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetRules.go b/service/frauddetector/api_op_GetRules.go index 946dc341522..0e84ba2c779 100644 --- a/service/frauddetector/api_op_GetRules.go +++ b/service/frauddetector/api_op_GetRules.go @@ -180,12 +180,13 @@ func NewGetRulesPaginator(client GetRulesAPIClient, params *GetRulesInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetRules page. @@ -212,7 +213,10 @@ func (p *GetRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_GetVariables.go b/service/frauddetector/api_op_GetVariables.go index 612a9eb2161..0057b35fc70 100644 --- a/service/frauddetector/api_op_GetVariables.go +++ b/service/frauddetector/api_op_GetVariables.go @@ -167,12 +167,13 @@ func NewGetVariablesPaginator(client GetVariablesAPIClient, params *GetVariables client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetVariablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetVariables page. @@ -199,7 +200,10 @@ func (p *GetVariablesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/frauddetector/api_op_ListTagsForResource.go b/service/frauddetector/api_op_ListTagsForResource.go index 1eaee6c8ada..c5c4a214c79 100644 --- a/service/frauddetector/api_op_ListTagsForResource.go +++ b/service/frauddetector/api_op_ListTagsForResource.go @@ -171,12 +171,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -203,7 +204,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeBackups.go b/service/fsx/api_op_DescribeBackups.go index ae8a06197f8..9bf2d15a832 100644 --- a/service/fsx/api_op_DescribeBackups.go +++ b/service/fsx/api_op_DescribeBackups.go @@ -200,12 +200,13 @@ func NewDescribeBackupsPaginator(client DescribeBackupsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBackupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBackups page. @@ -232,7 +233,10 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeDataRepositoryAssociations.go b/service/fsx/api_op_DescribeDataRepositoryAssociations.go index 726c05b0d9f..d2c4b7bdab3 100644 --- a/service/fsx/api_op_DescribeDataRepositoryAssociations.go +++ b/service/fsx/api_op_DescribeDataRepositoryAssociations.go @@ -191,12 +191,13 @@ func NewDescribeDataRepositoryAssociationsPaginator(client DescribeDataRepositor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDataRepositoryAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDataRepositoryAssociations page. @@ -223,7 +224,10 @@ func (p *DescribeDataRepositoryAssociationsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeDataRepositoryTasks.go b/service/fsx/api_op_DescribeDataRepositoryTasks.go index 3c68bade54f..2f079b019d9 100644 --- a/service/fsx/api_op_DescribeDataRepositoryTasks.go +++ b/service/fsx/api_op_DescribeDataRepositoryTasks.go @@ -187,12 +187,13 @@ func NewDescribeDataRepositoryTasksPaginator(client DescribeDataRepositoryTasksA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDataRepositoryTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDataRepositoryTasks page. @@ -219,7 +220,10 @@ func (p *DescribeDataRepositoryTasksPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeFileSystemAliases.go b/service/fsx/api_op_DescribeFileSystemAliases.go index bfcdc32a617..ebf116afed6 100644 --- a/service/fsx/api_op_DescribeFileSystemAliases.go +++ b/service/fsx/api_op_DescribeFileSystemAliases.go @@ -194,12 +194,13 @@ func NewDescribeFileSystemAliasesPaginator(client DescribeFileSystemAliasesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFileSystemAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFileSystemAliases page. @@ -226,7 +227,10 @@ func (p *DescribeFileSystemAliasesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeFileSystems.go b/service/fsx/api_op_DescribeFileSystems.go index 5580ebceb68..3af38e6877b 100644 --- a/service/fsx/api_op_DescribeFileSystems.go +++ b/service/fsx/api_op_DescribeFileSystems.go @@ -196,12 +196,13 @@ func NewDescribeFileSystemsPaginator(client DescribeFileSystemsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFileSystemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFileSystems page. @@ -228,7 +229,10 @@ func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeSnapshots.go b/service/fsx/api_op_DescribeSnapshots.go index 6385b52d42f..6d350b297d3 100644 --- a/service/fsx/api_op_DescribeSnapshots.go +++ b/service/fsx/api_op_DescribeSnapshots.go @@ -192,12 +192,13 @@ func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSnapshots page. @@ -224,7 +225,10 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeStorageVirtualMachines.go b/service/fsx/api_op_DescribeStorageVirtualMachines.go index c0b0b8c397e..6d84f476278 100644 --- a/service/fsx/api_op_DescribeStorageVirtualMachines.go +++ b/service/fsx/api_op_DescribeStorageVirtualMachines.go @@ -177,12 +177,13 @@ func NewDescribeStorageVirtualMachinesPaginator(client DescribeStorageVirtualMac client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStorageVirtualMachinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStorageVirtualMachines page. @@ -209,7 +210,10 @@ func (p *DescribeStorageVirtualMachinesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_DescribeVolumes.go b/service/fsx/api_op_DescribeVolumes.go index aa24c7232a8..f1d9888e450 100644 --- a/service/fsx/api_op_DescribeVolumes.go +++ b/service/fsx/api_op_DescribeVolumes.go @@ -173,12 +173,13 @@ func NewDescribeVolumesPaginator(client DescribeVolumesAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVolumesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVolumes page. @@ -205,7 +206,10 @@ func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/fsx/api_op_ListTagsForResource.go b/service/fsx/api_op_ListTagsForResource.go index 073dc857e18..ef262459bf9 100644 --- a/service/fsx/api_op_ListTagsForResource.go +++ b/service/fsx/api_op_ListTagsForResource.go @@ -197,12 +197,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -229,7 +230,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeFleetAttributes.go b/service/gamelift/api_op_DescribeFleetAttributes.go index b90ec868706..8dcb5ec1a4d 100644 --- a/service/gamelift/api_op_DescribeFleetAttributes.go +++ b/service/gamelift/api_op_DescribeFleetAttributes.go @@ -201,12 +201,13 @@ func NewDescribeFleetAttributesPaginator(client DescribeFleetAttributesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFleetAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFleetAttributes page. @@ -233,7 +234,10 @@ func (p *DescribeFleetAttributesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeFleetCapacity.go b/service/gamelift/api_op_DescribeFleetCapacity.go index a0e7a63fa01..6ab2b9e8263 100644 --- a/service/gamelift/api_op_DescribeFleetCapacity.go +++ b/service/gamelift/api_op_DescribeFleetCapacity.go @@ -208,12 +208,13 @@ func NewDescribeFleetCapacityPaginator(client DescribeFleetCapacityAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFleetCapacityPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFleetCapacity page. @@ -240,7 +241,10 @@ func (p *DescribeFleetCapacityPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeFleetEvents.go b/service/gamelift/api_op_DescribeFleetEvents.go index 452f2e69351..8efa3d67d83 100644 --- a/service/gamelift/api_op_DescribeFleetEvents.go +++ b/service/gamelift/api_op_DescribeFleetEvents.go @@ -203,12 +203,13 @@ func NewDescribeFleetEventsPaginator(client DescribeFleetEventsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFleetEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFleetEvents page. @@ -235,7 +236,10 @@ func (p *DescribeFleetEventsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeFleetLocationAttributes.go b/service/gamelift/api_op_DescribeFleetLocationAttributes.go index 3d4d666517b..25a564055d2 100644 --- a/service/gamelift/api_op_DescribeFleetLocationAttributes.go +++ b/service/gamelift/api_op_DescribeFleetLocationAttributes.go @@ -217,12 +217,13 @@ func NewDescribeFleetLocationAttributesPaginator(client DescribeFleetLocationAtt client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFleetLocationAttributesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFleetLocationAttributes page. @@ -249,7 +250,10 @@ func (p *DescribeFleetLocationAttributesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeFleetUtilization.go b/service/gamelift/api_op_DescribeFleetUtilization.go index 9fc7a45f524..89ccc5e0701 100644 --- a/service/gamelift/api_op_DescribeFleetUtilization.go +++ b/service/gamelift/api_op_DescribeFleetUtilization.go @@ -207,12 +207,13 @@ func NewDescribeFleetUtilizationPaginator(client DescribeFleetUtilizationAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFleetUtilizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFleetUtilization page. @@ -239,7 +240,10 @@ func (p *DescribeFleetUtilizationPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeGameServerInstances.go b/service/gamelift/api_op_DescribeGameServerInstances.go index ccf4aa15ea1..3288eee8ce6 100644 --- a/service/gamelift/api_op_DescribeGameServerInstances.go +++ b/service/gamelift/api_op_DescribeGameServerInstances.go @@ -202,12 +202,13 @@ func NewDescribeGameServerInstancesPaginator(client DescribeGameServerInstancesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGameServerInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGameServerInstances page. @@ -234,7 +235,10 @@ func (p *DescribeGameServerInstancesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeGameSessionDetails.go b/service/gamelift/api_op_DescribeGameSessionDetails.go index b85112e3ce3..402acc32c8c 100644 --- a/service/gamelift/api_op_DescribeGameSessionDetails.go +++ b/service/gamelift/api_op_DescribeGameSessionDetails.go @@ -221,12 +221,13 @@ func NewDescribeGameSessionDetailsPaginator(client DescribeGameSessionDetailsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGameSessionDetailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGameSessionDetails page. @@ -253,7 +254,10 @@ func (p *DescribeGameSessionDetailsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeGameSessionQueues.go b/service/gamelift/api_op_DescribeGameSessionQueues.go index e0b5a0cfaad..2c815af7ab3 100644 --- a/service/gamelift/api_op_DescribeGameSessionQueues.go +++ b/service/gamelift/api_op_DescribeGameSessionQueues.go @@ -182,12 +182,13 @@ func NewDescribeGameSessionQueuesPaginator(client DescribeGameSessionQueuesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGameSessionQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGameSessionQueues page. @@ -214,7 +215,10 @@ func (p *DescribeGameSessionQueuesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeGameSessions.go b/service/gamelift/api_op_DescribeGameSessions.go index 6376c0dff31..fb87e2afd79 100644 --- a/service/gamelift/api_op_DescribeGameSessions.go +++ b/service/gamelift/api_op_DescribeGameSessions.go @@ -219,12 +219,13 @@ func NewDescribeGameSessionsPaginator(client DescribeGameSessionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGameSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGameSessions page. @@ -251,7 +252,10 @@ func (p *DescribeGameSessionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeInstances.go b/service/gamelift/api_op_DescribeInstances.go index 09498b6db1e..7de81e255f9 100644 --- a/service/gamelift/api_op_DescribeInstances.go +++ b/service/gamelift/api_op_DescribeInstances.go @@ -208,12 +208,13 @@ func NewDescribeInstancesPaginator(client DescribeInstancesAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstances page. @@ -240,7 +241,10 @@ func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeMatchmakingConfigurations.go b/service/gamelift/api_op_DescribeMatchmakingConfigurations.go index ca07111e93c..934cffd4d1e 100644 --- a/service/gamelift/api_op_DescribeMatchmakingConfigurations.go +++ b/service/gamelift/api_op_DescribeMatchmakingConfigurations.go @@ -195,12 +195,13 @@ func NewDescribeMatchmakingConfigurationsPaginator(client DescribeMatchmakingCon client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMatchmakingConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMatchmakingConfigurations page. @@ -227,7 +228,10 @@ func (p *DescribeMatchmakingConfigurationsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeMatchmakingRuleSets.go b/service/gamelift/api_op_DescribeMatchmakingRuleSets.go index 2a93d4b2d2f..c43613049bd 100644 --- a/service/gamelift/api_op_DescribeMatchmakingRuleSets.go +++ b/service/gamelift/api_op_DescribeMatchmakingRuleSets.go @@ -192,12 +192,13 @@ func NewDescribeMatchmakingRuleSetsPaginator(client DescribeMatchmakingRuleSetsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMatchmakingRuleSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMatchmakingRuleSets page. @@ -224,7 +225,10 @@ func (p *DescribeMatchmakingRuleSetsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribePlayerSessions.go b/service/gamelift/api_op_DescribePlayerSessions.go index 265c25c737a..05d325db1a3 100644 --- a/service/gamelift/api_op_DescribePlayerSessions.go +++ b/service/gamelift/api_op_DescribePlayerSessions.go @@ -219,12 +219,13 @@ func NewDescribePlayerSessionsPaginator(client DescribePlayerSessionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePlayerSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePlayerSessions page. @@ -251,7 +252,10 @@ func (p *DescribePlayerSessionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_DescribeScalingPolicies.go b/service/gamelift/api_op_DescribeScalingPolicies.go index f94b317f11a..e66ec789346 100644 --- a/service/gamelift/api_op_DescribeScalingPolicies.go +++ b/service/gamelift/api_op_DescribeScalingPolicies.go @@ -218,12 +218,13 @@ func NewDescribeScalingPoliciesPaginator(client DescribeScalingPoliciesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScalingPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScalingPolicies page. @@ -250,7 +251,10 @@ func (p *DescribeScalingPoliciesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_ListAliases.go b/service/gamelift/api_op_ListAliases.go index de354c80ae7..c617719b7f9 100644 --- a/service/gamelift/api_op_ListAliases.go +++ b/service/gamelift/api_op_ListAliases.go @@ -189,12 +189,13 @@ func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAliases page. @@ -221,7 +222,10 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_ListBuilds.go b/service/gamelift/api_op_ListBuilds.go index 26d0f8d04c1..962acdfa43d 100644 --- a/service/gamelift/api_op_ListBuilds.go +++ b/service/gamelift/api_op_ListBuilds.go @@ -190,12 +190,13 @@ func NewListBuildsPaginator(client ListBuildsAPIClient, params *ListBuildsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuildsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuilds page. @@ -222,7 +223,10 @@ func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_ListFleets.go b/service/gamelift/api_op_ListFleets.go index ccccec75501..ebd5b39ff60 100644 --- a/service/gamelift/api_op_ListFleets.go +++ b/service/gamelift/api_op_ListFleets.go @@ -208,12 +208,13 @@ func NewListFleetsPaginator(client ListFleetsAPIClient, params *ListFleetsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFleets page. @@ -240,7 +241,10 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_ListGameServerGroups.go b/service/gamelift/api_op_ListGameServerGroups.go index 31e85f91803..43856ac1748 100644 --- a/service/gamelift/api_op_ListGameServerGroups.go +++ b/service/gamelift/api_op_ListGameServerGroups.go @@ -176,12 +176,13 @@ func NewListGameServerGroupsPaginator(client ListGameServerGroupsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGameServerGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGameServerGroups page. @@ -208,7 +209,10 @@ func (p *ListGameServerGroupsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_ListGameServers.go b/service/gamelift/api_op_ListGameServers.go index b6300f3dacc..5a8dfdac4d2 100644 --- a/service/gamelift/api_op_ListGameServers.go +++ b/service/gamelift/api_op_ListGameServers.go @@ -189,12 +189,13 @@ func NewListGameServersPaginator(client ListGameServersAPIClient, params *ListGa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGameServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGameServers page. @@ -221,7 +222,10 @@ func (p *ListGameServersPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_ListScripts.go b/service/gamelift/api_op_ListScripts.go index 3926d5f7197..0fecca20a17 100644 --- a/service/gamelift/api_op_ListScripts.go +++ b/service/gamelift/api_op_ListScripts.go @@ -170,12 +170,13 @@ func NewListScriptsPaginator(client ListScriptsAPIClient, params *ListScriptsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListScriptsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListScripts page. @@ -202,7 +203,10 @@ func (p *ListScriptsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/gamelift/api_op_SearchGameSessions.go b/service/gamelift/api_op_SearchGameSessions.go index ad887e81d1a..4e682c0e877 100644 --- a/service/gamelift/api_op_SearchGameSessions.go +++ b/service/gamelift/api_op_SearchGameSessions.go @@ -311,12 +311,13 @@ func NewSearchGameSessionsPaginator(client SearchGameSessionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchGameSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchGameSessions page. @@ -343,7 +344,10 @@ func (p *SearchGameSessionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glacier/api_op_ListJobs.go b/service/glacier/api_op_ListJobs.go index d9ad052ae96..a4683a8b866 100644 --- a/service/glacier/api_op_ListJobs.go +++ b/service/glacier/api_op_ListJobs.go @@ -232,12 +232,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -264,7 +265,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glacier/api_op_ListMultipartUploads.go b/service/glacier/api_op_ListMultipartUploads.go index 7ae3a81ca04..6aa34e969c3 100644 --- a/service/glacier/api_op_ListMultipartUploads.go +++ b/service/glacier/api_op_ListMultipartUploads.go @@ -224,12 +224,13 @@ func NewListMultipartUploadsPaginator(client ListMultipartUploadsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMultipartUploadsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMultipartUploads page. @@ -256,7 +257,10 @@ func (p *ListMultipartUploadsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glacier/api_op_ListParts.go b/service/glacier/api_op_ListParts.go index 8c11a1c3fc2..01f44c516ad 100644 --- a/service/glacier/api_op_ListParts.go +++ b/service/glacier/api_op_ListParts.go @@ -244,12 +244,13 @@ func NewListPartsPaginator(client ListPartsAPIClient, params *ListPartsInput, op client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPartsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListParts page. @@ -276,7 +277,10 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glacier/api_op_ListVaults.go b/service/glacier/api_op_ListVaults.go index 9fa0a330349..d4cf3a7ac24 100644 --- a/service/glacier/api_op_ListVaults.go +++ b/service/glacier/api_op_ListVaults.go @@ -210,12 +210,13 @@ func NewListVaultsPaginator(client ListVaultsAPIClient, params *ListVaultsInput, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVaultsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVaults page. @@ -242,7 +243,10 @@ func (p *ListVaultsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListAccelerators.go b/service/globalaccelerator/api_op_ListAccelerators.go index 42703773162..fcfe7566aec 100644 --- a/service/globalaccelerator/api_op_ListAccelerators.go +++ b/service/globalaccelerator/api_op_ListAccelerators.go @@ -164,12 +164,13 @@ func NewListAcceleratorsPaginator(client ListAcceleratorsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAcceleratorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccelerators page. @@ -196,7 +197,10 @@ func (p *ListAcceleratorsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListByoipCidrs.go b/service/globalaccelerator/api_op_ListByoipCidrs.go index 3be237f9e3d..4202897a757 100644 --- a/service/globalaccelerator/api_op_ListByoipCidrs.go +++ b/service/globalaccelerator/api_op_ListByoipCidrs.go @@ -164,12 +164,13 @@ func NewListByoipCidrsPaginator(client ListByoipCidrsAPIClient, params *ListByoi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListByoipCidrsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListByoipCidrs page. @@ -196,7 +197,10 @@ func (p *ListByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go b/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go index 7e87d1e9a15..02d6f861fac 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go @@ -167,12 +167,13 @@ func NewListCustomRoutingAcceleratorsPaginator(client ListCustomRoutingAccelerat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingAcceleratorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingAccelerators page. @@ -199,7 +200,10 @@ func (p *ListCustomRoutingAcceleratorsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go b/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go index 93b1bef1cd2..663bd79bf9a 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go @@ -177,12 +177,13 @@ func NewListCustomRoutingEndpointGroupsPaginator(client ListCustomRoutingEndpoin client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingEndpointGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingEndpointGroups page. @@ -209,7 +210,10 @@ func (p *ListCustomRoutingEndpointGroupsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListCustomRoutingListeners.go b/service/globalaccelerator/api_op_ListCustomRoutingListeners.go index 57525f62947..24ef635e6ef 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingListeners.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingListeners.go @@ -175,12 +175,13 @@ func NewListCustomRoutingListenersPaginator(client ListCustomRoutingListenersAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingListenersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingListeners page. @@ -207,7 +208,10 @@ func (p *ListCustomRoutingListenersPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go b/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go index 6df971dc6eb..6596bde0c58 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go @@ -192,12 +192,13 @@ func NewListCustomRoutingPortMappingsPaginator(client ListCustomRoutingPortMappi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingPortMappingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingPortMappings page. @@ -224,7 +225,10 @@ func (p *ListCustomRoutingPortMappingsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go b/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go index 7b3edd840f5..77579f72212 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go @@ -185,12 +185,13 @@ func NewListCustomRoutingPortMappingsByDestinationPaginator(client ListCustomRou client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomRoutingPortMappingsByDestinationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomRoutingPortMappingsByDestination page. @@ -217,7 +218,10 @@ func (p *ListCustomRoutingPortMappingsByDestinationPaginator) NextPage(ctx conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListEndpointGroups.go b/service/globalaccelerator/api_op_ListEndpointGroups.go index 9a806c07ec1..37a41793d0b 100644 --- a/service/globalaccelerator/api_op_ListEndpointGroups.go +++ b/service/globalaccelerator/api_op_ListEndpointGroups.go @@ -173,12 +173,13 @@ func NewListEndpointGroupsPaginator(client ListEndpointGroupsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEndpointGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEndpointGroups page. @@ -205,7 +206,10 @@ func (p *ListEndpointGroupsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/globalaccelerator/api_op_ListListeners.go b/service/globalaccelerator/api_op_ListListeners.go index 5dd4bf02bd8..508e94f18ed 100644 --- a/service/globalaccelerator/api_op_ListListeners.go +++ b/service/globalaccelerator/api_op_ListListeners.go @@ -172,12 +172,13 @@ func NewListListenersPaginator(client ListListenersAPIClient, params *ListListen client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListListenersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListListeners page. @@ -204,7 +205,10 @@ func (p *ListListenersPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetBlueprintRuns.go b/service/glue/api_op_GetBlueprintRuns.go index 33af292a5b7..c355844f15e 100644 --- a/service/glue/api_op_GetBlueprintRuns.go +++ b/service/glue/api_op_GetBlueprintRuns.go @@ -168,12 +168,13 @@ func NewGetBlueprintRunsPaginator(client GetBlueprintRunsAPIClient, params *GetB client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBlueprintRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBlueprintRuns page. @@ -200,7 +201,10 @@ func (p *GetBlueprintRunsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetClassifiers.go b/service/glue/api_op_GetClassifiers.go index 8077fc69f3c..e8064c05eed 100644 --- a/service/glue/api_op_GetClassifiers.go +++ b/service/glue/api_op_GetClassifiers.go @@ -160,12 +160,13 @@ func NewGetClassifiersPaginator(client GetClassifiersAPIClient, params *GetClass client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetClassifiersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetClassifiers page. @@ -192,7 +193,10 @@ func (p *GetClassifiersPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetConnections.go b/service/glue/api_op_GetConnections.go index ed40852a15f..97aed47aa74 100644 --- a/service/glue/api_op_GetConnections.go +++ b/service/glue/api_op_GetConnections.go @@ -175,12 +175,13 @@ func NewGetConnectionsPaginator(client GetConnectionsAPIClient, params *GetConne client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetConnections page. @@ -207,7 +208,10 @@ func (p *GetConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetCrawlerMetrics.go b/service/glue/api_op_GetCrawlerMetrics.go index 6ef8b3bb9f2..4d74e23b201 100644 --- a/service/glue/api_op_GetCrawlerMetrics.go +++ b/service/glue/api_op_GetCrawlerMetrics.go @@ -164,12 +164,13 @@ func NewGetCrawlerMetricsPaginator(client GetCrawlerMetricsAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCrawlerMetricsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCrawlerMetrics page. @@ -196,7 +197,10 @@ func (p *GetCrawlerMetricsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetCrawlers.go b/service/glue/api_op_GetCrawlers.go index c57d4fe635a..a80b48852dd 100644 --- a/service/glue/api_op_GetCrawlers.go +++ b/service/glue/api_op_GetCrawlers.go @@ -160,12 +160,13 @@ func NewGetCrawlersPaginator(client GetCrawlersAPIClient, params *GetCrawlersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCrawlersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCrawlers page. @@ -192,7 +193,10 @@ func (p *GetCrawlersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetDatabases.go b/service/glue/api_op_GetDatabases.go index 6719dbfa64c..f5cbf52cbb0 100644 --- a/service/glue/api_op_GetDatabases.go +++ b/service/glue/api_op_GetDatabases.go @@ -177,12 +177,13 @@ func NewGetDatabasesPaginator(client GetDatabasesAPIClient, params *GetDatabases client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDatabasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDatabases page. @@ -209,7 +210,10 @@ func (p *GetDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetDevEndpoints.go b/service/glue/api_op_GetDevEndpoints.go index 1f5501c6f77..d1ca7e8b5ac 100644 --- a/service/glue/api_op_GetDevEndpoints.go +++ b/service/glue/api_op_GetDevEndpoints.go @@ -163,12 +163,13 @@ func NewGetDevEndpointsPaginator(client GetDevEndpointsAPIClient, params *GetDev client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDevEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDevEndpoints page. @@ -195,7 +196,10 @@ func (p *GetDevEndpointsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetJobRuns.go b/service/glue/api_op_GetJobRuns.go index ebc5f0b49d2..3f651cb5546 100644 --- a/service/glue/api_op_GetJobRuns.go +++ b/service/glue/api_op_GetJobRuns.go @@ -167,12 +167,13 @@ func NewGetJobRunsPaginator(client GetJobRunsAPIClient, params *GetJobRunsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetJobRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetJobRuns page. @@ -199,7 +200,10 @@ func (p *GetJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetJobs.go b/service/glue/api_op_GetJobs.go index 10dc7f06053..7836b1e79c2 100644 --- a/service/glue/api_op_GetJobs.go +++ b/service/glue/api_op_GetJobs.go @@ -159,12 +159,13 @@ func NewGetJobsPaginator(client GetJobsAPIClient, params *GetJobsInput, optFns . client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetJobs page. @@ -191,7 +192,10 @@ func (p *GetJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetMLTaskRuns.go b/service/glue/api_op_GetMLTaskRuns.go index 4df7d72cba1..5a16773781e 100644 --- a/service/glue/api_op_GetMLTaskRuns.go +++ b/service/glue/api_op_GetMLTaskRuns.go @@ -178,12 +178,13 @@ func NewGetMLTaskRunsPaginator(client GetMLTaskRunsAPIClient, params *GetMLTaskR client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetMLTaskRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetMLTaskRuns page. @@ -210,7 +211,10 @@ func (p *GetMLTaskRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetMLTransforms.go b/service/glue/api_op_GetMLTransforms.go index cf0930978ba..045c455d9a6 100644 --- a/service/glue/api_op_GetMLTransforms.go +++ b/service/glue/api_op_GetMLTransforms.go @@ -175,12 +175,13 @@ func NewGetMLTransformsPaginator(client GetMLTransformsAPIClient, params *GetMLT client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetMLTransformsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetMLTransforms page. @@ -207,7 +208,10 @@ func (p *GetMLTransformsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetPartitionIndexes.go b/service/glue/api_op_GetPartitionIndexes.go index ca187d01171..3c5dd7a43ee 100644 --- a/service/glue/api_op_GetPartitionIndexes.go +++ b/service/glue/api_op_GetPartitionIndexes.go @@ -170,12 +170,13 @@ func NewGetPartitionIndexesPaginator(client GetPartitionIndexesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetPartitionIndexesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetPartitionIndexes page. @@ -196,7 +197,10 @@ func (p *GetPartitionIndexesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetPartitions.go b/service/glue/api_op_GetPartitions.go index 2bb758fed83..c424f02c8d6 100644 --- a/service/glue/api_op_GetPartitions.go +++ b/service/glue/api_op_GetPartitions.go @@ -242,12 +242,13 @@ func NewGetPartitionsPaginator(client GetPartitionsAPIClient, params *GetPartiti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetPartitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetPartitions page. @@ -274,7 +275,10 @@ func (p *GetPartitionsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetResourcePolicies.go b/service/glue/api_op_GetResourcePolicies.go index bc6dd1c5983..315f4921de6 100644 --- a/service/glue/api_op_GetResourcePolicies.go +++ b/service/glue/api_op_GetResourcePolicies.go @@ -167,12 +167,13 @@ func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourcePoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourcePolicies page. @@ -199,7 +200,10 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetSecurityConfigurations.go b/service/glue/api_op_GetSecurityConfigurations.go index 271ba185b80..0575c9def73 100644 --- a/service/glue/api_op_GetSecurityConfigurations.go +++ b/service/glue/api_op_GetSecurityConfigurations.go @@ -162,12 +162,13 @@ func NewGetSecurityConfigurationsPaginator(client GetSecurityConfigurationsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSecurityConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSecurityConfigurations page. @@ -194,7 +195,10 @@ func (p *GetSecurityConfigurationsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetTableVersions.go b/service/glue/api_op_GetTableVersions.go index 6c7304ebe83..5e8eea8c1f3 100644 --- a/service/glue/api_op_GetTableVersions.go +++ b/service/glue/api_op_GetTableVersions.go @@ -180,12 +180,13 @@ func NewGetTableVersionsPaginator(client GetTableVersionsAPIClient, params *GetT client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTableVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTableVersions page. @@ -212,7 +213,10 @@ func (p *GetTableVersionsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetTables.go b/service/glue/api_op_GetTables.go index 66390eb86a5..e8d4fb4e126 100644 --- a/service/glue/api_op_GetTables.go +++ b/service/glue/api_op_GetTables.go @@ -185,12 +185,13 @@ func NewGetTablesPaginator(client GetTablesAPIClient, params *GetTablesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTables page. @@ -217,7 +218,10 @@ func (p *GetTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetTriggers.go b/service/glue/api_op_GetTriggers.go index e1ca73315c2..cfaac8da259 100644 --- a/service/glue/api_op_GetTriggers.go +++ b/service/glue/api_op_GetTriggers.go @@ -163,12 +163,13 @@ func NewGetTriggersPaginator(client GetTriggersAPIClient, params *GetTriggersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTriggersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTriggers page. @@ -195,7 +196,10 @@ func (p *GetTriggersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetUserDefinedFunctions.go b/service/glue/api_op_GetUserDefinedFunctions.go index 5d1b1ae606f..bb790b11d5c 100644 --- a/service/glue/api_op_GetUserDefinedFunctions.go +++ b/service/glue/api_op_GetUserDefinedFunctions.go @@ -180,12 +180,13 @@ func NewGetUserDefinedFunctionsPaginator(client GetUserDefinedFunctionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUserDefinedFunctionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUserDefinedFunctions page. @@ -212,7 +213,10 @@ func (p *GetUserDefinedFunctionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_GetWorkflowRuns.go b/service/glue/api_op_GetWorkflowRuns.go index 4d5cdbcf714..635fd049dd5 100644 --- a/service/glue/api_op_GetWorkflowRuns.go +++ b/service/glue/api_op_GetWorkflowRuns.go @@ -171,12 +171,13 @@ func NewGetWorkflowRunsPaginator(client GetWorkflowRunsAPIClient, params *GetWor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetWorkflowRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetWorkflowRuns page. @@ -203,7 +204,10 @@ func (p *GetWorkflowRunsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListBlueprints.go b/service/glue/api_op_ListBlueprints.go index 8758f559c8b..ccb3c9087dc 100644 --- a/service/glue/api_op_ListBlueprints.go +++ b/service/glue/api_op_ListBlueprints.go @@ -162,12 +162,13 @@ func NewListBlueprintsPaginator(client ListBlueprintsAPIClient, params *ListBlue client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBlueprintsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBlueprints page. @@ -194,7 +195,10 @@ func (p *ListBlueprintsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListCrawlers.go b/service/glue/api_op_ListCrawlers.go index 90c644a37ad..efe38abc3ed 100644 --- a/service/glue/api_op_ListCrawlers.go +++ b/service/glue/api_op_ListCrawlers.go @@ -168,12 +168,13 @@ func NewListCrawlersPaginator(client ListCrawlersAPIClient, params *ListCrawlers client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCrawlersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCrawlers page. @@ -200,7 +201,10 @@ func (p *ListCrawlersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListDevEndpoints.go b/service/glue/api_op_ListDevEndpoints.go index 0d05479fe84..30955f698d6 100644 --- a/service/glue/api_op_ListDevEndpoints.go +++ b/service/glue/api_op_ListDevEndpoints.go @@ -169,12 +169,13 @@ func NewListDevEndpointsPaginator(client ListDevEndpointsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevEndpoints page. @@ -201,7 +202,10 @@ func (p *ListDevEndpointsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListJobs.go b/service/glue/api_op_ListJobs.go index c5f104340c4..3070a885519 100644 --- a/service/glue/api_op_ListJobs.go +++ b/service/glue/api_op_ListJobs.go @@ -167,12 +167,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -199,7 +200,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListMLTransforms.go b/service/glue/api_op_ListMLTransforms.go index de0b3a4e954..b3334c8d339 100644 --- a/service/glue/api_op_ListMLTransforms.go +++ b/service/glue/api_op_ListMLTransforms.go @@ -181,12 +181,13 @@ func NewListMLTransformsPaginator(client ListMLTransformsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMLTransformsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMLTransforms page. @@ -213,7 +214,10 @@ func (p *ListMLTransformsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListRegistries.go b/service/glue/api_op_ListRegistries.go index 3e1a64dd721..d7ed44d67bb 100644 --- a/service/glue/api_op_ListRegistries.go +++ b/service/glue/api_op_ListRegistries.go @@ -166,12 +166,13 @@ func NewListRegistriesPaginator(client ListRegistriesAPIClient, params *ListRegi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRegistriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRegistries page. @@ -198,7 +199,10 @@ func (p *ListRegistriesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListSchemaVersions.go b/service/glue/api_op_ListSchemaVersions.go index 119f0a9975d..f75326340e2 100644 --- a/service/glue/api_op_ListSchemaVersions.go +++ b/service/glue/api_op_ListSchemaVersions.go @@ -183,12 +183,13 @@ func NewListSchemaVersionsPaginator(client ListSchemaVersionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchemaVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchemaVersions page. @@ -215,7 +216,10 @@ func (p *ListSchemaVersionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListSchemas.go b/service/glue/api_op_ListSchemas.go index 417827a24a2..69e56b9bd1f 100644 --- a/service/glue/api_op_ListSchemas.go +++ b/service/glue/api_op_ListSchemas.go @@ -169,12 +169,13 @@ func NewListSchemasPaginator(client ListSchemasAPIClient, params *ListSchemasInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchemasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchemas page. @@ -201,7 +202,10 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListTriggers.go b/service/glue/api_op_ListTriggers.go index 56a4bf915e9..fed326baad3 100644 --- a/service/glue/api_op_ListTriggers.go +++ b/service/glue/api_op_ListTriggers.go @@ -172,12 +172,13 @@ func NewListTriggersPaginator(client ListTriggersAPIClient, params *ListTriggers client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTriggersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTriggers page. @@ -204,7 +205,10 @@ func (p *ListTriggersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_ListWorkflows.go b/service/glue/api_op_ListWorkflows.go index ec1618d51d7..231ea4a77d8 100644 --- a/service/glue/api_op_ListWorkflows.go +++ b/service/glue/api_op_ListWorkflows.go @@ -158,12 +158,13 @@ func NewListWorkflowsPaginator(client ListWorkflowsAPIClient, params *ListWorkfl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkflowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkflows page. @@ -190,7 +191,10 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/glue/api_op_SearchTables.go b/service/glue/api_op_SearchTables.go index 8e4cc8655b1..d092d334cce 100644 --- a/service/glue/api_op_SearchTables.go +++ b/service/glue/api_op_SearchTables.go @@ -200,12 +200,13 @@ func NewSearchTablesPaginator(client SearchTablesAPIClient, params *SearchTables client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchTables page. @@ -232,7 +233,10 @@ func (p *SearchTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/grafana/api_op_ListPermissions.go b/service/grafana/api_op_ListPermissions.go index ed043ff8be1..f1b1cd55fa2 100644 --- a/service/grafana/api_op_ListPermissions.go +++ b/service/grafana/api_op_ListPermissions.go @@ -187,12 +187,13 @@ func NewListPermissionsPaginator(client ListPermissionsAPIClient, params *ListPe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissions page. @@ -219,7 +220,10 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/grafana/api_op_ListWorkspaces.go b/service/grafana/api_op_ListWorkspaces.go index 0ecdc5bb9be..56c001d243d 100644 --- a/service/grafana/api_op_ListWorkspaces.go +++ b/service/grafana/api_op_ListWorkspaces.go @@ -167,12 +167,13 @@ func NewListWorkspacesPaginator(client ListWorkspacesAPIClient, params *ListWork client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkspacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkspaces page. @@ -199,7 +200,10 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go b/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go index 06d63cfb8b3..7c1f06fec15 100644 --- a/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go +++ b/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go @@ -174,12 +174,13 @@ func NewListClientDevicesAssociatedWithCoreDevicePaginator(client ListClientDevi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClientDevicesAssociatedWithCoreDevicePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClientDevicesAssociatedWithCoreDevice page. @@ -202,7 +203,10 @@ func (p *ListClientDevicesAssociatedWithCoreDevicePaginator) NextPage(ctx contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListComponentVersions.go b/service/greengrassv2/api_op_ListComponentVersions.go index 600f2325f7a..bb73cc127a3 100644 --- a/service/greengrassv2/api_op_ListComponentVersions.go +++ b/service/greengrassv2/api_op_ListComponentVersions.go @@ -173,12 +173,13 @@ func NewListComponentVersionsPaginator(client ListComponentVersionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponentVersions page. @@ -201,7 +202,10 @@ func (p *ListComponentVersionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListComponents.go b/service/greengrassv2/api_op_ListComponents.go index 0fbe3b43244..8f5c8eca6b5 100644 --- a/service/greengrassv2/api_op_ListComponents.go +++ b/service/greengrassv2/api_op_ListComponents.go @@ -165,12 +165,13 @@ func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponents page. @@ -193,7 +194,10 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListCoreDevices.go b/service/greengrassv2/api_op_ListCoreDevices.go index bc76d8bb0af..ecc9bf09a7f 100644 --- a/service/greengrassv2/api_op_ListCoreDevices.go +++ b/service/greengrassv2/api_op_ListCoreDevices.go @@ -178,12 +178,13 @@ func NewListCoreDevicesPaginator(client ListCoreDevicesAPIClient, params *ListCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCoreDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCoreDevices page. @@ -206,7 +207,10 @@ func (p *ListCoreDevicesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListDeployments.go b/service/greengrassv2/api_op_ListDeployments.go index 6e6629d2f25..ed2f2ace57a 100644 --- a/service/greengrassv2/api_op_ListDeployments.go +++ b/service/greengrassv2/api_op_ListDeployments.go @@ -177,12 +177,13 @@ func NewListDeploymentsPaginator(client ListDeploymentsAPIClient, params *ListDe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeployments page. @@ -205,7 +206,10 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListEffectiveDeployments.go b/service/greengrassv2/api_op_ListEffectiveDeployments.go index d535ae6a545..ef3497de423 100644 --- a/service/greengrassv2/api_op_ListEffectiveDeployments.go +++ b/service/greengrassv2/api_op_ListEffectiveDeployments.go @@ -172,12 +172,13 @@ func NewListEffectiveDeploymentsPaginator(client ListEffectiveDeploymentsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEffectiveDeploymentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEffectiveDeployments page. @@ -200,7 +201,10 @@ func (p *ListEffectiveDeploymentsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/greengrassv2/api_op_ListInstalledComponents.go b/service/greengrassv2/api_op_ListInstalledComponents.go index c7ac58672b9..b8d559efc78 100644 --- a/service/greengrassv2/api_op_ListInstalledComponents.go +++ b/service/greengrassv2/api_op_ListInstalledComponents.go @@ -171,12 +171,13 @@ func NewListInstalledComponentsPaginator(client ListInstalledComponentsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstalledComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstalledComponents page. @@ -199,7 +200,10 @@ func (p *ListInstalledComponentsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/groundstation/api_op_ListConfigs.go b/service/groundstation/api_op_ListConfigs.go index 74e43a82126..e46390e4d4e 100644 --- a/service/groundstation/api_op_ListConfigs.go +++ b/service/groundstation/api_op_ListConfigs.go @@ -163,12 +163,13 @@ func NewListConfigsPaginator(client ListConfigsAPIClient, params *ListConfigsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigs page. @@ -195,7 +196,10 @@ func (p *ListConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/groundstation/api_op_ListContacts.go b/service/groundstation/api_op_ListContacts.go index a156d97396a..4377bb5f4d6 100644 --- a/service/groundstation/api_op_ListContacts.go +++ b/service/groundstation/api_op_ListContacts.go @@ -192,12 +192,13 @@ func NewListContactsPaginator(client ListContactsAPIClient, params *ListContacts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContacts page. @@ -224,7 +225,10 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/groundstation/api_op_ListDataflowEndpointGroups.go b/service/groundstation/api_op_ListDataflowEndpointGroups.go index 0849eee0f2e..ac391df5670 100644 --- a/service/groundstation/api_op_ListDataflowEndpointGroups.go +++ b/service/groundstation/api_op_ListDataflowEndpointGroups.go @@ -167,12 +167,13 @@ func NewListDataflowEndpointGroupsPaginator(client ListDataflowEndpointGroupsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataflowEndpointGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataflowEndpointGroups page. @@ -199,7 +200,10 @@ func (p *ListDataflowEndpointGroupsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/groundstation/api_op_ListGroundStations.go b/service/groundstation/api_op_ListGroundStations.go index d6b2f59675b..29fd5546c01 100644 --- a/service/groundstation/api_op_ListGroundStations.go +++ b/service/groundstation/api_op_ListGroundStations.go @@ -168,12 +168,13 @@ func NewListGroundStationsPaginator(client ListGroundStationsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroundStationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroundStations page. @@ -200,7 +201,10 @@ func (p *ListGroundStationsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/groundstation/api_op_ListMissionProfiles.go b/service/groundstation/api_op_ListMissionProfiles.go index 076796fb9c5..1d33d71f38f 100644 --- a/service/groundstation/api_op_ListMissionProfiles.go +++ b/service/groundstation/api_op_ListMissionProfiles.go @@ -165,12 +165,13 @@ func NewListMissionProfilesPaginator(client ListMissionProfilesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMissionProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMissionProfiles page. @@ -197,7 +198,10 @@ func (p *ListMissionProfilesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/groundstation/api_op_ListSatellites.go b/service/groundstation/api_op_ListSatellites.go index e05c88aaae4..1aa5ef0d454 100644 --- a/service/groundstation/api_op_ListSatellites.go +++ b/service/groundstation/api_op_ListSatellites.go @@ -164,12 +164,13 @@ func NewListSatellitesPaginator(client ListSatellitesAPIClient, params *ListSate client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSatellitesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSatellites page. @@ -196,7 +197,10 @@ func (p *ListSatellitesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_GetUsageStatistics.go b/service/guardduty/api_op_GetUsageStatistics.go index 30c47e22018..fce472aa19b 100644 --- a/service/guardduty/api_op_GetUsageStatistics.go +++ b/service/guardduty/api_op_GetUsageStatistics.go @@ -195,12 +195,13 @@ func NewGetUsageStatisticsPaginator(client GetUsageStatisticsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUsageStatisticsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUsageStatistics page. @@ -223,7 +224,10 @@ func (p *GetUsageStatisticsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListDetectors.go b/service/guardduty/api_op_ListDetectors.go index 2c78245be48..858a446c1d7 100644 --- a/service/guardduty/api_op_ListDetectors.go +++ b/service/guardduty/api_op_ListDetectors.go @@ -166,12 +166,13 @@ func NewListDetectorsPaginator(client ListDetectorsAPIClient, params *ListDetect client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDetectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDetectors page. @@ -194,7 +195,10 @@ func (p *ListDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListFilters.go b/service/guardduty/api_op_ListFilters.go index bda3b315e08..0965bdf2b18 100644 --- a/service/guardduty/api_op_ListFilters.go +++ b/service/guardduty/api_op_ListFilters.go @@ -174,12 +174,13 @@ func NewListFiltersPaginator(client ListFiltersAPIClient, params *ListFiltersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFilters page. @@ -202,7 +203,10 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListFindings.go b/service/guardduty/api_op_ListFindings.go index 78f22df7c0c..7d8c6689f74 100644 --- a/service/guardduty/api_op_ListFindings.go +++ b/service/guardduty/api_op_ListFindings.go @@ -320,12 +320,13 @@ func NewListFindingsPaginator(client ListFindingsAPIClient, params *ListFindings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindings page. @@ -348,7 +349,10 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListIPSets.go b/service/guardduty/api_op_ListIPSets.go index dbf523fac10..498afede7b0 100644 --- a/service/guardduty/api_op_ListIPSets.go +++ b/service/guardduty/api_op_ListIPSets.go @@ -176,12 +176,13 @@ func NewListIPSetsPaginator(client ListIPSetsAPIClient, params *ListIPSetsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIPSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIPSets page. @@ -204,7 +205,10 @@ func (p *ListIPSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListInvitations.go b/service/guardduty/api_op_ListInvitations.go index b394d693b91..f9c05d6f64b 100644 --- a/service/guardduty/api_op_ListInvitations.go +++ b/service/guardduty/api_op_ListInvitations.go @@ -167,12 +167,13 @@ func NewListInvitationsPaginator(client ListInvitationsAPIClient, params *ListIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInvitations page. @@ -195,7 +196,10 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListMembers.go b/service/guardduty/api_op_ListMembers.go index 78fb46a6e08..33e2fbf28e9 100644 --- a/service/guardduty/api_op_ListMembers.go +++ b/service/guardduty/api_op_ListMembers.go @@ -178,12 +178,13 @@ func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMembers page. @@ -206,7 +207,10 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListOrganizationAdminAccounts.go b/service/guardduty/api_op_ListOrganizationAdminAccounts.go index 0d1bf061c58..a0c427176b7 100644 --- a/service/guardduty/api_op_ListOrganizationAdminAccounts.go +++ b/service/guardduty/api_op_ListOrganizationAdminAccounts.go @@ -167,12 +167,13 @@ func NewListOrganizationAdminAccountsPaginator(client ListOrganizationAdminAccou client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationAdminAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizationAdminAccounts page. @@ -195,7 +196,10 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListPublishingDestinations.go b/service/guardduty/api_op_ListPublishingDestinations.go index 2de72a1f970..95510f0e840 100644 --- a/service/guardduty/api_op_ListPublishingDestinations.go +++ b/service/guardduty/api_op_ListPublishingDestinations.go @@ -181,12 +181,13 @@ func NewListPublishingDestinationsPaginator(client ListPublishingDestinationsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPublishingDestinationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPublishingDestinations page. @@ -209,7 +210,10 @@ func (p *ListPublishingDestinationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/guardduty/api_op_ListThreatIntelSets.go b/service/guardduty/api_op_ListThreatIntelSets.go index 23fc3c094f5..2ec87764af4 100644 --- a/service/guardduty/api_op_ListThreatIntelSets.go +++ b/service/guardduty/api_op_ListThreatIntelSets.go @@ -178,12 +178,13 @@ func NewListThreatIntelSetsPaginator(client ListThreatIntelSetsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThreatIntelSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThreatIntelSets page. @@ -206,7 +207,10 @@ func (p *ListThreatIntelSetsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeAffectedAccountsForOrganization.go b/service/health/api_op_DescribeAffectedAccountsForOrganization.go index 987752d9e1d..410ee73d943 100644 --- a/service/health/api_op_DescribeAffectedAccountsForOrganization.go +++ b/service/health/api_op_DescribeAffectedAccountsForOrganization.go @@ -210,12 +210,13 @@ func NewDescribeAffectedAccountsForOrganizationPaginator(client DescribeAffected client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAffectedAccountsForOrganizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAffectedAccountsForOrganization page. @@ -242,7 +243,10 @@ func (p *DescribeAffectedAccountsForOrganizationPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeAffectedEntities.go b/service/health/api_op_DescribeAffectedEntities.go index cb9dace1d92..e09872c4aac 100644 --- a/service/health/api_op_DescribeAffectedEntities.go +++ b/service/health/api_op_DescribeAffectedEntities.go @@ -199,12 +199,13 @@ func NewDescribeAffectedEntitiesPaginator(client DescribeAffectedEntitiesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAffectedEntitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAffectedEntities page. @@ -231,7 +232,10 @@ func (p *DescribeAffectedEntitiesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeAffectedEntitiesForOrganization.go b/service/health/api_op_DescribeAffectedEntitiesForOrganization.go index eee053193de..8bb659f75df 100644 --- a/service/health/api_op_DescribeAffectedEntitiesForOrganization.go +++ b/service/health/api_op_DescribeAffectedEntitiesForOrganization.go @@ -209,12 +209,13 @@ func NewDescribeAffectedEntitiesForOrganizationPaginator(client DescribeAffected client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAffectedEntitiesForOrganizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAffectedEntitiesForOrganization page. @@ -241,7 +242,10 @@ func (p *DescribeAffectedEntitiesForOrganizationPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeEventAggregates.go b/service/health/api_op_DescribeEventAggregates.go index 0b3e0356966..7fa8ebec826 100644 --- a/service/health/api_op_DescribeEventAggregates.go +++ b/service/health/api_op_DescribeEventAggregates.go @@ -186,12 +186,13 @@ func NewDescribeEventAggregatesPaginator(client DescribeEventAggregatesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventAggregatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventAggregates page. @@ -218,7 +219,10 @@ func (p *DescribeEventAggregatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeEventTypes.go b/service/health/api_op_DescribeEventTypes.go index b3302488da0..1ed2f41e3cd 100644 --- a/service/health/api_op_DescribeEventTypes.go +++ b/service/health/api_op_DescribeEventTypes.go @@ -188,12 +188,13 @@ func NewDescribeEventTypesPaginator(client DescribeEventTypesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventTypes page. @@ -220,7 +221,10 @@ func (p *DescribeEventTypesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeEvents.go b/service/health/api_op_DescribeEvents.go index 51562ef384e..916bb4f40e4 100644 --- a/service/health/api_op_DescribeEvents.go +++ b/service/health/api_op_DescribeEvents.go @@ -199,12 +199,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -231,7 +232,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/health/api_op_DescribeEventsForOrganization.go b/service/health/api_op_DescribeEventsForOrganization.go index c8cd0737c80..1dddf52361e 100644 --- a/service/health/api_op_DescribeEventsForOrganization.go +++ b/service/health/api_op_DescribeEventsForOrganization.go @@ -209,12 +209,13 @@ func NewDescribeEventsForOrganizationPaginator(client DescribeEventsForOrganizat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsForOrganizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventsForOrganization page. @@ -241,7 +242,10 @@ func (p *DescribeEventsForOrganizationPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/healthlake/api_op_ListFHIRDatastores.go b/service/healthlake/api_op_ListFHIRDatastores.go index a31f7f87bc1..9d2c16f22d2 100644 --- a/service/healthlake/api_op_ListFHIRDatastores.go +++ b/service/healthlake/api_op_ListFHIRDatastores.go @@ -169,12 +169,13 @@ func NewListFHIRDatastoresPaginator(client ListFHIRDatastoresAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFHIRDatastoresPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFHIRDatastores page. @@ -201,7 +202,10 @@ func (p *ListFHIRDatastoresPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/healthlake/api_op_ListFHIRExportJobs.go b/service/healthlake/api_op_ListFHIRExportJobs.go index 30eb201219a..bc6d74b69c7 100644 --- a/service/healthlake/api_op_ListFHIRExportJobs.go +++ b/service/healthlake/api_op_ListFHIRExportJobs.go @@ -194,12 +194,13 @@ func NewListFHIRExportJobsPaginator(client ListFHIRExportJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFHIRExportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFHIRExportJobs page. @@ -226,7 +227,10 @@ func (p *ListFHIRExportJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/healthlake/api_op_ListFHIRImportJobs.go b/service/healthlake/api_op_ListFHIRImportJobs.go index 99d2e85049e..7a1149046bf 100644 --- a/service/healthlake/api_op_ListFHIRImportJobs.go +++ b/service/healthlake/api_op_ListFHIRImportJobs.go @@ -194,12 +194,13 @@ func NewListFHIRImportJobsPaginator(client ListFHIRImportJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFHIRImportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFHIRImportJobs page. @@ -226,7 +227,10 @@ func (p *ListFHIRImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/honeycode/api_op_ListTableColumns.go b/service/honeycode/api_op_ListTableColumns.go index a11d5b8302e..d176ad16bc0 100644 --- a/service/honeycode/api_op_ListTableColumns.go +++ b/service/honeycode/api_op_ListTableColumns.go @@ -180,12 +180,13 @@ func NewListTableColumnsPaginator(client ListTableColumnsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTableColumnsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTableColumns page. @@ -206,7 +207,10 @@ func (p *ListTableColumnsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/honeycode/api_op_ListTableRows.go b/service/honeycode/api_op_ListTableRows.go index b517eab2fd5..4146b5d15dd 100644 --- a/service/honeycode/api_op_ListTableRows.go +++ b/service/honeycode/api_op_ListTableRows.go @@ -204,12 +204,13 @@ func NewListTableRowsPaginator(client ListTableRowsAPIClient, params *ListTableR client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTableRowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTableRows page. @@ -236,7 +237,10 @@ func (p *ListTableRowsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/honeycode/api_op_ListTables.go b/service/honeycode/api_op_ListTables.go index 15415abe530..8538e0e78bc 100644 --- a/service/honeycode/api_op_ListTables.go +++ b/service/honeycode/api_op_ListTables.go @@ -181,12 +181,13 @@ func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTables page. @@ -213,7 +214,10 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/honeycode/api_op_QueryTableRows.go b/service/honeycode/api_op_QueryTableRows.go index 6f7a3c8de56..b1966c98df7 100644 --- a/service/honeycode/api_op_QueryTableRows.go +++ b/service/honeycode/api_op_QueryTableRows.go @@ -201,12 +201,13 @@ func NewQueryTableRowsPaginator(client QueryTableRowsAPIClient, params *QueryTab client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *QueryTableRowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next QueryTableRows page. @@ -233,7 +234,10 @@ func (p *QueryTableRowsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_GetAccountAuthorizationDetails.go b/service/iam/api_op_GetAccountAuthorizationDetails.go index 7c28c11c835..94134b39baa 100644 --- a/service/iam/api_op_GetAccountAuthorizationDetails.go +++ b/service/iam/api_op_GetAccountAuthorizationDetails.go @@ -214,12 +214,13 @@ func NewGetAccountAuthorizationDetailsPaginator(client GetAccountAuthorizationDe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAccountAuthorizationDetailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAccountAuthorizationDetails page. @@ -246,7 +247,10 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_GetGroup.go b/service/iam/api_op_GetGroup.go index f357cf58690..6db5553fd47 100644 --- a/service/iam/api_op_GetGroup.go +++ b/service/iam/api_op_GetGroup.go @@ -203,12 +203,13 @@ func NewGetGroupPaginator(client GetGroupAPIClient, params *GetGroupInput, optFn client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetGroup page. @@ -235,7 +236,10 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListAccessKeys.go b/service/iam/api_op_ListAccessKeys.go index 0317aaa0a3f..8a46de37c84 100644 --- a/service/iam/api_op_ListAccessKeys.go +++ b/service/iam/api_op_ListAccessKeys.go @@ -203,12 +203,13 @@ func NewListAccessKeysPaginator(client ListAccessKeysAPIClient, params *ListAcce client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessKeys page. @@ -235,7 +236,10 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListAccountAliases.go b/service/iam/api_op_ListAccountAliases.go index ab2baae5bb1..9d5a90b7db3 100644 --- a/service/iam/api_op_ListAccountAliases.go +++ b/service/iam/api_op_ListAccountAliases.go @@ -192,12 +192,13 @@ func NewListAccountAliasesPaginator(client ListAccountAliasesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountAliases page. @@ -224,7 +225,10 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListAttachedGroupPolicies.go b/service/iam/api_op_ListAttachedGroupPolicies.go index 4c8cda7ba0f..b717c5d73e0 100644 --- a/service/iam/api_op_ListAttachedGroupPolicies.go +++ b/service/iam/api_op_ListAttachedGroupPolicies.go @@ -217,12 +217,13 @@ func NewListAttachedGroupPoliciesPaginator(client ListAttachedGroupPoliciesAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttachedGroupPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttachedGroupPolicies page. @@ -249,7 +250,10 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListAttachedRolePolicies.go b/service/iam/api_op_ListAttachedRolePolicies.go index 532aaeb020e..23d9a576a84 100644 --- a/service/iam/api_op_ListAttachedRolePolicies.go +++ b/service/iam/api_op_ListAttachedRolePolicies.go @@ -217,12 +217,13 @@ func NewListAttachedRolePoliciesPaginator(client ListAttachedRolePoliciesAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttachedRolePoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttachedRolePolicies page. @@ -249,7 +250,10 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListAttachedUserPolicies.go b/service/iam/api_op_ListAttachedUserPolicies.go index de054ba651f..255bf51a0aa 100644 --- a/service/iam/api_op_ListAttachedUserPolicies.go +++ b/service/iam/api_op_ListAttachedUserPolicies.go @@ -217,12 +217,13 @@ func NewListAttachedUserPoliciesPaginator(client ListAttachedUserPoliciesAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttachedUserPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttachedUserPolicies page. @@ -249,7 +250,10 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListEntitiesForPolicy.go b/service/iam/api_op_ListEntitiesForPolicy.go index 37ff3837601..a00126c4fb3 100644 --- a/service/iam/api_op_ListEntitiesForPolicy.go +++ b/service/iam/api_op_ListEntitiesForPolicy.go @@ -231,12 +231,13 @@ func NewListEntitiesForPolicyPaginator(client ListEntitiesForPolicyAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntitiesForPolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntitiesForPolicy page. @@ -263,7 +264,10 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListGroupPolicies.go b/service/iam/api_op_ListGroupPolicies.go index ebd65b057ee..fb27271aa7c 100644 --- a/service/iam/api_op_ListGroupPolicies.go +++ b/service/iam/api_op_ListGroupPolicies.go @@ -207,12 +207,13 @@ func NewListGroupPoliciesPaginator(client ListGroupPoliciesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupPolicies page. @@ -239,7 +240,10 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListGroups.go b/service/iam/api_op_ListGroups.go index b7ce1293495..b56355fc403 100644 --- a/service/iam/api_op_ListGroups.go +++ b/service/iam/api_op_ListGroups.go @@ -198,12 +198,13 @@ func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. @@ -230,7 +231,10 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListGroupsForUser.go b/service/iam/api_op_ListGroupsForUser.go index b17f1c13519..72593f40f0e 100644 --- a/service/iam/api_op_ListGroupsForUser.go +++ b/service/iam/api_op_ListGroupsForUser.go @@ -199,12 +199,13 @@ func NewListGroupsForUserPaginator(client ListGroupsForUserAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsForUserPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupsForUser page. @@ -231,7 +232,10 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListInstanceProfiles.go b/service/iam/api_op_ListInstanceProfiles.go index 5c98ce3b19b..39faaf0f43e 100644 --- a/service/iam/api_op_ListInstanceProfiles.go +++ b/service/iam/api_op_ListInstanceProfiles.go @@ -207,12 +207,13 @@ func NewListInstanceProfilesPaginator(client ListInstanceProfilesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceProfiles page. @@ -239,7 +240,10 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListInstanceProfilesForRole.go b/service/iam/api_op_ListInstanceProfilesForRole.go index 67395806461..0ec25a13203 100644 --- a/service/iam/api_op_ListInstanceProfilesForRole.go +++ b/service/iam/api_op_ListInstanceProfilesForRole.go @@ -205,12 +205,13 @@ func NewListInstanceProfilesForRolePaginator(client ListInstanceProfilesForRoleA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceProfilesForRolePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceProfilesForRole page. @@ -237,7 +238,10 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListMFADevices.go b/service/iam/api_op_ListMFADevices.go index c8f150accd5..ee995dafc6d 100644 --- a/service/iam/api_op_ListMFADevices.go +++ b/service/iam/api_op_ListMFADevices.go @@ -198,12 +198,13 @@ func NewListMFADevicesPaginator(client ListMFADevicesAPIClient, params *ListMFAD client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMFADevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMFADevices page. @@ -230,7 +231,10 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListPolicies.go b/service/iam/api_op_ListPolicies.go index 28069abdb5f..39851cea90b 100644 --- a/service/iam/api_op_ListPolicies.go +++ b/service/iam/api_op_ListPolicies.go @@ -226,12 +226,13 @@ func NewListPoliciesPaginator(client ListPoliciesAPIClient, params *ListPolicies client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicies page. @@ -258,7 +259,10 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListPolicyVersions.go b/service/iam/api_op_ListPolicyVersions.go index 548bdd04284..d28deb0d1b4 100644 --- a/service/iam/api_op_ListPolicyVersions.go +++ b/service/iam/api_op_ListPolicyVersions.go @@ -204,12 +204,13 @@ func NewListPolicyVersionsPaginator(client ListPolicyVersionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPolicyVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicyVersions page. @@ -236,7 +237,10 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListRolePolicies.go b/service/iam/api_op_ListRolePolicies.go index e6be8fd5bfa..29f5aaffae0 100644 --- a/service/iam/api_op_ListRolePolicies.go +++ b/service/iam/api_op_ListRolePolicies.go @@ -204,12 +204,13 @@ func NewListRolePoliciesPaginator(client ListRolePoliciesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRolePoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRolePolicies page. @@ -236,7 +237,10 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListRoles.go b/service/iam/api_op_ListRoles.go index 15e0102e944..49b0518a030 100644 --- a/service/iam/api_op_ListRoles.go +++ b/service/iam/api_op_ListRoles.go @@ -205,12 +205,13 @@ func NewListRolesPaginator(client ListRolesAPIClient, params *ListRolesInput, op client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRolesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoles page. @@ -237,7 +238,10 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListSSHPublicKeys.go b/service/iam/api_op_ListSSHPublicKeys.go index c053e391ac5..74286ee2fca 100644 --- a/service/iam/api_op_ListSSHPublicKeys.go +++ b/service/iam/api_op_ListSSHPublicKeys.go @@ -201,12 +201,13 @@ func NewListSSHPublicKeysPaginator(client ListSSHPublicKeysAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSSHPublicKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSSHPublicKeys page. @@ -233,7 +234,10 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListServerCertificates.go b/service/iam/api_op_ListServerCertificates.go index 406e98479b4..ef0648cbef3 100644 --- a/service/iam/api_op_ListServerCertificates.go +++ b/service/iam/api_op_ListServerCertificates.go @@ -209,12 +209,13 @@ func NewListServerCertificatesPaginator(client ListServerCertificatesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServerCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServerCertificates page. @@ -241,7 +242,10 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListSigningCertificates.go b/service/iam/api_op_ListSigningCertificates.go index b06160a8458..30beadcc1d4 100644 --- a/service/iam/api_op_ListSigningCertificates.go +++ b/service/iam/api_op_ListSigningCertificates.go @@ -204,12 +204,13 @@ func NewListSigningCertificatesPaginator(client ListSigningCertificatesAPIClient client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSigningCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSigningCertificates page. @@ -236,7 +237,10 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListUserPolicies.go b/service/iam/api_op_ListUserPolicies.go index 1f1a9ca2d28..2486961ef72 100644 --- a/service/iam/api_op_ListUserPolicies.go +++ b/service/iam/api_op_ListUserPolicies.go @@ -204,12 +204,13 @@ func NewListUserPoliciesPaginator(client ListUserPoliciesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserPolicies page. @@ -236,7 +237,10 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListUserTags.go b/service/iam/api_op_ListUserTags.go index e31d89e48d3..8acedc6778f 100644 --- a/service/iam/api_op_ListUserTags.go +++ b/service/iam/api_op_ListUserTags.go @@ -201,12 +201,13 @@ func NewListUserTagsPaginator(client ListUserTagsAPIClient, params *ListUserTags client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserTags page. @@ -233,7 +234,10 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListUsers.go b/service/iam/api_op_ListUsers.go index 0e46c40ae4d..71bed45876f 100644 --- a/service/iam/api_op_ListUsers.go +++ b/service/iam/api_op_ListUsers.go @@ -203,12 +203,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -235,7 +236,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_ListVirtualMFADevices.go b/service/iam/api_op_ListVirtualMFADevices.go index 9359f0c0d1f..02543db23c3 100644 --- a/service/iam/api_op_ListVirtualMFADevices.go +++ b/service/iam/api_op_ListVirtualMFADevices.go @@ -201,12 +201,13 @@ func NewListVirtualMFADevicesPaginator(client ListVirtualMFADevicesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVirtualMFADevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVirtualMFADevices page. @@ -233,7 +234,10 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_SimulateCustomPolicy.go b/service/iam/api_op_SimulateCustomPolicy.go index e920c6ce6d2..5d7d4664d4c 100644 --- a/service/iam/api_op_SimulateCustomPolicy.go +++ b/service/iam/api_op_SimulateCustomPolicy.go @@ -369,12 +369,13 @@ func NewSimulateCustomPolicyPaginator(client SimulateCustomPolicyAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SimulateCustomPolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SimulateCustomPolicy page. @@ -401,7 +402,10 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iam/api_op_SimulatePrincipalPolicy.go b/service/iam/api_op_SimulatePrincipalPolicy.go index 78b97c0e9ad..ef5a0468b3e 100644 --- a/service/iam/api_op_SimulatePrincipalPolicy.go +++ b/service/iam/api_op_SimulatePrincipalPolicy.go @@ -386,12 +386,13 @@ func NewSimulatePrincipalPolicyPaginator(client SimulatePrincipalPolicyAPIClient client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SimulatePrincipalPolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SimulatePrincipalPolicy page. @@ -418,7 +419,10 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/identitystore/api_op_ListGroups.go b/service/identitystore/api_op_ListGroups.go index bf36d59d9ef..bafea3299aa 100644 --- a/service/identitystore/api_op_ListGroups.go +++ b/service/identitystore/api_op_ListGroups.go @@ -188,12 +188,13 @@ func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. @@ -220,7 +221,10 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/identitystore/api_op_ListUsers.go b/service/identitystore/api_op_ListUsers.go index 5679ddb86cf..9a5e74c3315 100644 --- a/service/identitystore/api_op_ListUsers.go +++ b/service/identitystore/api_op_ListUsers.go @@ -188,12 +188,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -220,7 +221,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListComponentBuildVersions.go b/service/imagebuilder/api_op_ListComponentBuildVersions.go index d405c1fa102..dd572263c75 100644 --- a/service/imagebuilder/api_op_ListComponentBuildVersions.go +++ b/service/imagebuilder/api_op_ListComponentBuildVersions.go @@ -184,12 +184,13 @@ func NewListComponentBuildVersionsPaginator(client ListComponentBuildVersionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentBuildVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponentBuildVersions page. @@ -212,7 +213,10 @@ func (p *ListComponentBuildVersionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListComponents.go b/service/imagebuilder/api_op_ListComponents.go index 03c95a42ae8..e70994fbea7 100644 --- a/service/imagebuilder/api_op_ListComponents.go +++ b/service/imagebuilder/api_op_ListComponents.go @@ -198,12 +198,13 @@ func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponents page. @@ -226,7 +227,10 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListContainerRecipes.go b/service/imagebuilder/api_op_ListContainerRecipes.go index be7aaffa42b..e4ae8b9c51d 100644 --- a/service/imagebuilder/api_op_ListContainerRecipes.go +++ b/service/imagebuilder/api_op_ListContainerRecipes.go @@ -185,12 +185,13 @@ func NewListContainerRecipesPaginator(client ListContainerRecipesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContainerRecipesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContainerRecipes page. @@ -213,7 +214,10 @@ func (p *ListContainerRecipesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListDistributionConfigurations.go b/service/imagebuilder/api_op_ListDistributionConfigurations.go index a8f437dac98..268a4dc51c9 100644 --- a/service/imagebuilder/api_op_ListDistributionConfigurations.go +++ b/service/imagebuilder/api_op_ListDistributionConfigurations.go @@ -172,12 +172,13 @@ func NewListDistributionConfigurationsPaginator(client ListDistributionConfigura client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDistributionConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDistributionConfigurations page. @@ -200,7 +201,10 @@ func (p *ListDistributionConfigurationsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListImageBuildVersions.go b/service/imagebuilder/api_op_ListImageBuildVersions.go index f1e5c30437e..ef6066796eb 100644 --- a/service/imagebuilder/api_op_ListImageBuildVersions.go +++ b/service/imagebuilder/api_op_ListImageBuildVersions.go @@ -190,12 +190,13 @@ func NewListImageBuildVersionsPaginator(client ListImageBuildVersionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImageBuildVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImageBuildVersions page. @@ -218,7 +219,10 @@ func (p *ListImageBuildVersionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListImagePackages.go b/service/imagebuilder/api_op_ListImagePackages.go index e36aaedfabf..b2d574a31cd 100644 --- a/service/imagebuilder/api_op_ListImagePackages.go +++ b/service/imagebuilder/api_op_ListImagePackages.go @@ -174,12 +174,13 @@ func NewListImagePackagesPaginator(client ListImagePackagesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImagePackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImagePackages page. @@ -202,7 +203,10 @@ func (p *ListImagePackagesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListImagePipelineImages.go b/service/imagebuilder/api_op_ListImagePipelineImages.go index 1387935a70e..b272ababd8c 100644 --- a/service/imagebuilder/api_op_ListImagePipelineImages.go +++ b/service/imagebuilder/api_op_ListImagePipelineImages.go @@ -184,12 +184,13 @@ func NewListImagePipelineImagesPaginator(client ListImagePipelineImagesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImagePipelineImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImagePipelineImages page. @@ -212,7 +213,10 @@ func (p *ListImagePipelineImagesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListImagePipelines.go b/service/imagebuilder/api_op_ListImagePipelines.go index 076aeb78c67..78da99779e0 100644 --- a/service/imagebuilder/api_op_ListImagePipelines.go +++ b/service/imagebuilder/api_op_ListImagePipelines.go @@ -184,12 +184,13 @@ func NewListImagePipelinesPaginator(client ListImagePipelinesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImagePipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImagePipelines page. @@ -212,7 +213,10 @@ func (p *ListImagePipelinesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListImageRecipes.go b/service/imagebuilder/api_op_ListImageRecipes.go index 8b950926436..d675cfea02f 100644 --- a/service/imagebuilder/api_op_ListImageRecipes.go +++ b/service/imagebuilder/api_op_ListImageRecipes.go @@ -182,12 +182,13 @@ func NewListImageRecipesPaginator(client ListImageRecipesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImageRecipesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImageRecipes page. @@ -210,7 +211,10 @@ func (p *ListImageRecipesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListImages.go b/service/imagebuilder/api_op_ListImages.go index c28186f933d..b0a29b24838 100644 --- a/service/imagebuilder/api_op_ListImages.go +++ b/service/imagebuilder/api_op_ListImages.go @@ -196,12 +196,13 @@ func NewListImagesPaginator(client ListImagesAPIClient, params *ListImagesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImages page. @@ -224,7 +225,10 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/imagebuilder/api_op_ListInfrastructureConfigurations.go b/service/imagebuilder/api_op_ListInfrastructureConfigurations.go index d59f967b3e1..92193c8adee 100644 --- a/service/imagebuilder/api_op_ListInfrastructureConfigurations.go +++ b/service/imagebuilder/api_op_ListInfrastructureConfigurations.go @@ -172,12 +172,13 @@ func NewListInfrastructureConfigurationsPaginator(client ListInfrastructureConfi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInfrastructureConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInfrastructureConfigurations page. @@ -200,7 +201,10 @@ func (p *ListInfrastructureConfigurationsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_GetExclusionsPreview.go b/service/inspector/api_op_GetExclusionsPreview.go index a29fff1b76b..dd84ee0384d 100644 --- a/service/inspector/api_op_GetExclusionsPreview.go +++ b/service/inspector/api_op_GetExclusionsPreview.go @@ -194,12 +194,13 @@ func NewGetExclusionsPreviewPaginator(client GetExclusionsPreviewAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetExclusionsPreviewPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetExclusionsPreview page. @@ -226,7 +227,10 @@ func (p *GetExclusionsPreviewPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListAssessmentRunAgents.go b/service/inspector/api_op_ListAssessmentRunAgents.go index 93b5de0ce61..0d2ca5cbb71 100644 --- a/service/inspector/api_op_ListAssessmentRunAgents.go +++ b/service/inspector/api_op_ListAssessmentRunAgents.go @@ -187,12 +187,13 @@ func NewListAssessmentRunAgentsPaginator(client ListAssessmentRunAgentsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentRunAgentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentRunAgents page. @@ -219,7 +220,10 @@ func (p *ListAssessmentRunAgentsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListAssessmentRuns.go b/service/inspector/api_op_ListAssessmentRuns.go index ecfd170b942..0c6fbf8a63e 100644 --- a/service/inspector/api_op_ListAssessmentRuns.go +++ b/service/inspector/api_op_ListAssessmentRuns.go @@ -183,12 +183,13 @@ func NewListAssessmentRunsPaginator(client ListAssessmentRunsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentRuns page. @@ -215,7 +216,10 @@ func (p *ListAssessmentRunsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListAssessmentTargets.go b/service/inspector/api_op_ListAssessmentTargets.go index 013f411d302..13131a58e2a 100644 --- a/service/inspector/api_op_ListAssessmentTargets.go +++ b/service/inspector/api_op_ListAssessmentTargets.go @@ -180,12 +180,13 @@ func NewListAssessmentTargetsPaginator(client ListAssessmentTargetsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentTargets page. @@ -212,7 +213,10 @@ func (p *ListAssessmentTargetsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListAssessmentTemplates.go b/service/inspector/api_op_ListAssessmentTemplates.go index 197d3a87d70..466356dcbd3 100644 --- a/service/inspector/api_op_ListAssessmentTemplates.go +++ b/service/inspector/api_op_ListAssessmentTemplates.go @@ -183,12 +183,13 @@ func NewListAssessmentTemplatesPaginator(client ListAssessmentTemplatesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssessmentTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssessmentTemplates page. @@ -215,7 +216,10 @@ func (p *ListAssessmentTemplatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListEventSubscriptions.go b/service/inspector/api_op_ListEventSubscriptions.go index 9091c96b7b3..193bf2e53ab 100644 --- a/service/inspector/api_op_ListEventSubscriptions.go +++ b/service/inspector/api_op_ListEventSubscriptions.go @@ -177,12 +177,13 @@ func NewListEventSubscriptionsPaginator(client ListEventSubscriptionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEventSubscriptions page. @@ -209,7 +210,10 @@ func (p *ListEventSubscriptionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListExclusions.go b/service/inspector/api_op_ListExclusions.go index 69133cfb065..47bc286ff40 100644 --- a/service/inspector/api_op_ListExclusions.go +++ b/service/inspector/api_op_ListExclusions.go @@ -178,12 +178,13 @@ func NewListExclusionsPaginator(client ListExclusionsAPIClient, params *ListExcl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExclusionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExclusions page. @@ -210,7 +211,10 @@ func (p *ListExclusionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListFindings.go b/service/inspector/api_op_ListFindings.go index d813552a105..9dd36bd7d0f 100644 --- a/service/inspector/api_op_ListFindings.go +++ b/service/inspector/api_op_ListFindings.go @@ -183,12 +183,13 @@ func NewListFindingsPaginator(client ListFindingsAPIClient, params *ListFindings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindings page. @@ -215,7 +216,10 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_ListRulesPackages.go b/service/inspector/api_op_ListRulesPackages.go index c9454507317..33c451cdc6b 100644 --- a/service/inspector/api_op_ListRulesPackages.go +++ b/service/inspector/api_op_ListRulesPackages.go @@ -169,12 +169,13 @@ func NewListRulesPackagesPaginator(client ListRulesPackagesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRulesPackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRulesPackages page. @@ -201,7 +202,10 @@ func (p *ListRulesPackagesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector/api_op_PreviewAgents.go b/service/inspector/api_op_PreviewAgents.go index 9b39bd3c53f..6069ce5742e 100644 --- a/service/inspector/api_op_PreviewAgents.go +++ b/service/inspector/api_op_PreviewAgents.go @@ -178,12 +178,13 @@ func NewPreviewAgentsPaginator(client PreviewAgentsAPIClient, params *PreviewAge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *PreviewAgentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next PreviewAgents page. @@ -210,7 +211,10 @@ func (p *PreviewAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListAccountPermissions.go b/service/inspector2/api_op_ListAccountPermissions.go index 7907dda909e..5eb41c0f830 100644 --- a/service/inspector2/api_op_ListAccountPermissions.go +++ b/service/inspector2/api_op_ListAccountPermissions.go @@ -173,12 +173,13 @@ func NewListAccountPermissionsPaginator(client ListAccountPermissionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountPermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountPermissions page. @@ -205,7 +206,10 @@ func (p *ListAccountPermissionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListCoverage.go b/service/inspector2/api_op_ListCoverage.go index 3adca99a8ba..a59d698ad3c 100644 --- a/service/inspector2/api_op_ListCoverage.go +++ b/service/inspector2/api_op_ListCoverage.go @@ -172,12 +172,13 @@ func NewListCoveragePaginator(client ListCoverageAPIClient, params *ListCoverage client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCoveragePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCoverage page. @@ -204,7 +205,10 @@ func (p *ListCoveragePaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListCoverageStatistics.go b/service/inspector2/api_op_ListCoverageStatistics.go index b7c0eb623ad..b0cf3d877f7 100644 --- a/service/inspector2/api_op_ListCoverageStatistics.go +++ b/service/inspector2/api_op_ListCoverageStatistics.go @@ -173,12 +173,13 @@ func NewListCoverageStatisticsPaginator(client ListCoverageStatisticsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCoverageStatisticsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCoverageStatistics page. @@ -199,7 +200,10 @@ func (p *ListCoverageStatisticsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListDelegatedAdminAccounts.go b/service/inspector2/api_op_ListDelegatedAdminAccounts.go index 6295587a2d5..cfc31608355 100644 --- a/service/inspector2/api_op_ListDelegatedAdminAccounts.go +++ b/service/inspector2/api_op_ListDelegatedAdminAccounts.go @@ -170,12 +170,13 @@ func NewListDelegatedAdminAccountsPaginator(client ListDelegatedAdminAccountsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDelegatedAdminAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDelegatedAdminAccounts page. @@ -202,7 +203,10 @@ func (p *ListDelegatedAdminAccountsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListFilters.go b/service/inspector2/api_op_ListFilters.go index b8af694141c..da4d3a59793 100644 --- a/service/inspector2/api_op_ListFilters.go +++ b/service/inspector2/api_op_ListFilters.go @@ -173,12 +173,13 @@ func NewListFiltersPaginator(client ListFiltersAPIClient, params *ListFiltersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFilters page. @@ -205,7 +206,10 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListFindingAggregations.go b/service/inspector2/api_op_ListFindingAggregations.go index c077f392c7a..cfe1f4a82a7 100644 --- a/service/inspector2/api_op_ListFindingAggregations.go +++ b/service/inspector2/api_op_ListFindingAggregations.go @@ -188,12 +188,13 @@ func NewListFindingAggregationsPaginator(client ListFindingAggregationsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingAggregationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindingAggregations page. @@ -220,7 +221,10 @@ func (p *ListFindingAggregationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListFindings.go b/service/inspector2/api_op_ListFindings.go index 8e43aced5e8..b6744090a9d 100644 --- a/service/inspector2/api_op_ListFindings.go +++ b/service/inspector2/api_op_ListFindings.go @@ -174,12 +174,13 @@ func NewListFindingsPaginator(client ListFindingsAPIClient, params *ListFindings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindings page. @@ -206,7 +207,10 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListMembers.go b/service/inspector2/api_op_ListMembers.go index d1c16c5ea83..e89acb27240 100644 --- a/service/inspector2/api_op_ListMembers.go +++ b/service/inspector2/api_op_ListMembers.go @@ -168,12 +168,13 @@ func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMembers page. @@ -200,7 +201,10 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/inspector2/api_op_ListUsageTotals.go b/service/inspector2/api_op_ListUsageTotals.go index b70c38ce075..f8c74a1d3b8 100644 --- a/service/inspector2/api_op_ListUsageTotals.go +++ b/service/inspector2/api_op_ListUsageTotals.go @@ -167,12 +167,13 @@ func NewListUsageTotalsPaginator(client ListUsageTotalsAPIClient, params *ListUs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsageTotalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsageTotals page. @@ -199,7 +200,10 @@ func (p *ListUsageTotalsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_GetBehaviorModelTrainingSummaries.go b/service/iot/api_op_GetBehaviorModelTrainingSummaries.go index 5075487bf4b..0106605c11f 100644 --- a/service/iot/api_op_GetBehaviorModelTrainingSummaries.go +++ b/service/iot/api_op_GetBehaviorModelTrainingSummaries.go @@ -171,12 +171,13 @@ func NewGetBehaviorModelTrainingSummariesPaginator(client GetBehaviorModelTraini client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBehaviorModelTrainingSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBehaviorModelTrainingSummaries page. @@ -203,7 +204,10 @@ func (p *GetBehaviorModelTrainingSummariesPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListActiveViolations.go b/service/iot/api_op_ListActiveViolations.go index 404641db345..765d6bc7001 100644 --- a/service/iot/api_op_ListActiveViolations.go +++ b/service/iot/api_op_ListActiveViolations.go @@ -181,12 +181,13 @@ func NewListActiveViolationsPaginator(client ListActiveViolationsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActiveViolationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActiveViolations page. @@ -213,7 +214,10 @@ func (p *ListActiveViolationsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAttachedPolicies.go b/service/iot/api_op_ListAttachedPolicies.go index e360b1f864f..8b36b490a1b 100644 --- a/service/iot/api_op_ListAttachedPolicies.go +++ b/service/iot/api_op_ListAttachedPolicies.go @@ -179,12 +179,13 @@ func NewListAttachedPoliciesPaginator(client ListAttachedPoliciesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttachedPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttachedPolicies page. @@ -211,7 +212,10 @@ func (p *ListAttachedPoliciesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAuditFindings.go b/service/iot/api_op_ListAuditFindings.go index 7f0cdb32cfa..23a267aa6aa 100644 --- a/service/iot/api_op_ListAuditFindings.go +++ b/service/iot/api_op_ListAuditFindings.go @@ -189,12 +189,13 @@ func NewListAuditFindingsPaginator(client ListAuditFindingsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAuditFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAuditFindings page. @@ -221,7 +222,10 @@ func (p *ListAuditFindingsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAuditMitigationActionsExecutions.go b/service/iot/api_op_ListAuditMitigationActionsExecutions.go index 44c6f35e275..3fcd5397e6f 100644 --- a/service/iot/api_op_ListAuditMitigationActionsExecutions.go +++ b/service/iot/api_op_ListAuditMitigationActionsExecutions.go @@ -185,12 +185,13 @@ func NewListAuditMitigationActionsExecutionsPaginator(client ListAuditMitigation client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAuditMitigationActionsExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAuditMitigationActionsExecutions page. @@ -217,7 +218,10 @@ func (p *ListAuditMitigationActionsExecutionsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAuditMitigationActionsTasks.go b/service/iot/api_op_ListAuditMitigationActionsTasks.go index 1a80db897b8..25b11907a74 100644 --- a/service/iot/api_op_ListAuditMitigationActionsTasks.go +++ b/service/iot/api_op_ListAuditMitigationActionsTasks.go @@ -193,12 +193,13 @@ func NewListAuditMitigationActionsTasksPaginator(client ListAuditMitigationActio client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAuditMitigationActionsTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAuditMitigationActionsTasks page. @@ -225,7 +226,10 @@ func (p *ListAuditMitigationActionsTasksPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAuditSuppressions.go b/service/iot/api_op_ListAuditSuppressions.go index f7509ecf8d6..649298741b8 100644 --- a/service/iot/api_op_ListAuditSuppressions.go +++ b/service/iot/api_op_ListAuditSuppressions.go @@ -178,12 +178,13 @@ func NewListAuditSuppressionsPaginator(client ListAuditSuppressionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAuditSuppressionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAuditSuppressions page. @@ -210,7 +211,10 @@ func (p *ListAuditSuppressionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAuditTasks.go b/service/iot/api_op_ListAuditTasks.go index 7e09a122dca..fd5f5032d0a 100644 --- a/service/iot/api_op_ListAuditTasks.go +++ b/service/iot/api_op_ListAuditTasks.go @@ -188,12 +188,13 @@ func NewListAuditTasksPaginator(client ListAuditTasksAPIClient, params *ListAudi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAuditTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAuditTasks page. @@ -220,7 +221,10 @@ func (p *ListAuditTasksPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListAuthorizers.go b/service/iot/api_op_ListAuthorizers.go index 372c9a0f1ff..b3c43e0bf4a 100644 --- a/service/iot/api_op_ListAuthorizers.go +++ b/service/iot/api_op_ListAuthorizers.go @@ -169,12 +169,13 @@ func NewListAuthorizersPaginator(client ListAuthorizersAPIClient, params *ListAu client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAuthorizersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAuthorizers page. @@ -201,7 +202,10 @@ func (p *ListAuthorizersPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListBillingGroups.go b/service/iot/api_op_ListBillingGroups.go index d5634ac0408..9740187ea4b 100644 --- a/service/iot/api_op_ListBillingGroups.go +++ b/service/iot/api_op_ListBillingGroups.go @@ -168,12 +168,13 @@ func NewListBillingGroupsPaginator(client ListBillingGroupsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBillingGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBillingGroups page. @@ -200,7 +201,10 @@ func (p *ListBillingGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListCACertificates.go b/service/iot/api_op_ListCACertificates.go index 07d21e0b129..00da2b69aa1 100644 --- a/service/iot/api_op_ListCACertificates.go +++ b/service/iot/api_op_ListCACertificates.go @@ -171,12 +171,13 @@ func NewListCACertificatesPaginator(client ListCACertificatesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCACertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCACertificates page. @@ -203,7 +204,10 @@ func (p *ListCACertificatesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListCertificates.go b/service/iot/api_op_ListCertificates.go index 608a14e757e..884d6b61495 100644 --- a/service/iot/api_op_ListCertificates.go +++ b/service/iot/api_op_ListCertificates.go @@ -172,12 +172,13 @@ func NewListCertificatesPaginator(client ListCertificatesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCertificates page. @@ -204,7 +205,10 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListCertificatesByCA.go b/service/iot/api_op_ListCertificatesByCA.go index 073532dcd3f..da8b1d1b217 100644 --- a/service/iot/api_op_ListCertificatesByCA.go +++ b/service/iot/api_op_ListCertificatesByCA.go @@ -180,12 +180,13 @@ func NewListCertificatesByCAPaginator(client ListCertificatesByCAAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCertificatesByCAPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCertificatesByCA page. @@ -212,7 +213,10 @@ func (p *ListCertificatesByCAPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListCustomMetrics.go b/service/iot/api_op_ListCustomMetrics.go index 3505e57e62b..58a97f1a210 100644 --- a/service/iot/api_op_ListCustomMetrics.go +++ b/service/iot/api_op_ListCustomMetrics.go @@ -163,12 +163,13 @@ func NewListCustomMetricsPaginator(client ListCustomMetricsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomMetricsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomMetrics page. @@ -195,7 +196,10 @@ func (p *ListCustomMetricsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListDetectMitigationActionsExecutions.go b/service/iot/api_op_ListDetectMitigationActionsExecutions.go index 7415b2ef12c..84e7455d791 100644 --- a/service/iot/api_op_ListDetectMitigationActionsExecutions.go +++ b/service/iot/api_op_ListDetectMitigationActionsExecutions.go @@ -185,12 +185,13 @@ func NewListDetectMitigationActionsExecutionsPaginator(client ListDetectMitigati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDetectMitigationActionsExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDetectMitigationActionsExecutions page. @@ -217,7 +218,10 @@ func (p *ListDetectMitigationActionsExecutionsPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListDetectMitigationActionsTasks.go b/service/iot/api_op_ListDetectMitigationActionsTasks.go index c0ee52057e7..e5ceebef18b 100644 --- a/service/iot/api_op_ListDetectMitigationActionsTasks.go +++ b/service/iot/api_op_ListDetectMitigationActionsTasks.go @@ -183,12 +183,13 @@ func NewListDetectMitigationActionsTasksPaginator(client ListDetectMitigationAct client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDetectMitigationActionsTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDetectMitigationActionsTasks page. @@ -215,7 +216,10 @@ func (p *ListDetectMitigationActionsTasksPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListDimensions.go b/service/iot/api_op_ListDimensions.go index 885cabc1748..28cff5374af 100644 --- a/service/iot/api_op_ListDimensions.go +++ b/service/iot/api_op_ListDimensions.go @@ -164,12 +164,13 @@ func NewListDimensionsPaginator(client ListDimensionsAPIClient, params *ListDime client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDimensionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDimensions page. @@ -196,7 +197,10 @@ func (p *ListDimensionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListDomainConfigurations.go b/service/iot/api_op_ListDomainConfigurations.go index 1d629a3e016..b18b37e9644 100644 --- a/service/iot/api_op_ListDomainConfigurations.go +++ b/service/iot/api_op_ListDomainConfigurations.go @@ -170,12 +170,13 @@ func NewListDomainConfigurationsPaginator(client ListDomainConfigurationsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomainConfigurations page. @@ -202,7 +203,10 @@ func (p *ListDomainConfigurationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListFleetMetrics.go b/service/iot/api_op_ListFleetMetrics.go index c973526af1b..43baf09e06c 100644 --- a/service/iot/api_op_ListFleetMetrics.go +++ b/service/iot/api_op_ListFleetMetrics.go @@ -164,12 +164,13 @@ func NewListFleetMetricsPaginator(client ListFleetMetricsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFleetMetricsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFleetMetrics page. @@ -196,7 +197,10 @@ func (p *ListFleetMetricsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListIndices.go b/service/iot/api_op_ListIndices.go index bbe274c61fd..d5744f2eaa2 100644 --- a/service/iot/api_op_ListIndices.go +++ b/service/iot/api_op_ListIndices.go @@ -162,12 +162,13 @@ func NewListIndicesPaginator(client ListIndicesAPIClient, params *ListIndicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIndicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIndices page. @@ -194,7 +195,10 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListJobExecutionsForJob.go b/service/iot/api_op_ListJobExecutionsForJob.go index 88844f3efba..99862337fe2 100644 --- a/service/iot/api_op_ListJobExecutionsForJob.go +++ b/service/iot/api_op_ListJobExecutionsForJob.go @@ -177,12 +177,13 @@ func NewListJobExecutionsForJobPaginator(client ListJobExecutionsForJobAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobExecutionsForJobPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobExecutionsForJob page. @@ -209,7 +210,10 @@ func (p *ListJobExecutionsForJobPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListJobExecutionsForThing.go b/service/iot/api_op_ListJobExecutionsForThing.go index 61fd4d0cec6..bafa69687fe 100644 --- a/service/iot/api_op_ListJobExecutionsForThing.go +++ b/service/iot/api_op_ListJobExecutionsForThing.go @@ -184,12 +184,13 @@ func NewListJobExecutionsForThingPaginator(client ListJobExecutionsForThingAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobExecutionsForThingPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobExecutionsForThing page. @@ -216,7 +217,10 @@ func (p *ListJobExecutionsForThingPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListJobTemplates.go b/service/iot/api_op_ListJobTemplates.go index 329ca85ca13..7c60a452115 100644 --- a/service/iot/api_op_ListJobTemplates.go +++ b/service/iot/api_op_ListJobTemplates.go @@ -164,12 +164,13 @@ func NewListJobTemplatesPaginator(client ListJobTemplatesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobTemplates page. @@ -196,7 +197,10 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListJobs.go b/service/iot/api_op_ListJobs.go index 223f0b6173b..e7079b6241f 100644 --- a/service/iot/api_op_ListJobs.go +++ b/service/iot/api_op_ListJobs.go @@ -186,12 +186,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -218,7 +219,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListMitigationActions.go b/service/iot/api_op_ListMitigationActions.go index 1b6a50b2703..92a5b917ac0 100644 --- a/service/iot/api_op_ListMitigationActions.go +++ b/service/iot/api_op_ListMitigationActions.go @@ -168,12 +168,13 @@ func NewListMitigationActionsPaginator(client ListMitigationActionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMitigationActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMitigationActions page. @@ -200,7 +201,10 @@ func (p *ListMitigationActionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListOTAUpdates.go b/service/iot/api_op_ListOTAUpdates.go index 81c8b90f6bc..5a0816a5890 100644 --- a/service/iot/api_op_ListOTAUpdates.go +++ b/service/iot/api_op_ListOTAUpdates.go @@ -165,12 +165,13 @@ func NewListOTAUpdatesPaginator(client ListOTAUpdatesAPIClient, params *ListOTAU client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOTAUpdatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOTAUpdates page. @@ -197,7 +198,10 @@ func (p *ListOTAUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListOutgoingCertificates.go b/service/iot/api_op_ListOutgoingCertificates.go index 6fda4fe3c3e..a829568c4a4 100644 --- a/service/iot/api_op_ListOutgoingCertificates.go +++ b/service/iot/api_op_ListOutgoingCertificates.go @@ -171,12 +171,13 @@ func NewListOutgoingCertificatesPaginator(client ListOutgoingCertificatesAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOutgoingCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOutgoingCertificates page. @@ -203,7 +204,10 @@ func (p *ListOutgoingCertificatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListPolicies.go b/service/iot/api_op_ListPolicies.go index e83d57cab2c..892cd339cf3 100644 --- a/service/iot/api_op_ListPolicies.go +++ b/service/iot/api_op_ListPolicies.go @@ -168,12 +168,13 @@ func NewListPoliciesPaginator(client ListPoliciesAPIClient, params *ListPolicies client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicies page. @@ -200,7 +201,10 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListPolicyPrincipals.go b/service/iot/api_op_ListPolicyPrincipals.go index 4a5ccb16501..d5804dd3265 100644 --- a/service/iot/api_op_ListPolicyPrincipals.go +++ b/service/iot/api_op_ListPolicyPrincipals.go @@ -181,12 +181,13 @@ func NewListPolicyPrincipalsPaginator(client ListPolicyPrincipalsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPolicyPrincipalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicyPrincipals page. @@ -213,7 +214,10 @@ func (p *ListPolicyPrincipalsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListPrincipalPolicies.go b/service/iot/api_op_ListPrincipalPolicies.go index 18f04d68ff9..399fdc6545b 100644 --- a/service/iot/api_op_ListPrincipalPolicies.go +++ b/service/iot/api_op_ListPrincipalPolicies.go @@ -186,12 +186,13 @@ func NewListPrincipalPoliciesPaginator(client ListPrincipalPoliciesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPrincipalPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPrincipalPolicies page. @@ -218,7 +219,10 @@ func (p *ListPrincipalPoliciesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListPrincipalThings.go b/service/iot/api_op_ListPrincipalThings.go index a3560d6d532..c5544550353 100644 --- a/service/iot/api_op_ListPrincipalThings.go +++ b/service/iot/api_op_ListPrincipalThings.go @@ -176,12 +176,13 @@ func NewListPrincipalThingsPaginator(client ListPrincipalThingsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPrincipalThingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPrincipalThings page. @@ -208,7 +209,10 @@ func (p *ListPrincipalThingsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListProvisioningTemplateVersions.go b/service/iot/api_op_ListProvisioningTemplateVersions.go index bb10d5df6f2..b70fde62166 100644 --- a/service/iot/api_op_ListProvisioningTemplateVersions.go +++ b/service/iot/api_op_ListProvisioningTemplateVersions.go @@ -174,12 +174,13 @@ func NewListProvisioningTemplateVersionsPaginator(client ListProvisioningTemplat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProvisioningTemplateVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProvisioningTemplateVersions page. @@ -206,7 +207,10 @@ func (p *ListProvisioningTemplateVersionsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListProvisioningTemplates.go b/service/iot/api_op_ListProvisioningTemplates.go index 1ded4cf598a..30e3c70c321 100644 --- a/service/iot/api_op_ListProvisioningTemplates.go +++ b/service/iot/api_op_ListProvisioningTemplates.go @@ -165,12 +165,13 @@ func NewListProvisioningTemplatesPaginator(client ListProvisioningTemplatesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProvisioningTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProvisioningTemplates page. @@ -197,7 +198,10 @@ func (p *ListProvisioningTemplatesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListRoleAliases.go b/service/iot/api_op_ListRoleAliases.go index bc976e577d6..1681fbe2e98 100644 --- a/service/iot/api_op_ListRoleAliases.go +++ b/service/iot/api_op_ListRoleAliases.go @@ -165,12 +165,13 @@ func NewListRoleAliasesPaginator(client ListRoleAliasesAPIClient, params *ListRo client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoleAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoleAliases page. @@ -197,7 +198,10 @@ func (p *ListRoleAliasesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListScheduledAudits.go b/service/iot/api_op_ListScheduledAudits.go index 702347a9e8f..2530829ead3 100644 --- a/service/iot/api_op_ListScheduledAudits.go +++ b/service/iot/api_op_ListScheduledAudits.go @@ -165,12 +165,13 @@ func NewListScheduledAuditsPaginator(client ListScheduledAuditsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListScheduledAuditsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListScheduledAudits page. @@ -197,7 +198,10 @@ func (p *ListScheduledAuditsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListSecurityProfiles.go b/service/iot/api_op_ListSecurityProfiles.go index eecfd6344bc..359c1b37812 100644 --- a/service/iot/api_op_ListSecurityProfiles.go +++ b/service/iot/api_op_ListSecurityProfiles.go @@ -173,12 +173,13 @@ func NewListSecurityProfilesPaginator(client ListSecurityProfilesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityProfiles page. @@ -205,7 +206,10 @@ func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListSecurityProfilesForTarget.go b/service/iot/api_op_ListSecurityProfilesForTarget.go index 9e71da517ff..fd0c58d5f61 100644 --- a/service/iot/api_op_ListSecurityProfilesForTarget.go +++ b/service/iot/api_op_ListSecurityProfilesForTarget.go @@ -179,12 +179,13 @@ func NewListSecurityProfilesForTargetPaginator(client ListSecurityProfilesForTar client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityProfilesForTargetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityProfilesForTarget page. @@ -211,7 +212,10 @@ func (p *ListSecurityProfilesForTargetPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListStreams.go b/service/iot/api_op_ListStreams.go index 339d01c6048..f3c81536755 100644 --- a/service/iot/api_op_ListStreams.go +++ b/service/iot/api_op_ListStreams.go @@ -165,12 +165,13 @@ func NewListStreamsPaginator(client ListStreamsAPIClient, params *ListStreamsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreams page. @@ -197,7 +198,10 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListTagsForResource.go b/service/iot/api_op_ListTagsForResource.go index 225c998aecc..c67f4b0fdc1 100644 --- a/service/iot/api_op_ListTagsForResource.go +++ b/service/iot/api_op_ListTagsForResource.go @@ -165,12 +165,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -191,7 +192,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListTargetsForPolicy.go b/service/iot/api_op_ListTargetsForPolicy.go index 8667f4890ed..8ddbcdc9de1 100644 --- a/service/iot/api_op_ListTargetsForPolicy.go +++ b/service/iot/api_op_ListTargetsForPolicy.go @@ -171,12 +171,13 @@ func NewListTargetsForPolicyPaginator(client ListTargetsForPolicyAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTargetsForPolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTargetsForPolicy page. @@ -203,7 +204,10 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListTargetsForSecurityProfile.go b/service/iot/api_op_ListTargetsForSecurityProfile.go index 6e4cd268706..35aa096910c 100644 --- a/service/iot/api_op_ListTargetsForSecurityProfile.go +++ b/service/iot/api_op_ListTargetsForSecurityProfile.go @@ -176,12 +176,13 @@ func NewListTargetsForSecurityProfilePaginator(client ListTargetsForSecurityProf client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTargetsForSecurityProfilePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTargetsForSecurityProfile page. @@ -208,7 +209,10 @@ func (p *ListTargetsForSecurityProfilePaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingGroups.go b/service/iot/api_op_ListThingGroups.go index 2530cea14e8..7dda2251a01 100644 --- a/service/iot/api_op_ListThingGroups.go +++ b/service/iot/api_op_ListThingGroups.go @@ -174,12 +174,13 @@ func NewListThingGroupsPaginator(client ListThingGroupsAPIClient, params *ListTh client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingGroups page. @@ -206,7 +207,10 @@ func (p *ListThingGroupsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingGroupsForThing.go b/service/iot/api_op_ListThingGroupsForThing.go index 82c494a8610..8e75668c680 100644 --- a/service/iot/api_op_ListThingGroupsForThing.go +++ b/service/iot/api_op_ListThingGroupsForThing.go @@ -175,12 +175,13 @@ func NewListThingGroupsForThingPaginator(client ListThingGroupsForThingAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingGroupsForThingPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingGroupsForThing page. @@ -207,7 +208,10 @@ func (p *ListThingGroupsForThingPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingPrincipals.go b/service/iot/api_op_ListThingPrincipals.go index e50f5695188..b65ea584bea 100644 --- a/service/iot/api_op_ListThingPrincipals.go +++ b/service/iot/api_op_ListThingPrincipals.go @@ -176,12 +176,13 @@ func NewListThingPrincipalsPaginator(client ListThingPrincipalsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingPrincipalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingPrincipals page. @@ -208,7 +209,10 @@ func (p *ListThingPrincipalsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingRegistrationTaskReports.go b/service/iot/api_op_ListThingRegistrationTaskReports.go index a164619180d..223f5b3d961 100644 --- a/service/iot/api_op_ListThingRegistrationTaskReports.go +++ b/service/iot/api_op_ListThingRegistrationTaskReports.go @@ -181,12 +181,13 @@ func NewListThingRegistrationTaskReportsPaginator(client ListThingRegistrationTa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingRegistrationTaskReportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingRegistrationTaskReports page. @@ -213,7 +214,10 @@ func (p *ListThingRegistrationTaskReportsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingRegistrationTasks.go b/service/iot/api_op_ListThingRegistrationTasks.go index 6f9091ffbc7..6e7d9b17caa 100644 --- a/service/iot/api_op_ListThingRegistrationTasks.go +++ b/service/iot/api_op_ListThingRegistrationTasks.go @@ -171,12 +171,13 @@ func NewListThingRegistrationTasksPaginator(client ListThingRegistrationTasksAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingRegistrationTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingRegistrationTasks page. @@ -203,7 +204,10 @@ func (p *ListThingRegistrationTasksPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingTypes.go b/service/iot/api_op_ListThingTypes.go index d0867dde5b5..c2f5be22c0f 100644 --- a/service/iot/api_op_ListThingTypes.go +++ b/service/iot/api_op_ListThingTypes.go @@ -169,12 +169,13 @@ func NewListThingTypesPaginator(client ListThingTypesAPIClient, params *ListThin client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingTypes page. @@ -201,7 +202,10 @@ func (p *ListThingTypesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThings.go b/service/iot/api_op_ListThings.go index 4b988c66703..4901cc5a551 100644 --- a/service/iot/api_op_ListThings.go +++ b/service/iot/api_op_ListThings.go @@ -185,12 +185,13 @@ func NewListThingsPaginator(client ListThingsAPIClient, params *ListThingsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThings page. @@ -217,7 +218,10 @@ func (p *ListThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingsInBillingGroup.go b/service/iot/api_op_ListThingsInBillingGroup.go index 77d8d63ff81..6cb1d3da6d8 100644 --- a/service/iot/api_op_ListThingsInBillingGroup.go +++ b/service/iot/api_op_ListThingsInBillingGroup.go @@ -174,12 +174,13 @@ func NewListThingsInBillingGroupPaginator(client ListThingsInBillingGroupAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingsInBillingGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingsInBillingGroup page. @@ -206,7 +207,10 @@ func (p *ListThingsInBillingGroupPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListThingsInThingGroup.go b/service/iot/api_op_ListThingsInThingGroup.go index 5a919464742..1524e36b10c 100644 --- a/service/iot/api_op_ListThingsInThingGroup.go +++ b/service/iot/api_op_ListThingsInThingGroup.go @@ -176,12 +176,13 @@ func NewListThingsInThingGroupPaginator(client ListThingsInThingGroupAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThingsInThingGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThingsInThingGroup page. @@ -208,7 +209,10 @@ func (p *ListThingsInThingGroupPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListTopicRuleDestinations.go b/service/iot/api_op_ListTopicRuleDestinations.go index 9dfee8bf510..ff52d80ad9f 100644 --- a/service/iot/api_op_ListTopicRuleDestinations.go +++ b/service/iot/api_op_ListTopicRuleDestinations.go @@ -167,12 +167,13 @@ func NewListTopicRuleDestinationsPaginator(client ListTopicRuleDestinationsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTopicRuleDestinationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTopicRuleDestinations page. @@ -199,7 +200,10 @@ func (p *ListTopicRuleDestinationsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListTopicRules.go b/service/iot/api_op_ListTopicRules.go index 9b5b03a27f0..62f552f4677 100644 --- a/service/iot/api_op_ListTopicRules.go +++ b/service/iot/api_op_ListTopicRules.go @@ -173,12 +173,13 @@ func NewListTopicRulesPaginator(client ListTopicRulesAPIClient, params *ListTopi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTopicRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTopicRules page. @@ -205,7 +206,10 @@ func (p *ListTopicRulesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListV2LoggingLevels.go b/service/iot/api_op_ListV2LoggingLevels.go index 90f6d7cc43c..3d298a344a8 100644 --- a/service/iot/api_op_ListV2LoggingLevels.go +++ b/service/iot/api_op_ListV2LoggingLevels.go @@ -168,12 +168,13 @@ func NewListV2LoggingLevelsPaginator(client ListV2LoggingLevelsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListV2LoggingLevelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListV2LoggingLevels page. @@ -200,7 +201,10 @@ func (p *ListV2LoggingLevelsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot/api_op_ListViolationEvents.go b/service/iot/api_op_ListViolationEvents.go index b10df8c3de3..035b8b3864d 100644 --- a/service/iot/api_op_ListViolationEvents.go +++ b/service/iot/api_op_ListViolationEvents.go @@ -199,12 +199,13 @@ func NewListViolationEventsPaginator(client ListViolationEventsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListViolationEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListViolationEvents page. @@ -231,7 +232,10 @@ func (p *ListViolationEventsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot1clickprojects/api_op_ListPlacements.go b/service/iot1clickprojects/api_op_ListPlacements.go index e09f632d6d3..8ae021dc804 100644 --- a/service/iot1clickprojects/api_op_ListPlacements.go +++ b/service/iot1clickprojects/api_op_ListPlacements.go @@ -173,12 +173,13 @@ func NewListPlacementsPaginator(client ListPlacementsAPIClient, params *ListPlac client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlacementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlacements page. @@ -205,7 +206,10 @@ func (p *ListPlacementsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iot1clickprojects/api_op_ListProjects.go b/service/iot1clickprojects/api_op_ListProjects.go index be6ec2c1ed2..b5f947df99c 100644 --- a/service/iot1clickprojects/api_op_ListProjects.go +++ b/service/iot1clickprojects/api_op_ListProjects.go @@ -165,12 +165,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -197,7 +198,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotanalytics/api_op_ListChannels.go b/service/iotanalytics/api_op_ListChannels.go index 1aac2a8438c..34da84f5e25 100644 --- a/service/iotanalytics/api_op_ListChannels.go +++ b/service/iotanalytics/api_op_ListChannels.go @@ -162,12 +162,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -194,7 +195,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotanalytics/api_op_ListDatasetContents.go b/service/iotanalytics/api_op_ListDatasetContents.go index 81dc1269ac7..d73292e3822 100644 --- a/service/iotanalytics/api_op_ListDatasetContents.go +++ b/service/iotanalytics/api_op_ListDatasetContents.go @@ -181,12 +181,13 @@ func NewListDatasetContentsPaginator(client ListDatasetContentsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetContentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetContents page. @@ -213,7 +214,10 @@ func (p *ListDatasetContentsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotanalytics/api_op_ListDatasets.go b/service/iotanalytics/api_op_ListDatasets.go index 95019038c25..995c08e1c43 100644 --- a/service/iotanalytics/api_op_ListDatasets.go +++ b/service/iotanalytics/api_op_ListDatasets.go @@ -162,12 +162,13 @@ func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasets page. @@ -194,7 +195,10 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotanalytics/api_op_ListDatastores.go b/service/iotanalytics/api_op_ListDatastores.go index bb68e5dd541..9bb459f8791 100644 --- a/service/iotanalytics/api_op_ListDatastores.go +++ b/service/iotanalytics/api_op_ListDatastores.go @@ -163,12 +163,13 @@ func NewListDatastoresPaginator(client ListDatastoresAPIClient, params *ListData client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatastoresPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatastores page. @@ -195,7 +196,10 @@ func (p *ListDatastoresPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotanalytics/api_op_ListPipelines.go b/service/iotanalytics/api_op_ListPipelines.go index 2724035c2f4..d94233d8d52 100644 --- a/service/iotanalytics/api_op_ListPipelines.go +++ b/service/iotanalytics/api_op_ListPipelines.go @@ -162,12 +162,13 @@ func NewListPipelinesPaginator(client ListPipelinesAPIClient, params *ListPipeli client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelines page. @@ -194,7 +195,10 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotdataplane/api_op_ListRetainedMessages.go b/service/iotdataplane/api_op_ListRetainedMessages.go index 617deaa9a76..e0e9a849009 100644 --- a/service/iotdataplane/api_op_ListRetainedMessages.go +++ b/service/iotdataplane/api_op_ListRetainedMessages.go @@ -174,12 +174,13 @@ func NewListRetainedMessagesPaginator(client ListRetainedMessagesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRetainedMessagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRetainedMessages page. @@ -202,7 +203,10 @@ func (p *ListRetainedMessagesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go b/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go index 06da430c244..7df7e9ebacd 100644 --- a/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go +++ b/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go @@ -165,12 +165,13 @@ func NewListSuiteDefinitionsPaginator(client ListSuiteDefinitionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSuiteDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSuiteDefinitions page. @@ -193,7 +194,10 @@ func (p *ListSuiteDefinitionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotdeviceadvisor/api_op_ListSuiteRuns.go b/service/iotdeviceadvisor/api_op_ListSuiteRuns.go index 4cf2f2fd31b..8abb47178a2 100644 --- a/service/iotdeviceadvisor/api_op_ListSuiteRuns.go +++ b/service/iotdeviceadvisor/api_op_ListSuiteRuns.go @@ -172,12 +172,13 @@ func NewListSuiteRunsPaginator(client ListSuiteRunsAPIClient, params *ListSuiteR client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSuiteRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSuiteRuns page. @@ -200,7 +201,10 @@ func (p *ListSuiteRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotfleethub/api_op_ListApplications.go b/service/iotfleethub/api_op_ListApplications.go index fece4d64c73..38d1ffa53b7 100644 --- a/service/iotfleethub/api_op_ListApplications.go +++ b/service/iotfleethub/api_op_ListApplications.go @@ -154,12 +154,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -180,7 +181,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsecuretunneling/api_op_ListTunnels.go b/service/iotsecuretunneling/api_op_ListTunnels.go index 6a4230a1d4f..d8c4eb01748 100644 --- a/service/iotsecuretunneling/api_op_ListTunnels.go +++ b/service/iotsecuretunneling/api_op_ListTunnels.go @@ -163,12 +163,13 @@ func NewListTunnelsPaginator(client ListTunnelsAPIClient, params *ListTunnelsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTunnelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTunnels page. @@ -191,7 +192,10 @@ func (p *ListTunnelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_GetAssetPropertyAggregates.go b/service/iotsitewise/api_op_GetAssetPropertyAggregates.go index 835307fd728..91b6beb073d 100644 --- a/service/iotsitewise/api_op_GetAssetPropertyAggregates.go +++ b/service/iotsitewise/api_op_GetAssetPropertyAggregates.go @@ -253,12 +253,13 @@ func NewGetAssetPropertyAggregatesPaginator(client GetAssetPropertyAggregatesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAssetPropertyAggregatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAssetPropertyAggregates page. @@ -285,7 +286,10 @@ func (p *GetAssetPropertyAggregatesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go b/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go index c6460bfd479..f3110cd8280 100644 --- a/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go +++ b/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go @@ -236,12 +236,13 @@ func NewGetAssetPropertyValueHistoryPaginator(client GetAssetPropertyValueHistor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAssetPropertyValueHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAssetPropertyValueHistory page. @@ -268,7 +269,10 @@ func (p *GetAssetPropertyValueHistoryPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go b/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go index 6b873462ac2..3703307ec26 100644 --- a/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go +++ b/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go @@ -306,12 +306,13 @@ func NewGetInterpolatedAssetPropertyValuesPaginator(client GetInterpolatedAssetP client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInterpolatedAssetPropertyValuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInterpolatedAssetPropertyValues page. @@ -338,7 +339,10 @@ func (p *GetInterpolatedAssetPropertyValuesPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListAccessPolicies.go b/service/iotsitewise/api_op_ListAccessPolicies.go index 97b11913a97..233054f0980 100644 --- a/service/iotsitewise/api_op_ListAccessPolicies.go +++ b/service/iotsitewise/api_op_ListAccessPolicies.go @@ -217,12 +217,13 @@ func NewListAccessPoliciesPaginator(client ListAccessPoliciesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessPolicies page. @@ -249,7 +250,10 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListAssetModels.go b/service/iotsitewise/api_op_ListAssetModels.go index 299a846bee5..68373d27c1f 100644 --- a/service/iotsitewise/api_op_ListAssetModels.go +++ b/service/iotsitewise/api_op_ListAssetModels.go @@ -193,12 +193,13 @@ func NewListAssetModelsPaginator(client ListAssetModelsAPIClient, params *ListAs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssetModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssetModels page. @@ -225,7 +226,10 @@ func (p *ListAssetModelsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListAssetRelationships.go b/service/iotsitewise/api_op_ListAssetRelationships.go index 532128e616d..26e6a0bb0b4 100644 --- a/service/iotsitewise/api_op_ListAssetRelationships.go +++ b/service/iotsitewise/api_op_ListAssetRelationships.go @@ -214,12 +214,13 @@ func NewListAssetRelationshipsPaginator(client ListAssetRelationshipsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssetRelationshipsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssetRelationships page. @@ -246,7 +247,10 @@ func (p *ListAssetRelationshipsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListAssets.go b/service/iotsitewise/api_op_ListAssets.go index b8b4a8a93ca..2c7aa429543 100644 --- a/service/iotsitewise/api_op_ListAssets.go +++ b/service/iotsitewise/api_op_ListAssets.go @@ -220,12 +220,13 @@ func NewListAssetsPaginator(client ListAssetsAPIClient, params *ListAssetsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssets page. @@ -252,7 +253,10 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListAssociatedAssets.go b/service/iotsitewise/api_op_ListAssociatedAssets.go index 0eb045ef322..f34fe2e209c 100644 --- a/service/iotsitewise/api_op_ListAssociatedAssets.go +++ b/service/iotsitewise/api_op_ListAssociatedAssets.go @@ -231,12 +231,13 @@ func NewListAssociatedAssetsPaginator(client ListAssociatedAssetsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociatedAssetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociatedAssets page. @@ -263,7 +264,10 @@ func (p *ListAssociatedAssetsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListDashboards.go b/service/iotsitewise/api_op_ListDashboards.go index 9536b0155a3..0d8c284515a 100644 --- a/service/iotsitewise/api_op_ListDashboards.go +++ b/service/iotsitewise/api_op_ListDashboards.go @@ -201,12 +201,13 @@ func NewListDashboardsPaginator(client ListDashboardsAPIClient, params *ListDash client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDashboardsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDashboards page. @@ -233,7 +234,10 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListGateways.go b/service/iotsitewise/api_op_ListGateways.go index 34a8b6407d7..5cdff52c7f7 100644 --- a/service/iotsitewise/api_op_ListGateways.go +++ b/service/iotsitewise/api_op_ListGateways.go @@ -192,12 +192,13 @@ func NewListGatewaysPaginator(client ListGatewaysAPIClient, params *ListGateways client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGateways page. @@ -224,7 +225,10 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListPortals.go b/service/iotsitewise/api_op_ListPortals.go index 9960ce5d60c..87a4f32dcbe 100644 --- a/service/iotsitewise/api_op_ListPortals.go +++ b/service/iotsitewise/api_op_ListPortals.go @@ -190,12 +190,13 @@ func NewListPortalsPaginator(client ListPortalsAPIClient, params *ListPortalsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPortalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPortals page. @@ -222,7 +223,10 @@ func (p *ListPortalsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListProjectAssets.go b/service/iotsitewise/api_op_ListProjectAssets.go index 86bc4c18f83..4ce2d1ed998 100644 --- a/service/iotsitewise/api_op_ListProjectAssets.go +++ b/service/iotsitewise/api_op_ListProjectAssets.go @@ -201,12 +201,13 @@ func NewListProjectAssetsPaginator(client ListProjectAssetsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectAssetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjectAssets page. @@ -233,7 +234,10 @@ func (p *ListProjectAssetsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListProjects.go b/service/iotsitewise/api_op_ListProjects.go index b83c7f583ce..f5e8f223e60 100644 --- a/service/iotsitewise/api_op_ListProjects.go +++ b/service/iotsitewise/api_op_ListProjects.go @@ -200,12 +200,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -232,7 +233,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotsitewise/api_op_ListTimeSeries.go b/service/iotsitewise/api_op_ListTimeSeries.go index c3cb86be5a1..7364648d74f 100644 --- a/service/iotsitewise/api_op_ListTimeSeries.go +++ b/service/iotsitewise/api_op_ListTimeSeries.go @@ -208,12 +208,13 @@ func NewListTimeSeriesPaginator(client ListTimeSeriesAPIClient, params *ListTime client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTimeSeriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTimeSeries page. @@ -240,7 +241,10 @@ func (p *ListTimeSeriesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go b/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go index 61d8bccea12..01a918fad5a 100644 --- a/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go +++ b/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go @@ -175,12 +175,13 @@ func NewGetFlowTemplateRevisionsPaginator(client GetFlowTemplateRevisionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetFlowTemplateRevisionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetFlowTemplateRevisions page. @@ -207,7 +208,10 @@ func (p *GetFlowTemplateRevisionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go b/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go index 43f23578d7d..8328ad7bbba 100644 --- a/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go +++ b/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go @@ -177,12 +177,13 @@ func NewGetSystemTemplateRevisionsPaginator(client GetSystemTemplateRevisionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSystemTemplateRevisionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSystemTemplateRevisions page. @@ -209,7 +210,10 @@ func (p *GetSystemTemplateRevisionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go b/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go index 89985c54861..60242d27f39 100644 --- a/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go +++ b/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go @@ -173,12 +173,13 @@ func NewListFlowExecutionMessagesPaginator(client ListFlowExecutionMessagesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFlowExecutionMessagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFlowExecutionMessages page. @@ -205,7 +206,10 @@ func (p *ListFlowExecutionMessagesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_ListTagsForResource.go b/service/iotthingsgraph/api_op_ListTagsForResource.go index 35867cb7d91..a92b6f91978 100644 --- a/service/iotthingsgraph/api_op_ListTagsForResource.go +++ b/service/iotthingsgraph/api_op_ListTagsForResource.go @@ -169,12 +169,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -201,7 +202,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_SearchEntities.go b/service/iotthingsgraph/api_op_SearchEntities.go index 4a9a31f182f..cf08b842065 100644 --- a/service/iotthingsgraph/api_op_SearchEntities.go +++ b/service/iotthingsgraph/api_op_SearchEntities.go @@ -182,12 +182,13 @@ func NewSearchEntitiesPaginator(client SearchEntitiesAPIClient, params *SearchEn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchEntitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchEntities page. @@ -214,7 +215,10 @@ func (p *SearchEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_SearchFlowExecutions.go b/service/iotthingsgraph/api_op_SearchFlowExecutions.go index b60a542f794..ea3605e540d 100644 --- a/service/iotthingsgraph/api_op_SearchFlowExecutions.go +++ b/service/iotthingsgraph/api_op_SearchFlowExecutions.go @@ -181,12 +181,13 @@ func NewSearchFlowExecutionsPaginator(client SearchFlowExecutionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchFlowExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchFlowExecutions page. @@ -213,7 +214,10 @@ func (p *SearchFlowExecutionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_SearchFlowTemplates.go b/service/iotthingsgraph/api_op_SearchFlowTemplates.go index 1db08031145..89425c203ff 100644 --- a/service/iotthingsgraph/api_op_SearchFlowTemplates.go +++ b/service/iotthingsgraph/api_op_SearchFlowTemplates.go @@ -170,12 +170,13 @@ func NewSearchFlowTemplatesPaginator(client SearchFlowTemplatesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchFlowTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchFlowTemplates page. @@ -202,7 +203,10 @@ func (p *SearchFlowTemplatesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_SearchSystemInstances.go b/service/iotthingsgraph/api_op_SearchSystemInstances.go index 127c276a7cb..d12f21c0a0b 100644 --- a/service/iotthingsgraph/api_op_SearchSystemInstances.go +++ b/service/iotthingsgraph/api_op_SearchSystemInstances.go @@ -168,12 +168,13 @@ func NewSearchSystemInstancesPaginator(client SearchSystemInstancesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchSystemInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchSystemInstances page. @@ -200,7 +201,10 @@ func (p *SearchSystemInstancesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_SearchSystemTemplates.go b/service/iotthingsgraph/api_op_SearchSystemTemplates.go index 01209c3c162..59562ba363e 100644 --- a/service/iotthingsgraph/api_op_SearchSystemTemplates.go +++ b/service/iotthingsgraph/api_op_SearchSystemTemplates.go @@ -172,12 +172,13 @@ func NewSearchSystemTemplatesPaginator(client SearchSystemTemplatesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchSystemTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchSystemTemplates page. @@ -204,7 +205,10 @@ func (p *SearchSystemTemplatesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotthingsgraph/api_op_SearchThings.go b/service/iotthingsgraph/api_op_SearchThings.go index 2f60fe67868..da12e4c283e 100644 --- a/service/iotthingsgraph/api_op_SearchThings.go +++ b/service/iotthingsgraph/api_op_SearchThings.go @@ -178,12 +178,13 @@ func NewSearchThingsPaginator(client SearchThingsAPIClient, params *SearchThings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchThingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchThings page. @@ -210,7 +211,10 @@ func (p *SearchThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iottwinmaker/api_op_GetPropertyValueHistory.go b/service/iottwinmaker/api_op_GetPropertyValueHistory.go index 423d5b1e9c3..5fb965a7caf 100644 --- a/service/iottwinmaker/api_op_GetPropertyValueHistory.go +++ b/service/iottwinmaker/api_op_GetPropertyValueHistory.go @@ -241,12 +241,13 @@ func NewGetPropertyValueHistoryPaginator(client GetPropertyValueHistoryAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetPropertyValueHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetPropertyValueHistory page. @@ -273,7 +274,10 @@ func (p *GetPropertyValueHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iottwinmaker/api_op_ListComponentTypes.go b/service/iottwinmaker/api_op_ListComponentTypes.go index 0049217d51b..85e5c0b2e87 100644 --- a/service/iottwinmaker/api_op_ListComponentTypes.go +++ b/service/iottwinmaker/api_op_ListComponentTypes.go @@ -212,12 +212,13 @@ func NewListComponentTypesPaginator(client ListComponentTypesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComponentTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComponentTypes page. @@ -244,7 +245,10 @@ func (p *ListComponentTypesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iottwinmaker/api_op_ListEntities.go b/service/iottwinmaker/api_op_ListEntities.go index a2c7f87356c..284faace663 100644 --- a/service/iottwinmaker/api_op_ListEntities.go +++ b/service/iottwinmaker/api_op_ListEntities.go @@ -200,12 +200,13 @@ func NewListEntitiesPaginator(client ListEntitiesAPIClient, params *ListEntities client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntities page. @@ -232,7 +233,10 @@ func (p *ListEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iottwinmaker/api_op_ListScenes.go b/service/iottwinmaker/api_op_ListScenes.go index 6da858d4a21..e15a4cc9188 100644 --- a/service/iottwinmaker/api_op_ListScenes.go +++ b/service/iottwinmaker/api_op_ListScenes.go @@ -197,12 +197,13 @@ func NewListScenesPaginator(client ListScenesAPIClient, params *ListScenesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListScenesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListScenes page. @@ -229,7 +230,10 @@ func (p *ListScenesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iottwinmaker/api_op_ListWorkspaces.go b/service/iottwinmaker/api_op_ListWorkspaces.go index 5da4ada376b..c9cd8c684a5 100644 --- a/service/iottwinmaker/api_op_ListWorkspaces.go +++ b/service/iottwinmaker/api_op_ListWorkspaces.go @@ -190,12 +190,13 @@ func NewListWorkspacesPaginator(client ListWorkspacesAPIClient, params *ListWork client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkspacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkspaces page. @@ -222,7 +223,10 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListDestinations.go b/service/iotwireless/api_op_ListDestinations.go index c219be0bc5e..71c12114107 100644 --- a/service/iotwireless/api_op_ListDestinations.go +++ b/service/iotwireless/api_op_ListDestinations.go @@ -162,12 +162,13 @@ func NewListDestinationsPaginator(client ListDestinationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDestinationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDestinations page. @@ -190,7 +191,10 @@ func (p *ListDestinationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListDeviceProfiles.go b/service/iotwireless/api_op_ListDeviceProfiles.go index 19e6f892441..f594bc4d981 100644 --- a/service/iotwireless/api_op_ListDeviceProfiles.go +++ b/service/iotwireless/api_op_ListDeviceProfiles.go @@ -163,12 +163,13 @@ func NewListDeviceProfilesPaginator(client ListDeviceProfilesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeviceProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeviceProfiles page. @@ -191,7 +192,10 @@ func (p *ListDeviceProfilesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListFuotaTasks.go b/service/iotwireless/api_op_ListFuotaTasks.go index 68f8e1134fd..fb08f423165 100644 --- a/service/iotwireless/api_op_ListFuotaTasks.go +++ b/service/iotwireless/api_op_ListFuotaTasks.go @@ -162,12 +162,13 @@ func NewListFuotaTasksPaginator(client ListFuotaTasksAPIClient, params *ListFuot client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFuotaTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFuotaTasks page. @@ -190,7 +191,10 @@ func (p *ListFuotaTasksPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListMulticastGroups.go b/service/iotwireless/api_op_ListMulticastGroups.go index aee565aeb45..8d6624ac633 100644 --- a/service/iotwireless/api_op_ListMulticastGroups.go +++ b/service/iotwireless/api_op_ListMulticastGroups.go @@ -163,12 +163,13 @@ func NewListMulticastGroupsPaginator(client ListMulticastGroupsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMulticastGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMulticastGroups page. @@ -191,7 +192,10 @@ func (p *ListMulticastGroupsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go b/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go index e76f503a3b7..609d4d36a73 100644 --- a/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go +++ b/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go @@ -173,12 +173,13 @@ func NewListMulticastGroupsByFuotaTaskPaginator(client ListMulticastGroupsByFuot client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMulticastGroupsByFuotaTaskPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMulticastGroupsByFuotaTask page. @@ -201,7 +202,10 @@ func (p *ListMulticastGroupsByFuotaTaskPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListServiceProfiles.go b/service/iotwireless/api_op_ListServiceProfiles.go index a357a1feeeb..0527618eaf8 100644 --- a/service/iotwireless/api_op_ListServiceProfiles.go +++ b/service/iotwireless/api_op_ListServiceProfiles.go @@ -163,12 +163,13 @@ func NewListServiceProfilesPaginator(client ListServiceProfilesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceProfiles page. @@ -191,7 +192,10 @@ func (p *ListServiceProfilesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListWirelessDevices.go b/service/iotwireless/api_op_ListWirelessDevices.go index 16a0c2b8936..cc03c515063 100644 --- a/service/iotwireless/api_op_ListWirelessDevices.go +++ b/service/iotwireless/api_op_ListWirelessDevices.go @@ -181,12 +181,13 @@ func NewListWirelessDevicesPaginator(client ListWirelessDevicesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWirelessDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWirelessDevices page. @@ -209,7 +210,10 @@ func (p *ListWirelessDevicesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/iotwireless/api_op_ListWirelessGateways.go b/service/iotwireless/api_op_ListWirelessGateways.go index 5e9ca455e4f..71a17746ee9 100644 --- a/service/iotwireless/api_op_ListWirelessGateways.go +++ b/service/iotwireless/api_op_ListWirelessGateways.go @@ -163,12 +163,13 @@ func NewListWirelessGatewaysPaginator(client ListWirelessGatewaysAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWirelessGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWirelessGateways page. @@ -191,7 +192,10 @@ func (p *ListWirelessGatewaysPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ivs/api_op_ListChannels.go b/service/ivs/api_op_ListChannels.go index 2ad07f00cbd..31c74a602ae 100644 --- a/service/ivs/api_op_ListChannels.go +++ b/service/ivs/api_op_ListChannels.go @@ -173,12 +173,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -201,7 +202,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ivs/api_op_ListPlaybackKeyPairs.go b/service/ivs/api_op_ListPlaybackKeyPairs.go index 218737780c5..c5f12b9f589 100644 --- a/service/ivs/api_op_ListPlaybackKeyPairs.go +++ b/service/ivs/api_op_ListPlaybackKeyPairs.go @@ -169,12 +169,13 @@ func NewListPlaybackKeyPairsPaginator(client ListPlaybackKeyPairsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlaybackKeyPairsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlaybackKeyPairs page. @@ -197,7 +198,10 @@ func (p *ListPlaybackKeyPairsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ivs/api_op_ListRecordingConfigurations.go b/service/ivs/api_op_ListRecordingConfigurations.go index 408c60e6411..e9719290973 100644 --- a/service/ivs/api_op_ListRecordingConfigurations.go +++ b/service/ivs/api_op_ListRecordingConfigurations.go @@ -168,12 +168,13 @@ func NewListRecordingConfigurationsPaginator(client ListRecordingConfigurationsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecordingConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecordingConfigurations page. @@ -196,7 +197,10 @@ func (p *ListRecordingConfigurationsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ivs/api_op_ListStreamKeys.go b/service/ivs/api_op_ListStreamKeys.go index b26550ccf28..a869a283712 100644 --- a/service/ivs/api_op_ListStreamKeys.go +++ b/service/ivs/api_op_ListStreamKeys.go @@ -172,12 +172,13 @@ func NewListStreamKeysPaginator(client ListStreamKeysAPIClient, params *ListStre client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamKeys page. @@ -200,7 +201,10 @@ func (p *ListStreamKeysPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ivs/api_op_ListStreamSessions.go b/service/ivs/api_op_ListStreamSessions.go index b41dbfba2d4..605d702011d 100644 --- a/service/ivs/api_op_ListStreamSessions.go +++ b/service/ivs/api_op_ListStreamSessions.go @@ -174,12 +174,13 @@ func NewListStreamSessionsPaginator(client ListStreamSessionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamSessions page. @@ -202,7 +203,10 @@ func (p *ListStreamSessionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ivs/api_op_ListStreams.go b/service/ivs/api_op_ListStreams.go index e9364733222..f05a20964f4 100644 --- a/service/ivs/api_op_ListStreams.go +++ b/service/ivs/api_op_ListStreams.go @@ -167,12 +167,13 @@ func NewListStreamsPaginator(client ListStreamsAPIClient, params *ListStreamsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreams page. @@ -195,7 +196,10 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListClusterOperations.go b/service/kafka/api_op_ListClusterOperations.go index 98915bfdf85..eb786d1c3ea 100644 --- a/service/kafka/api_op_ListClusterOperations.go +++ b/service/kafka/api_op_ListClusterOperations.go @@ -176,12 +176,13 @@ func NewListClusterOperationsPaginator(client ListClusterOperationsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClusterOperationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClusterOperations page. @@ -204,7 +205,10 @@ func (p *ListClusterOperationsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListClusters.go b/service/kafka/api_op_ListClusters.go index 7e61f28c6c1..dae4c15ea2f 100644 --- a/service/kafka/api_op_ListClusters.go +++ b/service/kafka/api_op_ListClusters.go @@ -169,12 +169,13 @@ func NewListClustersPaginator(client ListClustersAPIClient, params *ListClusters client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClusters page. @@ -197,7 +198,10 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListClustersV2.go b/service/kafka/api_op_ListClustersV2.go index 7d3fee20c70..2599cda03fb 100644 --- a/service/kafka/api_op_ListClustersV2.go +++ b/service/kafka/api_op_ListClustersV2.go @@ -173,12 +173,13 @@ func NewListClustersV2Paginator(client ListClustersV2APIClient, params *ListClus client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClustersV2Paginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClustersV2 page. @@ -201,7 +202,10 @@ func (p *ListClustersV2Paginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListConfigurationRevisions.go b/service/kafka/api_op_ListConfigurationRevisions.go index c169af6132a..ddb82ec79ff 100644 --- a/service/kafka/api_op_ListConfigurationRevisions.go +++ b/service/kafka/api_op_ListConfigurationRevisions.go @@ -176,12 +176,13 @@ func NewListConfigurationRevisionsPaginator(client ListConfigurationRevisionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigurationRevisionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigurationRevisions page. @@ -204,7 +205,10 @@ func (p *ListConfigurationRevisionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListConfigurations.go b/service/kafka/api_op_ListConfigurations.go index 93cbdf99c95..a9fbb91d3d3 100644 --- a/service/kafka/api_op_ListConfigurations.go +++ b/service/kafka/api_op_ListConfigurations.go @@ -167,12 +167,13 @@ func NewListConfigurationsPaginator(client ListConfigurationsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigurations page. @@ -195,7 +196,10 @@ func (p *ListConfigurationsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListKafkaVersions.go b/service/kafka/api_op_ListKafkaVersions.go index 633b8f33584..fd10808d3ab 100644 --- a/service/kafka/api_op_ListKafkaVersions.go +++ b/service/kafka/api_op_ListKafkaVersions.go @@ -161,12 +161,13 @@ func NewListKafkaVersionsPaginator(client ListKafkaVersionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKafkaVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKafkaVersions page. @@ -189,7 +190,10 @@ func (p *ListKafkaVersionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListNodes.go b/service/kafka/api_op_ListNodes.go index 4e9dab33edf..b078006c4f5 100644 --- a/service/kafka/api_op_ListNodes.go +++ b/service/kafka/api_op_ListNodes.go @@ -173,12 +173,13 @@ func NewListNodesPaginator(client ListNodesAPIClient, params *ListNodesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNodesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNodes page. @@ -201,7 +202,10 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafka/api_op_ListScramSecrets.go b/service/kafka/api_op_ListScramSecrets.go index 045259eb348..674d76f3f01 100644 --- a/service/kafka/api_op_ListScramSecrets.go +++ b/service/kafka/api_op_ListScramSecrets.go @@ -167,12 +167,13 @@ func NewListScramSecretsPaginator(client ListScramSecretsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListScramSecretsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListScramSecrets page. @@ -195,7 +196,10 @@ func (p *ListScramSecretsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafkaconnect/api_op_ListConnectors.go b/service/kafkaconnect/api_op_ListConnectors.go index 0634546d709..d9eb61a14c9 100644 --- a/service/kafkaconnect/api_op_ListConnectors.go +++ b/service/kafkaconnect/api_op_ListConnectors.go @@ -169,12 +169,13 @@ func NewListConnectorsPaginator(client ListConnectorsAPIClient, params *ListConn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConnectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConnectors page. @@ -197,7 +198,10 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafkaconnect/api_op_ListCustomPlugins.go b/service/kafkaconnect/api_op_ListCustomPlugins.go index 84ea6eeac6d..7acaefe5926 100644 --- a/service/kafkaconnect/api_op_ListCustomPlugins.go +++ b/service/kafkaconnect/api_op_ListCustomPlugins.go @@ -164,12 +164,13 @@ func NewListCustomPluginsPaginator(client ListCustomPluginsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomPluginsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomPlugins page. @@ -192,7 +193,10 @@ func (p *ListCustomPluginsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kafkaconnect/api_op_ListWorkerConfigurations.go b/service/kafkaconnect/api_op_ListWorkerConfigurations.go index f8050bbb617..091ac7b340d 100644 --- a/service/kafkaconnect/api_op_ListWorkerConfigurations.go +++ b/service/kafkaconnect/api_op_ListWorkerConfigurations.go @@ -166,12 +166,13 @@ func NewListWorkerConfigurationsPaginator(client ListWorkerConfigurationsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkerConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkerConfigurations page. @@ -194,7 +195,10 @@ func (p *ListWorkerConfigurationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kendra/api_op_ListDataSourceSyncJobs.go b/service/kendra/api_op_ListDataSourceSyncJobs.go index 12408c694ec..25c15883495 100644 --- a/service/kendra/api_op_ListDataSourceSyncJobs.go +++ b/service/kendra/api_op_ListDataSourceSyncJobs.go @@ -187,12 +187,13 @@ func NewListDataSourceSyncJobsPaginator(client ListDataSourceSyncJobsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSourceSyncJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSourceSyncJobs page. @@ -219,7 +220,10 @@ func (p *ListDataSourceSyncJobsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kendra/api_op_ListDataSources.go b/service/kendra/api_op_ListDataSources.go index 1c5f8e97cc5..866786147ea 100644 --- a/service/kendra/api_op_ListDataSources.go +++ b/service/kendra/api_op_ListDataSources.go @@ -172,12 +172,13 @@ func NewListDataSourcesPaginator(client ListDataSourcesAPIClient, params *ListDa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSources page. @@ -204,7 +205,10 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kendra/api_op_ListEntityPersonas.go b/service/kendra/api_op_ListEntityPersonas.go index 373215770e4..edc017807bf 100644 --- a/service/kendra/api_op_ListEntityPersonas.go +++ b/service/kendra/api_op_ListEntityPersonas.go @@ -178,12 +178,13 @@ func NewListEntityPersonasPaginator(client ListEntityPersonasAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntityPersonasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntityPersonas page. @@ -210,7 +211,10 @@ func (p *ListEntityPersonasPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kendra/api_op_ListExperienceEntities.go b/service/kendra/api_op_ListExperienceEntities.go index 05115dfc7de..2bf5fbdaa2c 100644 --- a/service/kendra/api_op_ListExperienceEntities.go +++ b/service/kendra/api_op_ListExperienceEntities.go @@ -172,12 +172,13 @@ func NewListExperienceEntitiesPaginator(client ListExperienceEntitiesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperienceEntitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperienceEntities page. @@ -198,7 +199,10 @@ func (p *ListExperienceEntitiesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kendra/api_op_ListExperiences.go b/service/kendra/api_op_ListExperiences.go index 7cb4b1a36f3..efa38d4ac3c 100644 --- a/service/kendra/api_op_ListExperiences.go +++ b/service/kendra/api_op_ListExperiences.go @@ -174,12 +174,13 @@ func NewListExperiencesPaginator(client ListExperiencesAPIClient, params *ListEx client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperiencesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperiences page. @@ -206,7 +207,10 @@ func (p *ListExperiencesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kendra/api_op_ListIndices.go b/service/kendra/api_op_ListIndices.go index b948e7f7791..9c1422590a6 100644 --- a/service/kendra/api_op_ListIndices.go +++ b/service/kendra/api_op_ListIndices.go @@ -163,12 +163,13 @@ func NewListIndicesPaginator(client ListIndicesAPIClient, params *ListIndicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIndicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIndices page. @@ -195,7 +196,10 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kinesis/api_op_ListStreamConsumers.go b/service/kinesis/api_op_ListStreamConsumers.go index 29649b9a5b8..63067d27665 100644 --- a/service/kinesis/api_op_ListStreamConsumers.go +++ b/service/kinesis/api_op_ListStreamConsumers.go @@ -212,12 +212,13 @@ func NewListStreamConsumersPaginator(client ListStreamConsumersAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamConsumersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamConsumers page. @@ -244,7 +245,10 @@ func (p *ListStreamConsumersPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kinesisvideo/api_op_ListSignalingChannels.go b/service/kinesisvideo/api_op_ListSignalingChannels.go index aea35077a22..ff2da067305 100644 --- a/service/kinesisvideo/api_op_ListSignalingChannels.go +++ b/service/kinesisvideo/api_op_ListSignalingChannels.go @@ -169,12 +169,13 @@ func NewListSignalingChannelsPaginator(client ListSignalingChannelsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSignalingChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSignalingChannels page. @@ -201,7 +202,10 @@ func (p *ListSignalingChannelsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kinesisvideo/api_op_ListStreams.go b/service/kinesisvideo/api_op_ListStreams.go index 47bcd0d7d2a..05e8ae8c9e8 100644 --- a/service/kinesisvideo/api_op_ListStreams.go +++ b/service/kinesisvideo/api_op_ListStreams.go @@ -168,12 +168,13 @@ func NewListStreamsPaginator(client ListStreamsAPIClient, params *ListStreamsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreams page. @@ -200,7 +201,10 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kms/api_op_ListAliases.go b/service/kms/api_op_ListAliases.go index c982a894b9f..10f9345036c 100644 --- a/service/kms/api_op_ListAliases.go +++ b/service/kms/api_op_ListAliases.go @@ -217,12 +217,13 @@ func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInp client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAliases page. @@ -249,7 +250,10 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kms/api_op_ListGrants.go b/service/kms/api_op_ListGrants.go index ee554a2cac3..de57141924f 100644 --- a/service/kms/api_op_ListGrants.go +++ b/service/kms/api_op_ListGrants.go @@ -230,12 +230,13 @@ func NewListGrantsPaginator(client ListGrantsAPIClient, params *ListGrantsInput, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGrantsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGrants page. @@ -262,7 +263,10 @@ func (p *ListGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kms/api_op_ListKeyPolicies.go b/service/kms/api_op_ListKeyPolicies.go index 00a7c0800f5..a6c31313e38 100644 --- a/service/kms/api_op_ListKeyPolicies.go +++ b/service/kms/api_op_ListKeyPolicies.go @@ -204,12 +204,13 @@ func NewListKeyPoliciesPaginator(client ListKeyPoliciesAPIClient, params *ListKe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKeyPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKeyPolicies page. @@ -236,7 +237,10 @@ func (p *ListKeyPoliciesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/kms/api_op_ListKeys.go b/service/kms/api_op_ListKeys.go index 81f0c75f58b..c554f536e11 100644 --- a/service/kms/api_op_ListKeys.go +++ b/service/kms/api_op_ListKeys.go @@ -189,12 +189,13 @@ func NewListKeysPaginator(client ListKeysAPIClient, params *ListKeysInput, optFn client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKeys page. @@ -221,7 +222,10 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_GetEffectivePermissionsForPath.go b/service/lakeformation/api_op_GetEffectivePermissionsForPath.go index e605a20dc44..99f3d7cf62d 100644 --- a/service/lakeformation/api_op_GetEffectivePermissionsForPath.go +++ b/service/lakeformation/api_op_GetEffectivePermissionsForPath.go @@ -181,12 +181,13 @@ func NewGetEffectivePermissionsForPathPaginator(client GetEffectivePermissionsFo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEffectivePermissionsForPathPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEffectivePermissionsForPath page. @@ -213,7 +214,10 @@ func (p *GetEffectivePermissionsForPathPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_GetTableObjects.go b/service/lakeformation/api_op_GetTableObjects.go index 52fe2e57a59..4a671d86209 100644 --- a/service/lakeformation/api_op_GetTableObjects.go +++ b/service/lakeformation/api_op_GetTableObjects.go @@ -201,12 +201,13 @@ func NewGetTableObjectsPaginator(client GetTableObjectsAPIClient, params *GetTab client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTableObjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTableObjects page. @@ -233,7 +234,10 @@ func (p *GetTableObjectsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_GetWorkUnits.go b/service/lakeformation/api_op_GetWorkUnits.go index 74fd2ce84f5..7b025781183 100644 --- a/service/lakeformation/api_op_GetWorkUnits.go +++ b/service/lakeformation/api_op_GetWorkUnits.go @@ -215,12 +215,13 @@ func NewGetWorkUnitsPaginator(client GetWorkUnitsAPIClient, params *GetWorkUnits client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetWorkUnitsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetWorkUnits page. @@ -247,7 +248,10 @@ func (p *GetWorkUnitsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_ListDataCellsFilter.go b/service/lakeformation/api_op_ListDataCellsFilter.go index 775015b1f43..ce4484ae1b4 100644 --- a/service/lakeformation/api_op_ListDataCellsFilter.go +++ b/service/lakeformation/api_op_ListDataCellsFilter.go @@ -167,12 +167,13 @@ func NewListDataCellsFilterPaginator(client ListDataCellsFilterAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataCellsFilterPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataCellsFilter page. @@ -199,7 +200,10 @@ func (p *ListDataCellsFilterPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_ListLFTags.go b/service/lakeformation/api_op_ListLFTags.go index a907a278554..b6c86b8ffc0 100644 --- a/service/lakeformation/api_op_ListLFTags.go +++ b/service/lakeformation/api_op_ListLFTags.go @@ -172,12 +172,13 @@ func NewListLFTagsPaginator(client ListLFTagsAPIClient, params *ListLFTagsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLFTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLFTags page. @@ -204,7 +205,10 @@ func (p *ListLFTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_ListPermissions.go b/service/lakeformation/api_op_ListPermissions.go index 145393ce076..09af2151e04 100644 --- a/service/lakeformation/api_op_ListPermissions.go +++ b/service/lakeformation/api_op_ListPermissions.go @@ -191,12 +191,13 @@ func NewListPermissionsPaginator(client ListPermissionsAPIClient, params *ListPe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissions page. @@ -223,7 +224,10 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_ListResources.go b/service/lakeformation/api_op_ListResources.go index 717a3332618..4ce53ffd9bd 100644 --- a/service/lakeformation/api_op_ListResources.go +++ b/service/lakeformation/api_op_ListResources.go @@ -163,12 +163,13 @@ func NewListResourcesPaginator(client ListResourcesAPIClient, params *ListResour client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResources page. @@ -195,7 +196,10 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_ListTableStorageOptimizers.go b/service/lakeformation/api_op_ListTableStorageOptimizers.go index 9402faa4062..6606eb27e09 100644 --- a/service/lakeformation/api_op_ListTableStorageOptimizers.go +++ b/service/lakeformation/api_op_ListTableStorageOptimizers.go @@ -185,12 +185,13 @@ func NewListTableStorageOptimizersPaginator(client ListTableStorageOptimizersAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTableStorageOptimizersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTableStorageOptimizers page. @@ -217,7 +218,10 @@ func (p *ListTableStorageOptimizersPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_ListTransactions.go b/service/lakeformation/api_op_ListTransactions.go index 23de30e2dc4..01428101a74 100644 --- a/service/lakeformation/api_op_ListTransactions.go +++ b/service/lakeformation/api_op_ListTransactions.go @@ -172,12 +172,13 @@ func NewListTransactionsPaginator(client ListTransactionsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTransactionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTransactions page. @@ -204,7 +205,10 @@ func (p *ListTransactionsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_SearchDatabasesByLFTags.go b/service/lakeformation/api_op_SearchDatabasesByLFTags.go index cb181943612..c67b234a4ee 100644 --- a/service/lakeformation/api_op_SearchDatabasesByLFTags.go +++ b/service/lakeformation/api_op_SearchDatabasesByLFTags.go @@ -180,12 +180,13 @@ func NewSearchDatabasesByLFTagsPaginator(client SearchDatabasesByLFTagsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchDatabasesByLFTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchDatabasesByLFTags page. @@ -212,7 +213,10 @@ func (p *SearchDatabasesByLFTagsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lakeformation/api_op_SearchTablesByLFTags.go b/service/lakeformation/api_op_SearchTablesByLFTags.go index 844663e9653..986bc3f7441 100644 --- a/service/lakeformation/api_op_SearchTablesByLFTags.go +++ b/service/lakeformation/api_op_SearchTablesByLFTags.go @@ -178,12 +178,13 @@ func NewSearchTablesByLFTagsPaginator(client SearchTablesByLFTagsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchTablesByLFTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchTablesByLFTags page. @@ -210,7 +211,10 @@ func (p *SearchTablesByLFTagsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListAliases.go b/service/lambda/api_op_ListAliases.go index 8f259457818..700e81ca834 100644 --- a/service/lambda/api_op_ListAliases.go +++ b/service/lambda/api_op_ListAliases.go @@ -185,12 +185,13 @@ func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInp client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAliases page. @@ -217,7 +218,10 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListCodeSigningConfigs.go b/service/lambda/api_op_ListCodeSigningConfigs.go index 874b9dc2c0c..ae39655d353 100644 --- a/service/lambda/api_op_ListCodeSigningConfigs.go +++ b/service/lambda/api_op_ListCodeSigningConfigs.go @@ -165,12 +165,13 @@ func NewListCodeSigningConfigsPaginator(client ListCodeSigningConfigsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCodeSigningConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCodeSigningConfigs page. @@ -197,7 +198,10 @@ func (p *ListCodeSigningConfigsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListEventSourceMappings.go b/service/lambda/api_op_ListEventSourceMappings.go index 3ba1bcd7646..c585ffb483e 100644 --- a/service/lambda/api_op_ListEventSourceMappings.go +++ b/service/lambda/api_op_ListEventSourceMappings.go @@ -201,12 +201,13 @@ func NewListEventSourceMappingsPaginator(client ListEventSourceMappingsAPIClient client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventSourceMappingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEventSourceMappings page. @@ -233,7 +234,10 @@ func (p *ListEventSourceMappingsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListFunctionEventInvokeConfigs.go b/service/lambda/api_op_ListFunctionEventInvokeConfigs.go index c978ebe6ae9..a6815d2e188 100644 --- a/service/lambda/api_op_ListFunctionEventInvokeConfigs.go +++ b/service/lambda/api_op_ListFunctionEventInvokeConfigs.go @@ -186,12 +186,13 @@ func NewListFunctionEventInvokeConfigsPaginator(client ListFunctionEventInvokeCo client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFunctionEventInvokeConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFunctionEventInvokeConfigs page. @@ -218,7 +219,10 @@ func (p *ListFunctionEventInvokeConfigsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListFunctions.go b/service/lambda/api_op_ListFunctions.go index ef42164073c..dcce768620e 100644 --- a/service/lambda/api_op_ListFunctions.go +++ b/service/lambda/api_op_ListFunctions.go @@ -180,12 +180,13 @@ func NewListFunctionsPaginator(client ListFunctionsAPIClient, params *ListFuncti client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFunctionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFunctions page. @@ -212,7 +213,10 @@ func (p *ListFunctionsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go b/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go index 4d1417f89c7..d1e4c48a9ff 100644 --- a/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go +++ b/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go @@ -173,12 +173,13 @@ func NewListFunctionsByCodeSigningConfigPaginator(client ListFunctionsByCodeSign client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFunctionsByCodeSigningConfigPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFunctionsByCodeSigningConfig page. @@ -205,7 +206,10 @@ func (p *ListFunctionsByCodeSigningConfigPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListLayerVersions.go b/service/lambda/api_op_ListLayerVersions.go index 61d980bbf4b..0536fb5af59 100644 --- a/service/lambda/api_op_ListLayerVersions.go +++ b/service/lambda/api_op_ListLayerVersions.go @@ -181,12 +181,13 @@ func NewListLayerVersionsPaginator(client ListLayerVersionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLayerVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLayerVersions page. @@ -213,7 +214,10 @@ func (p *ListLayerVersionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListLayers.go b/service/lambda/api_op_ListLayers.go index 34da61f254a..b4c010c4c16 100644 --- a/service/lambda/api_op_ListLayers.go +++ b/service/lambda/api_op_ListLayers.go @@ -173,12 +173,13 @@ func NewListLayersPaginator(client ListLayersAPIClient, params *ListLayersInput, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLayersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLayers page. @@ -205,7 +206,10 @@ func (p *ListLayersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go b/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go index 28d368310c0..5bc296100db 100644 --- a/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go +++ b/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go @@ -184,12 +184,13 @@ func NewListProvisionedConcurrencyConfigsPaginator(client ListProvisionedConcurr client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProvisionedConcurrencyConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProvisionedConcurrencyConfigs page. @@ -216,7 +217,10 @@ func (p *ListProvisionedConcurrencyConfigsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lambda/api_op_ListVersionsByFunction.go b/service/lambda/api_op_ListVersionsByFunction.go index 3f1bdff7fe4..60e3726fb73 100644 --- a/service/lambda/api_op_ListVersionsByFunction.go +++ b/service/lambda/api_op_ListVersionsByFunction.go @@ -189,12 +189,13 @@ func NewListVersionsByFunctionPaginator(client ListVersionsByFunctionAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVersionsByFunctionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVersionsByFunction page. @@ -221,7 +222,10 @@ func (p *ListVersionsByFunctionPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetBotAliases.go b/service/lexmodelbuildingservice/api_op_GetBotAliases.go index 817d6035906..e56b5c3ae7a 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotAliases.go +++ b/service/lexmodelbuildingservice/api_op_GetBotAliases.go @@ -179,12 +179,13 @@ func NewGetBotAliasesPaginator(client GetBotAliasesAPIClient, params *GetBotAlia client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBotAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBotAliases page. @@ -211,7 +212,10 @@ func (p *GetBotAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go b/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go index cc0205e2105..9f251a60cff 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go +++ b/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go @@ -191,12 +191,13 @@ func NewGetBotChannelAssociationsPaginator(client GetBotChannelAssociationsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBotChannelAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBotChannelAssociations page. @@ -223,7 +224,10 @@ func (p *GetBotChannelAssociationsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetBotVersions.go b/service/lexmodelbuildingservice/api_op_GetBotVersions.go index 3d4b6f36f0e..8ba4d24ef4a 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotVersions.go +++ b/service/lexmodelbuildingservice/api_op_GetBotVersions.go @@ -181,12 +181,13 @@ func NewGetBotVersionsPaginator(client GetBotVersionsAPIClient, params *GetBotVe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBotVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBotVersions page. @@ -213,7 +214,10 @@ func (p *GetBotVersionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetBots.go b/service/lexmodelbuildingservice/api_op_GetBots.go index f4174ae82e6..adac1390361 100644 --- a/service/lexmodelbuildingservice/api_op_GetBots.go +++ b/service/lexmodelbuildingservice/api_op_GetBots.go @@ -178,12 +178,13 @@ func NewGetBotsPaginator(client GetBotsAPIClient, params *GetBotsInput, optFns . client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBots page. @@ -210,7 +211,10 @@ func (p *GetBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go b/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go index 8e5f92d284e..aaf4a8ece4b 100644 --- a/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go +++ b/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go @@ -177,12 +177,13 @@ func NewGetBuiltinIntentsPaginator(client GetBuiltinIntentsAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBuiltinIntentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBuiltinIntents page. @@ -209,7 +210,10 @@ func (p *GetBuiltinIntentsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go b/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go index 917518c6df5..c052acb5ec1 100644 --- a/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go +++ b/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go @@ -178,12 +178,13 @@ func NewGetBuiltinSlotTypesPaginator(client GetBuiltinSlotTypesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetBuiltinSlotTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetBuiltinSlotTypes page. @@ -210,7 +211,10 @@ func (p *GetBuiltinSlotTypesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetIntentVersions.go b/service/lexmodelbuildingservice/api_op_GetIntentVersions.go index 81d2d081b56..d13c874bb20 100644 --- a/service/lexmodelbuildingservice/api_op_GetIntentVersions.go +++ b/service/lexmodelbuildingservice/api_op_GetIntentVersions.go @@ -183,12 +183,13 @@ func NewGetIntentVersionsPaginator(client GetIntentVersionsAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetIntentVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetIntentVersions page. @@ -215,7 +216,10 @@ func (p *GetIntentVersionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetIntents.go b/service/lexmodelbuildingservice/api_op_GetIntents.go index d0980c399d5..fe6be1ba359 100644 --- a/service/lexmodelbuildingservice/api_op_GetIntents.go +++ b/service/lexmodelbuildingservice/api_op_GetIntents.go @@ -178,12 +178,13 @@ func NewGetIntentsPaginator(client GetIntentsAPIClient, params *GetIntentsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetIntentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetIntents page. @@ -210,7 +211,10 @@ func (p *GetIntentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetMigrations.go b/service/lexmodelbuildingservice/api_op_GetMigrations.go index 5f37766ede4..77b66180409 100644 --- a/service/lexmodelbuildingservice/api_op_GetMigrations.go +++ b/service/lexmodelbuildingservice/api_op_GetMigrations.go @@ -179,12 +179,13 @@ func NewGetMigrationsPaginator(client GetMigrationsAPIClient, params *GetMigrati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetMigrationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetMigrations page. @@ -211,7 +212,10 @@ func (p *GetMigrationsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go b/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go index d9eb9d576e5..2b280013cc5 100644 --- a/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go +++ b/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go @@ -184,12 +184,13 @@ func NewGetSlotTypeVersionsPaginator(client GetSlotTypeVersionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSlotTypeVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSlotTypeVersions page. @@ -216,7 +217,10 @@ func (p *GetSlotTypeVersionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelbuildingservice/api_op_GetSlotTypes.go b/service/lexmodelbuildingservice/api_op_GetSlotTypes.go index 3fe87389c2d..e0e5be4a529 100644 --- a/service/lexmodelbuildingservice/api_op_GetSlotTypes.go +++ b/service/lexmodelbuildingservice/api_op_GetSlotTypes.go @@ -179,12 +179,13 @@ func NewGetSlotTypesPaginator(client GetSlotTypesAPIClient, params *GetSlotTypes client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSlotTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSlotTypes page. @@ -211,7 +212,10 @@ func (p *GetSlotTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListAggregatedUtterances.go b/service/lexmodelsv2/api_op_ListAggregatedUtterances.go index b84b395a9f6..f580ac08400 100644 --- a/service/lexmodelsv2/api_op_ListAggregatedUtterances.go +++ b/service/lexmodelsv2/api_op_ListAggregatedUtterances.go @@ -270,12 +270,13 @@ func NewListAggregatedUtterancesPaginator(client ListAggregatedUtterancesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAggregatedUtterancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAggregatedUtterances page. @@ -302,7 +303,10 @@ func (p *ListAggregatedUtterancesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBotAliases.go b/service/lexmodelsv2/api_op_ListBotAliases.go index 980486731ea..0224050d068 100644 --- a/service/lexmodelsv2/api_op_ListBotAliases.go +++ b/service/lexmodelsv2/api_op_ListBotAliases.go @@ -183,12 +183,13 @@ func NewListBotAliasesPaginator(client ListBotAliasesAPIClient, params *ListBotA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBotAliases page. @@ -215,7 +216,10 @@ func (p *ListBotAliasesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBotLocales.go b/service/lexmodelsv2/api_op_ListBotLocales.go index ee3ffa357b9..440769ab5b5 100644 --- a/service/lexmodelsv2/api_op_ListBotLocales.go +++ b/service/lexmodelsv2/api_op_ListBotLocales.go @@ -200,12 +200,13 @@ func NewListBotLocalesPaginator(client ListBotLocalesAPIClient, params *ListBotL client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotLocalesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBotLocales page. @@ -232,7 +233,10 @@ func (p *ListBotLocalesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBotRecommendations.go b/service/lexmodelsv2/api_op_ListBotRecommendations.go index 96d60e6229f..d1662277478 100644 --- a/service/lexmodelsv2/api_op_ListBotRecommendations.go +++ b/service/lexmodelsv2/api_op_ListBotRecommendations.go @@ -200,12 +200,13 @@ func NewListBotRecommendationsPaginator(client ListBotRecommendationsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBotRecommendations page. @@ -232,7 +233,10 @@ func (p *ListBotRecommendationsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBotVersions.go b/service/lexmodelsv2/api_op_ListBotVersions.go index f7eb90cf485..b548036f750 100644 --- a/service/lexmodelsv2/api_op_ListBotVersions.go +++ b/service/lexmodelsv2/api_op_ListBotVersions.go @@ -191,12 +191,13 @@ func NewListBotVersionsPaginator(client ListBotVersionsAPIClient, params *ListBo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBotVersions page. @@ -223,7 +224,10 @@ func (p *ListBotVersionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBots.go b/service/lexmodelsv2/api_op_ListBots.go index d8938e6aeed..b11cf95d1e3 100644 --- a/service/lexmodelsv2/api_op_ListBots.go +++ b/service/lexmodelsv2/api_op_ListBots.go @@ -183,12 +183,13 @@ func NewListBotsPaginator(client ListBotsAPIClient, params *ListBotsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBots page. @@ -215,7 +216,10 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBuiltInIntents.go b/service/lexmodelsv2/api_op_ListBuiltInIntents.go index 5b2b5600af5..38f177e7f53 100644 --- a/service/lexmodelsv2/api_op_ListBuiltInIntents.go +++ b/service/lexmodelsv2/api_op_ListBuiltInIntents.go @@ -195,12 +195,13 @@ func NewListBuiltInIntentsPaginator(client ListBuiltInIntentsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuiltInIntentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuiltInIntents page. @@ -227,7 +228,10 @@ func (p *ListBuiltInIntentsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go b/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go index fa1f83b8cfa..e81122cef4f 100644 --- a/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go +++ b/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go @@ -191,12 +191,13 @@ func NewListBuiltInSlotTypesPaginator(client ListBuiltInSlotTypesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBuiltInSlotTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBuiltInSlotTypes page. @@ -223,7 +224,10 @@ func (p *ListBuiltInSlotTypesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListExports.go b/service/lexmodelsv2/api_op_ListExports.go index c9ad7db0a6d..a2b201c6428 100644 --- a/service/lexmodelsv2/api_op_ListExports.go +++ b/service/lexmodelsv2/api_op_ListExports.go @@ -196,12 +196,13 @@ func NewListExportsPaginator(client ListExportsAPIClient, params *ListExportsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExports page. @@ -228,7 +229,10 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListImports.go b/service/lexmodelsv2/api_op_ListImports.go index 292339459b8..4439255ac43 100644 --- a/service/lexmodelsv2/api_op_ListImports.go +++ b/service/lexmodelsv2/api_op_ListImports.go @@ -196,12 +196,13 @@ func NewListImportsPaginator(client ListImportsAPIClient, params *ListImportsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImports page. @@ -228,7 +229,10 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListIntents.go b/service/lexmodelsv2/api_op_ListIntents.go index 2ee3cdf0359..f5911fd56e9 100644 --- a/service/lexmodelsv2/api_op_ListIntents.go +++ b/service/lexmodelsv2/api_op_ListIntents.go @@ -210,12 +210,13 @@ func NewListIntentsPaginator(client ListIntentsAPIClient, params *ListIntentsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIntentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIntents page. @@ -242,7 +243,10 @@ func (p *ListIntentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListRecommendedIntents.go b/service/lexmodelsv2/api_op_ListRecommendedIntents.go index 8e94defe1d0..00449f110da 100644 --- a/service/lexmodelsv2/api_op_ListRecommendedIntents.go +++ b/service/lexmodelsv2/api_op_ListRecommendedIntents.go @@ -211,12 +211,13 @@ func NewListRecommendedIntentsPaginator(client ListRecommendedIntentsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecommendedIntentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecommendedIntents page. @@ -243,7 +244,10 @@ func (p *ListRecommendedIntentsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListSlotTypes.go b/service/lexmodelsv2/api_op_ListSlotTypes.go index dfbff2027de..88f8600cbd7 100644 --- a/service/lexmodelsv2/api_op_ListSlotTypes.go +++ b/service/lexmodelsv2/api_op_ListSlotTypes.go @@ -210,12 +210,13 @@ func NewListSlotTypesPaginator(client ListSlotTypesAPIClient, params *ListSlotTy client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSlotTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSlotTypes page. @@ -242,7 +243,10 @@ func (p *ListSlotTypesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lexmodelsv2/api_op_ListSlots.go b/service/lexmodelsv2/api_op_ListSlots.go index 3786aabd5fb..152920dd187 100644 --- a/service/lexmodelsv2/api_op_ListSlots.go +++ b/service/lexmodelsv2/api_op_ListSlots.go @@ -218,12 +218,13 @@ func NewListSlotsPaginator(client ListSlotsAPIClient, params *ListSlotsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSlotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSlots page. @@ -250,7 +251,10 @@ func (p *ListSlotsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_GetDevicePositionHistory.go b/service/location/api_op_GetDevicePositionHistory.go index c4cabeb169d..b3acabe8127 100644 --- a/service/location/api_op_GetDevicePositionHistory.go +++ b/service/location/api_op_GetDevicePositionHistory.go @@ -220,12 +220,13 @@ func NewGetDevicePositionHistoryPaginator(client GetDevicePositionHistoryAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDevicePositionHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDevicePositionHistory page. @@ -246,7 +247,10 @@ func (p *GetDevicePositionHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListDevicePositions.go b/service/location/api_op_ListDevicePositions.go index 8ae0d26d0ce..32fd3ff2871 100644 --- a/service/location/api_op_ListDevicePositions.go +++ b/service/location/api_op_ListDevicePositions.go @@ -207,12 +207,13 @@ func NewListDevicePositionsPaginator(client ListDevicePositionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicePositionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevicePositions page. @@ -239,7 +240,10 @@ func (p *ListDevicePositionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListGeofenceCollections.go b/service/location/api_op_ListGeofenceCollections.go index 403ee574c3b..28d63941a9c 100644 --- a/service/location/api_op_ListGeofenceCollections.go +++ b/service/location/api_op_ListGeofenceCollections.go @@ -198,12 +198,13 @@ func NewListGeofenceCollectionsPaginator(client ListGeofenceCollectionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGeofenceCollectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGeofenceCollections page. @@ -230,7 +231,10 @@ func (p *ListGeofenceCollectionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListGeofences.go b/service/location/api_op_ListGeofences.go index c0b68baf503..54a7ae07c80 100644 --- a/service/location/api_op_ListGeofences.go +++ b/service/location/api_op_ListGeofences.go @@ -192,12 +192,13 @@ func NewListGeofencesPaginator(client ListGeofencesAPIClient, params *ListGeofen client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGeofencesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGeofences page. @@ -218,7 +219,10 @@ func (p *ListGeofencesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListMaps.go b/service/location/api_op_ListMaps.go index 533c1685186..1c2dde1ede8 100644 --- a/service/location/api_op_ListMaps.go +++ b/service/location/api_op_ListMaps.go @@ -195,12 +195,13 @@ func NewListMapsPaginator(client ListMapsAPIClient, params *ListMapsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMapsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMaps page. @@ -227,7 +228,10 @@ func (p *ListMapsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListPlaceIndexes.go b/service/location/api_op_ListPlaceIndexes.go index ccb2d1c21df..7f9536ce030 100644 --- a/service/location/api_op_ListPlaceIndexes.go +++ b/service/location/api_op_ListPlaceIndexes.go @@ -196,12 +196,13 @@ func NewListPlaceIndexesPaginator(client ListPlaceIndexesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlaceIndexesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlaceIndexes page. @@ -228,7 +229,10 @@ func (p *ListPlaceIndexesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListRouteCalculators.go b/service/location/api_op_ListRouteCalculators.go index 69c7c208f6d..49b5556c456 100644 --- a/service/location/api_op_ListRouteCalculators.go +++ b/service/location/api_op_ListRouteCalculators.go @@ -197,12 +197,13 @@ func NewListRouteCalculatorsPaginator(client ListRouteCalculatorsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRouteCalculatorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRouteCalculators page. @@ -229,7 +230,10 @@ func (p *ListRouteCalculatorsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListTrackerConsumers.go b/service/location/api_op_ListTrackerConsumers.go index 34e21089d87..e78e5c9ea93 100644 --- a/service/location/api_op_ListTrackerConsumers.go +++ b/service/location/api_op_ListTrackerConsumers.go @@ -205,12 +205,13 @@ func NewListTrackerConsumersPaginator(client ListTrackerConsumersAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrackerConsumersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrackerConsumers page. @@ -237,7 +238,10 @@ func (p *ListTrackerConsumersPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/location/api_op_ListTrackers.go b/service/location/api_op_ListTrackers.go index c75aaf01c00..8c8d5699e43 100644 --- a/service/location/api_op_ListTrackers.go +++ b/service/location/api_op_ListTrackers.go @@ -196,12 +196,13 @@ func NewListTrackersPaginator(client ListTrackersAPIClient, params *ListTrackers client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrackersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrackers page. @@ -228,7 +229,10 @@ func (p *ListTrackersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutequipment/api_op_ListDataIngestionJobs.go b/service/lookoutequipment/api_op_ListDataIngestionJobs.go index 72b0aac1ebe..9b699084249 100644 --- a/service/lookoutequipment/api_op_ListDataIngestionJobs.go +++ b/service/lookoutequipment/api_op_ListDataIngestionJobs.go @@ -171,12 +171,13 @@ func NewListDataIngestionJobsPaginator(client ListDataIngestionJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataIngestionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataIngestionJobs page. @@ -203,7 +204,10 @@ func (p *ListDataIngestionJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutequipment/api_op_ListDatasets.go b/service/lookoutequipment/api_op_ListDatasets.go index 513fb48bf3e..7c248f5aac7 100644 --- a/service/lookoutequipment/api_op_ListDatasets.go +++ b/service/lookoutequipment/api_op_ListDatasets.go @@ -164,12 +164,13 @@ func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasets page. @@ -196,7 +197,10 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutequipment/api_op_ListInferenceExecutions.go b/service/lookoutequipment/api_op_ListInferenceExecutions.go index c6197f9544f..21f59a023a2 100644 --- a/service/lookoutequipment/api_op_ListInferenceExecutions.go +++ b/service/lookoutequipment/api_op_ListInferenceExecutions.go @@ -187,12 +187,13 @@ func NewListInferenceExecutionsPaginator(client ListInferenceExecutionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInferenceExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInferenceExecutions page. @@ -219,7 +220,10 @@ func (p *ListInferenceExecutionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutequipment/api_op_ListInferenceSchedulers.go b/service/lookoutequipment/api_op_ListInferenceSchedulers.go index 6d81c85a408..b38e62bc0e9 100644 --- a/service/lookoutequipment/api_op_ListInferenceSchedulers.go +++ b/service/lookoutequipment/api_op_ListInferenceSchedulers.go @@ -172,12 +172,13 @@ func NewListInferenceSchedulersPaginator(client ListInferenceSchedulersAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInferenceSchedulersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInferenceSchedulers page. @@ -204,7 +205,10 @@ func (p *ListInferenceSchedulersPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutequipment/api_op_ListModels.go b/service/lookoutequipment/api_op_ListModels.go index 93ffe6639ce..11ebf739d03 100644 --- a/service/lookoutequipment/api_op_ListModels.go +++ b/service/lookoutequipment/api_op_ListModels.go @@ -172,12 +172,13 @@ func NewListModelsPaginator(client ListModelsAPIClient, params *ListModelsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModels page. @@ -204,7 +205,10 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go b/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go index 10bceb50986..7c19c4b1e56 100644 --- a/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go +++ b/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go @@ -175,12 +175,13 @@ func NewDescribeAnomalyDetectionExecutionsPaginator(client DescribeAnomalyDetect client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAnomalyDetectionExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAnomalyDetectionExecutions page. @@ -203,7 +204,10 @@ func (p *DescribeAnomalyDetectionExecutionsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_GetFeedback.go b/service/lookoutmetrics/api_op_GetFeedback.go index 3006f6b5193..cf9960d5558 100644 --- a/service/lookoutmetrics/api_op_GetFeedback.go +++ b/service/lookoutmetrics/api_op_GetFeedback.go @@ -173,12 +173,13 @@ func NewGetFeedbackPaginator(client GetFeedbackAPIClient, params *GetFeedbackInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetFeedbackPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetFeedback page. @@ -201,7 +202,10 @@ func (p *GetFeedbackPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_ListAlerts.go b/service/lookoutmetrics/api_op_ListAlerts.go index d2124277683..167370047d9 100644 --- a/service/lookoutmetrics/api_op_ListAlerts.go +++ b/service/lookoutmetrics/api_op_ListAlerts.go @@ -168,12 +168,13 @@ func NewListAlertsPaginator(client ListAlertsAPIClient, params *ListAlertsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAlertsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAlerts page. @@ -196,7 +197,10 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_ListAnomalyDetectors.go b/service/lookoutmetrics/api_op_ListAnomalyDetectors.go index 193d2e22b08..ffed221f337 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyDetectors.go +++ b/service/lookoutmetrics/api_op_ListAnomalyDetectors.go @@ -167,12 +167,13 @@ func NewListAnomalyDetectorsPaginator(client ListAnomalyDetectorsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnomalyDetectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnomalyDetectors page. @@ -195,7 +196,10 @@ func (p *ListAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go b/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go index 73067428397..3d5b906a2f8 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go +++ b/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go @@ -179,12 +179,13 @@ func NewListAnomalyGroupSummariesPaginator(client ListAnomalyGroupSummariesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnomalyGroupSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnomalyGroupSummaries page. @@ -207,7 +208,10 @@ func (p *ListAnomalyGroupSummariesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go b/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go index 12d5f7c7ab5..d88139f6a4f 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go +++ b/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go @@ -191,12 +191,13 @@ func NewListAnomalyGroupTimeSeriesPaginator(client ListAnomalyGroupTimeSeriesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnomalyGroupTimeSeriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnomalyGroupTimeSeries page. @@ -219,7 +220,10 @@ func (p *ListAnomalyGroupTimeSeriesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutmetrics/api_op_ListMetricSets.go b/service/lookoutmetrics/api_op_ListMetricSets.go index f230a860d2d..89ed4664d6e 100644 --- a/service/lookoutmetrics/api_op_ListMetricSets.go +++ b/service/lookoutmetrics/api_op_ListMetricSets.go @@ -169,12 +169,13 @@ func NewListMetricSetsPaginator(client ListMetricSetsAPIClient, params *ListMetr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMetricSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMetricSets page. @@ -197,7 +198,10 @@ func (p *ListMetricSetsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutvision/api_op_ListDatasetEntries.go b/service/lookoutvision/api_op_ListDatasetEntries.go index ba455a2a413..4d36009cf33 100644 --- a/service/lookoutvision/api_op_ListDatasetEntries.go +++ b/service/lookoutvision/api_op_ListDatasetEntries.go @@ -209,12 +209,13 @@ func NewListDatasetEntriesPaginator(client ListDatasetEntriesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetEntriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetEntries page. @@ -241,7 +242,10 @@ func (p *ListDatasetEntriesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutvision/api_op_ListModels.go b/service/lookoutvision/api_op_ListModels.go index dba2b796c6f..7165a5c3532 100644 --- a/service/lookoutvision/api_op_ListModels.go +++ b/service/lookoutvision/api_op_ListModels.go @@ -176,12 +176,13 @@ func NewListModelsPaginator(client ListModelsAPIClient, params *ListModelsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModels page. @@ -208,7 +209,10 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/lookoutvision/api_op_ListProjects.go b/service/lookoutvision/api_op_ListProjects.go index eb26eb3e078..0f094410f61 100644 --- a/service/lookoutvision/api_op_ListProjects.go +++ b/service/lookoutvision/api_op_ListProjects.go @@ -167,12 +167,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -199,7 +200,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/machinelearning/api_op_DescribeBatchPredictions.go b/service/machinelearning/api_op_DescribeBatchPredictions.go index 3e123fe44a2..0d5359362ae 100644 --- a/service/machinelearning/api_op_DescribeBatchPredictions.go +++ b/service/machinelearning/api_op_DescribeBatchPredictions.go @@ -249,12 +249,13 @@ func NewDescribeBatchPredictionsPaginator(client DescribeBatchPredictionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBatchPredictionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBatchPredictions page. @@ -281,7 +282,10 @@ func (p *DescribeBatchPredictionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/machinelearning/api_op_DescribeDataSources.go b/service/machinelearning/api_op_DescribeDataSources.go index 8372e1baa8b..20009b30f13 100644 --- a/service/machinelearning/api_op_DescribeDataSources.go +++ b/service/machinelearning/api_op_DescribeDataSources.go @@ -238,12 +238,13 @@ func NewDescribeDataSourcesPaginator(client DescribeDataSourcesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDataSourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDataSources page. @@ -270,7 +271,10 @@ func (p *DescribeDataSourcesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/machinelearning/api_op_DescribeEvaluations.go b/service/machinelearning/api_op_DescribeEvaluations.go index 3e26271b68f..c2f76112f66 100644 --- a/service/machinelearning/api_op_DescribeEvaluations.go +++ b/service/machinelearning/api_op_DescribeEvaluations.go @@ -245,12 +245,13 @@ func NewDescribeEvaluationsPaginator(client DescribeEvaluationsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEvaluationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvaluations page. @@ -277,7 +278,10 @@ func (p *DescribeEvaluationsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/machinelearning/api_op_DescribeMLModels.go b/service/machinelearning/api_op_DescribeMLModels.go index 69b70213ed3..66333c5ac50 100644 --- a/service/machinelearning/api_op_DescribeMLModels.go +++ b/service/machinelearning/api_op_DescribeMLModels.go @@ -250,12 +250,13 @@ func NewDescribeMLModelsPaginator(client DescribeMLModelsAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMLModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMLModels page. @@ -282,7 +283,10 @@ func (p *DescribeMLModelsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie/api_op_ListMemberAccounts.go b/service/macie/api_op_ListMemberAccounts.go index 2435862dfc9..3d1361e4bb0 100644 --- a/service/macie/api_op_ListMemberAccounts.go +++ b/service/macie/api_op_ListMemberAccounts.go @@ -171,12 +171,13 @@ func NewListMemberAccountsPaginator(client ListMemberAccountsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMemberAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMemberAccounts page. @@ -203,7 +204,10 @@ func (p *ListMemberAccountsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie/api_op_ListS3Resources.go b/service/macie/api_op_ListS3Resources.go index 8587ca76dce..9c0abeece55 100644 --- a/service/macie/api_op_ListS3Resources.go +++ b/service/macie/api_op_ListS3Resources.go @@ -176,12 +176,13 @@ func NewListS3ResourcesPaginator(client ListS3ResourcesAPIClient, params *ListS3 client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListS3ResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListS3Resources page. @@ -208,7 +209,10 @@ func (p *ListS3ResourcesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_DescribeBuckets.go b/service/macie2/api_op_DescribeBuckets.go index e1193aee278..207d615f6ff 100644 --- a/service/macie2/api_op_DescribeBuckets.go +++ b/service/macie2/api_op_DescribeBuckets.go @@ -172,12 +172,13 @@ func NewDescribeBucketsPaginator(client DescribeBucketsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBucketsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBuckets page. @@ -200,7 +201,10 @@ func (p *DescribeBucketsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_GetUsageStatistics.go b/service/macie2/api_op_GetUsageStatistics.go index 20baedcf0bd..bac194b69e6 100644 --- a/service/macie2/api_op_GetUsageStatistics.go +++ b/service/macie2/api_op_GetUsageStatistics.go @@ -183,12 +183,13 @@ func NewGetUsageStatisticsPaginator(client GetUsageStatisticsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUsageStatisticsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUsageStatistics page. @@ -211,7 +212,10 @@ func (p *GetUsageStatisticsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListClassificationJobs.go b/service/macie2/api_op_ListClassificationJobs.go index ee90097e049..bb037be6806 100644 --- a/service/macie2/api_op_ListClassificationJobs.go +++ b/service/macie2/api_op_ListClassificationJobs.go @@ -170,12 +170,13 @@ func NewListClassificationJobsPaginator(client ListClassificationJobsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClassificationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClassificationJobs page. @@ -198,7 +199,10 @@ func (p *ListClassificationJobsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListCustomDataIdentifiers.go b/service/macie2/api_op_ListCustomDataIdentifiers.go index fe8cfc36d3e..78c3cbafb6b 100644 --- a/service/macie2/api_op_ListCustomDataIdentifiers.go +++ b/service/macie2/api_op_ListCustomDataIdentifiers.go @@ -165,12 +165,13 @@ func NewListCustomDataIdentifiersPaginator(client ListCustomDataIdentifiersAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomDataIdentifiersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomDataIdentifiers page. @@ -193,7 +194,10 @@ func (p *ListCustomDataIdentifiersPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListFindings.go b/service/macie2/api_op_ListFindings.go index accae3eacd4..8bf9b662b8c 100644 --- a/service/macie2/api_op_ListFindings.go +++ b/service/macie2/api_op_ListFindings.go @@ -168,12 +168,13 @@ func NewListFindingsPaginator(client ListFindingsAPIClient, params *ListFindings client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindings page. @@ -196,7 +197,10 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListFindingsFilters.go b/service/macie2/api_op_ListFindingsFilters.go index 71e5fec11c0..9ab713aab24 100644 --- a/service/macie2/api_op_ListFindingsFilters.go +++ b/service/macie2/api_op_ListFindingsFilters.go @@ -163,12 +163,13 @@ func NewListFindingsFiltersPaginator(client ListFindingsFiltersAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingsFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindingsFilters page. @@ -191,7 +192,10 @@ func (p *ListFindingsFiltersPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListInvitations.go b/service/macie2/api_op_ListInvitations.go index 052f5a18120..f5c44467199 100644 --- a/service/macie2/api_op_ListInvitations.go +++ b/service/macie2/api_op_ListInvitations.go @@ -163,12 +163,13 @@ func NewListInvitationsPaginator(client ListInvitationsAPIClient, params *ListIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInvitations page. @@ -191,7 +192,10 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListMembers.go b/service/macie2/api_op_ListMembers.go index bd26881a568..a0f73ddab9c 100644 --- a/service/macie2/api_op_ListMembers.go +++ b/service/macie2/api_op_ListMembers.go @@ -169,12 +169,13 @@ func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMembers page. @@ -197,7 +198,10 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_ListOrganizationAdminAccounts.go b/service/macie2/api_op_ListOrganizationAdminAccounts.go index 5ce8536dfba..eab8d8843cd 100644 --- a/service/macie2/api_op_ListOrganizationAdminAccounts.go +++ b/service/macie2/api_op_ListOrganizationAdminAccounts.go @@ -167,12 +167,13 @@ func NewListOrganizationAdminAccountsPaginator(client ListOrganizationAdminAccou client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationAdminAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizationAdminAccounts page. @@ -195,7 +196,10 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/macie2/api_op_SearchResources.go b/service/macie2/api_op_SearchResources.go index bed5c8ceb68..91fe9e0541b 100644 --- a/service/macie2/api_op_SearchResources.go +++ b/service/macie2/api_op_SearchResources.go @@ -173,12 +173,13 @@ func NewSearchResourcesPaginator(client SearchResourcesAPIClient, params *Search client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchResources page. @@ -201,7 +202,10 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/managedblockchain/api_op_ListInvitations.go b/service/managedblockchain/api_op_ListInvitations.go index 5202bc840bc..446ccaf0059 100644 --- a/service/managedblockchain/api_op_ListInvitations.go +++ b/service/managedblockchain/api_op_ListInvitations.go @@ -161,12 +161,13 @@ func NewListInvitationsPaginator(client ListInvitationsAPIClient, params *ListIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInvitations page. @@ -193,7 +194,10 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/managedblockchain/api_op_ListMembers.go b/service/managedblockchain/api_op_ListMembers.go index 56bde0a4eb1..532002b1898 100644 --- a/service/managedblockchain/api_op_ListMembers.go +++ b/service/managedblockchain/api_op_ListMembers.go @@ -181,12 +181,13 @@ func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMembers page. @@ -213,7 +214,10 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/managedblockchain/api_op_ListNetworks.go b/service/managedblockchain/api_op_ListNetworks.go index 588adadb9dd..df8900d3403 100644 --- a/service/managedblockchain/api_op_ListNetworks.go +++ b/service/managedblockchain/api_op_ListNetworks.go @@ -172,12 +172,13 @@ func NewListNetworksPaginator(client ListNetworksAPIClient, params *ListNetworks client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNetworksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNetworks page. @@ -204,7 +205,10 @@ func (p *ListNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/managedblockchain/api_op_ListNodes.go b/service/managedblockchain/api_op_ListNodes.go index 4ef70e50892..bf3c03d5089 100644 --- a/service/managedblockchain/api_op_ListNodes.go +++ b/service/managedblockchain/api_op_ListNodes.go @@ -177,12 +177,13 @@ func NewListNodesPaginator(client ListNodesAPIClient, params *ListNodesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNodesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNodes page. @@ -209,7 +210,10 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/managedblockchain/api_op_ListProposalVotes.go b/service/managedblockchain/api_op_ListProposalVotes.go index 8b2e3cb54f4..1b0b0d6ccc0 100644 --- a/service/managedblockchain/api_op_ListProposalVotes.go +++ b/service/managedblockchain/api_op_ListProposalVotes.go @@ -175,12 +175,13 @@ func NewListProposalVotesPaginator(client ListProposalVotesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProposalVotesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProposalVotes page. @@ -207,7 +208,10 @@ func (p *ListProposalVotesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/managedblockchain/api_op_ListProposals.go b/service/managedblockchain/api_op_ListProposals.go index a56e3d36e7d..5a6894478b4 100644 --- a/service/managedblockchain/api_op_ListProposals.go +++ b/service/managedblockchain/api_op_ListProposals.go @@ -167,12 +167,13 @@ func NewListProposalsPaginator(client ListProposalsAPIClient, params *ListPropos client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProposalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProposals page. @@ -199,7 +200,10 @@ func (p *ListProposalsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/marketplacecatalog/api_op_ListChangeSets.go b/service/marketplacecatalog/api_op_ListChangeSets.go index 685356b4496..37be9cac080 100644 --- a/service/marketplacecatalog/api_op_ListChangeSets.go +++ b/service/marketplacecatalog/api_op_ListChangeSets.go @@ -183,12 +183,13 @@ func NewListChangeSetsPaginator(client ListChangeSetsAPIClient, params *ListChan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChangeSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChangeSets page. @@ -215,7 +216,10 @@ func (p *ListChangeSetsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/marketplacecatalog/api_op_ListEntities.go b/service/marketplacecatalog/api_op_ListEntities.go index 45b10808571..db80a56eff9 100644 --- a/service/marketplacecatalog/api_op_ListEntities.go +++ b/service/marketplacecatalog/api_op_ListEntities.go @@ -181,12 +181,13 @@ func NewListEntitiesPaginator(client ListEntitiesAPIClient, params *ListEntities client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntities page. @@ -213,7 +214,10 @@ func (p *ListEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconnect/api_op_ListEntitlements.go b/service/mediaconnect/api_op_ListEntitlements.go index d8a1d0f9d1a..c7ccc6ced25 100644 --- a/service/mediaconnect/api_op_ListEntitlements.go +++ b/service/mediaconnect/api_op_ListEntitlements.go @@ -181,12 +181,13 @@ func NewListEntitlementsPaginator(client ListEntitlementsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntitlementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntitlements page. @@ -209,7 +210,10 @@ func (p *ListEntitlementsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconnect/api_op_ListFlows.go b/service/mediaconnect/api_op_ListFlows.go index 2c91d3a227c..2ffce8bcf77 100644 --- a/service/mediaconnect/api_op_ListFlows.go +++ b/service/mediaconnect/api_op_ListFlows.go @@ -180,12 +180,13 @@ func NewListFlowsPaginator(client ListFlowsAPIClient, params *ListFlowsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFlowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFlows page. @@ -208,7 +209,10 @@ func (p *ListFlowsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconnect/api_op_ListOfferings.go b/service/mediaconnect/api_op_ListOfferings.go index f7bf61131e6..925a70c6b8c 100644 --- a/service/mediaconnect/api_op_ListOfferings.go +++ b/service/mediaconnect/api_op_ListOfferings.go @@ -183,12 +183,13 @@ func NewListOfferingsPaginator(client ListOfferingsAPIClient, params *ListOfferi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOfferings page. @@ -211,7 +212,10 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconnect/api_op_ListReservations.go b/service/mediaconnect/api_op_ListReservations.go index 9716cda8b0b..b037f76d1ab 100644 --- a/service/mediaconnect/api_op_ListReservations.go +++ b/service/mediaconnect/api_op_ListReservations.go @@ -183,12 +183,13 @@ func NewListReservationsPaginator(client ListReservationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReservationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReservations page. @@ -211,7 +212,10 @@ func (p *ListReservationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconvert/api_op_DescribeEndpoints.go b/service/mediaconvert/api_op_DescribeEndpoints.go index 8ee1a538425..9b31615f88a 100644 --- a/service/mediaconvert/api_op_DescribeEndpoints.go +++ b/service/mediaconvert/api_op_DescribeEndpoints.go @@ -171,12 +171,13 @@ func NewDescribeEndpointsPaginator(client DescribeEndpointsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEndpoints page. @@ -199,7 +200,10 @@ func (p *DescribeEndpointsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconvert/api_op_ListJobTemplates.go b/service/mediaconvert/api_op_ListJobTemplates.go index 40a2308f127..77276bb7758 100644 --- a/service/mediaconvert/api_op_ListJobTemplates.go +++ b/service/mediaconvert/api_op_ListJobTemplates.go @@ -178,12 +178,13 @@ func NewListJobTemplatesPaginator(client ListJobTemplatesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobTemplates page. @@ -206,7 +207,10 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconvert/api_op_ListJobs.go b/service/mediaconvert/api_op_ListJobs.go index 8b573100ebc..d64a90fdec9 100644 --- a/service/mediaconvert/api_op_ListJobs.go +++ b/service/mediaconvert/api_op_ListJobs.go @@ -174,12 +174,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -202,7 +203,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconvert/api_op_ListPresets.go b/service/mediaconvert/api_op_ListPresets.go index adfc64fa1e6..8919deec5a7 100644 --- a/service/mediaconvert/api_op_ListPresets.go +++ b/service/mediaconvert/api_op_ListPresets.go @@ -175,12 +175,13 @@ func NewListPresetsPaginator(client ListPresetsAPIClient, params *ListPresetsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPresetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPresets page. @@ -203,7 +204,10 @@ func (p *ListPresetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediaconvert/api_op_ListQueues.go b/service/mediaconvert/api_op_ListQueues.go index 21646b0d39e..ae5c2c99033 100644 --- a/service/mediaconvert/api_op_ListQueues.go +++ b/service/mediaconvert/api_op_ListQueues.go @@ -171,12 +171,13 @@ func NewListQueuesPaginator(client ListQueuesAPIClient, params *ListQueuesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQueues page. @@ -199,7 +200,10 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_DescribeSchedule.go b/service/medialive/api_op_DescribeSchedule.go index 96ddfdacef3..2fbc7177a48 100644 --- a/service/medialive/api_op_DescribeSchedule.go +++ b/service/medialive/api_op_DescribeSchedule.go @@ -170,12 +170,13 @@ func NewDescribeSchedulePaginator(client DescribeScheduleAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSchedulePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSchedule page. @@ -198,7 +199,10 @@ func (p *DescribeSchedulePaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListChannels.go b/service/medialive/api_op_ListChannels.go index 9faf19fbf31..27a86aae653 100644 --- a/service/medialive/api_op_ListChannels.go +++ b/service/medialive/api_op_ListChannels.go @@ -161,12 +161,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -189,7 +190,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListInputDeviceTransfers.go b/service/medialive/api_op_ListInputDeviceTransfers.go index af88c57bdc9..dcee25cccf9 100644 --- a/service/medialive/api_op_ListInputDeviceTransfers.go +++ b/service/medialive/api_op_ListInputDeviceTransfers.go @@ -174,12 +174,13 @@ func NewListInputDeviceTransfersPaginator(client ListInputDeviceTransfersAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInputDeviceTransfersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInputDeviceTransfers page. @@ -202,7 +203,10 @@ func (p *ListInputDeviceTransfersPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListInputDevices.go b/service/medialive/api_op_ListInputDevices.go index 1d8969a7d45..6630df310e4 100644 --- a/service/medialive/api_op_ListInputDevices.go +++ b/service/medialive/api_op_ListInputDevices.go @@ -162,12 +162,13 @@ func NewListInputDevicesPaginator(client ListInputDevicesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInputDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInputDevices page. @@ -190,7 +191,10 @@ func (p *ListInputDevicesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListInputSecurityGroups.go b/service/medialive/api_op_ListInputSecurityGroups.go index 7bdbed8efa8..8cbbecf94a9 100644 --- a/service/medialive/api_op_ListInputSecurityGroups.go +++ b/service/medialive/api_op_ListInputSecurityGroups.go @@ -164,12 +164,13 @@ func NewListInputSecurityGroupsPaginator(client ListInputSecurityGroupsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInputSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInputSecurityGroups page. @@ -192,7 +193,10 @@ func (p *ListInputSecurityGroupsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListInputs.go b/service/medialive/api_op_ListInputs.go index 5dea535aa01..385e4e10c62 100644 --- a/service/medialive/api_op_ListInputs.go +++ b/service/medialive/api_op_ListInputs.go @@ -161,12 +161,13 @@ func NewListInputsPaginator(client ListInputsAPIClient, params *ListInputsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInputsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInputs page. @@ -189,7 +190,10 @@ func (p *ListInputsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListMultiplexPrograms.go b/service/medialive/api_op_ListMultiplexPrograms.go index 47858f7c1a9..0e12559940c 100644 --- a/service/medialive/api_op_ListMultiplexPrograms.go +++ b/service/medialive/api_op_ListMultiplexPrograms.go @@ -171,12 +171,13 @@ func NewListMultiplexProgramsPaginator(client ListMultiplexProgramsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMultiplexProgramsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMultiplexPrograms page. @@ -199,7 +200,10 @@ func (p *ListMultiplexProgramsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListMultiplexes.go b/service/medialive/api_op_ListMultiplexes.go index d54558858f6..e3363188bed 100644 --- a/service/medialive/api_op_ListMultiplexes.go +++ b/service/medialive/api_op_ListMultiplexes.go @@ -162,12 +162,13 @@ func NewListMultiplexesPaginator(client ListMultiplexesAPIClient, params *ListMu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMultiplexesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMultiplexes page. @@ -190,7 +191,10 @@ func (p *ListMultiplexesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListOfferings.go b/service/medialive/api_op_ListOfferings.go index 40897849b28..50fbbd55926 100644 --- a/service/medialive/api_op_ListOfferings.go +++ b/service/medialive/api_op_ListOfferings.go @@ -192,12 +192,13 @@ func NewListOfferingsPaginator(client ListOfferingsAPIClient, params *ListOfferi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOfferings page. @@ -220,7 +221,10 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/medialive/api_op_ListReservations.go b/service/medialive/api_op_ListReservations.go index a17d2352bfe..f9282243fc6 100644 --- a/service/medialive/api_op_ListReservations.go +++ b/service/medialive/api_op_ListReservations.go @@ -186,12 +186,13 @@ func NewListReservationsPaginator(client ListReservationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReservationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReservations page. @@ -214,7 +215,10 @@ func (p *ListReservationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediapackage/api_op_ListChannels.go b/service/mediapackage/api_op_ListChannels.go index 8a1391cd9b2..2a020d5140a 100644 --- a/service/mediapackage/api_op_ListChannels.go +++ b/service/mediapackage/api_op_ListChannels.go @@ -159,12 +159,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -187,7 +188,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediapackage/api_op_ListHarvestJobs.go b/service/mediapackage/api_op_ListHarvestJobs.go index d511ad1f9c7..f19a016a556 100644 --- a/service/mediapackage/api_op_ListHarvestJobs.go +++ b/service/mediapackage/api_op_ListHarvestJobs.go @@ -167,12 +167,13 @@ func NewListHarvestJobsPaginator(client ListHarvestJobsAPIClient, params *ListHa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHarvestJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHarvestJobs page. @@ -195,7 +196,10 @@ func (p *ListHarvestJobsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediapackage/api_op_ListOriginEndpoints.go b/service/mediapackage/api_op_ListOriginEndpoints.go index b35db6ac486..0ece10cbcf0 100644 --- a/service/mediapackage/api_op_ListOriginEndpoints.go +++ b/service/mediapackage/api_op_ListOriginEndpoints.go @@ -165,12 +165,13 @@ func NewListOriginEndpointsPaginator(client ListOriginEndpointsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOriginEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOriginEndpoints page. @@ -193,7 +194,10 @@ func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediapackagevod/api_op_ListAssets.go b/service/mediapackagevod/api_op_ListAssets.go index a600ddfea56..df79f134ad0 100644 --- a/service/mediapackagevod/api_op_ListAssets.go +++ b/service/mediapackagevod/api_op_ListAssets.go @@ -162,12 +162,13 @@ func NewListAssetsPaginator(client ListAssetsAPIClient, params *ListAssetsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssets page. @@ -190,7 +191,10 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediapackagevod/api_op_ListPackagingConfigurations.go b/service/mediapackagevod/api_op_ListPackagingConfigurations.go index ae9303a8917..0314fb0d289 100644 --- a/service/mediapackagevod/api_op_ListPackagingConfigurations.go +++ b/service/mediapackagevod/api_op_ListPackagingConfigurations.go @@ -167,12 +167,13 @@ func NewListPackagingConfigurationsPaginator(client ListPackagingConfigurationsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagingConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackagingConfigurations page. @@ -195,7 +196,10 @@ func (p *ListPackagingConfigurationsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediapackagevod/api_op_ListPackagingGroups.go b/service/mediapackagevod/api_op_ListPackagingGroups.go index 210ffafbd36..d3e50a5fd21 100644 --- a/service/mediapackagevod/api_op_ListPackagingGroups.go +++ b/service/mediapackagevod/api_op_ListPackagingGroups.go @@ -161,12 +161,13 @@ func NewListPackagingGroupsPaginator(client ListPackagingGroupsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagingGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackagingGroups page. @@ -189,7 +190,10 @@ func (p *ListPackagingGroupsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediastore/api_op_ListContainers.go b/service/mediastore/api_op_ListContainers.go index 129fe4708c5..329a4e0d7d5 100644 --- a/service/mediastore/api_op_ListContainers.go +++ b/service/mediastore/api_op_ListContainers.go @@ -176,12 +176,13 @@ func NewListContainersPaginator(client ListContainersAPIClient, params *ListCont client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContainersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContainers page. @@ -208,7 +209,10 @@ func (p *ListContainersPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediastoredata/api_op_ListItems.go b/service/mediastoredata/api_op_ListItems.go index f84c6f539ca..e79c3875796 100644 --- a/service/mediastoredata/api_op_ListItems.go +++ b/service/mediastoredata/api_op_ListItems.go @@ -182,12 +182,13 @@ func NewListItemsPaginator(client ListItemsAPIClient, params *ListItemsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListItems page. @@ -214,7 +215,10 @@ func (p *ListItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_GetChannelSchedule.go b/service/mediatailor/api_op_GetChannelSchedule.go index 11e972492e8..8cc55efceab 100644 --- a/service/mediatailor/api_op_GetChannelSchedule.go +++ b/service/mediatailor/api_op_GetChannelSchedule.go @@ -177,12 +177,13 @@ func NewGetChannelSchedulePaginator(client GetChannelScheduleAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetChannelSchedulePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetChannelSchedule page. @@ -205,7 +206,10 @@ func (p *GetChannelSchedulePaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_ListAlerts.go b/service/mediatailor/api_op_ListAlerts.go index aa0791a061f..e8483be1cd2 100644 --- a/service/mediatailor/api_op_ListAlerts.go +++ b/service/mediatailor/api_op_ListAlerts.go @@ -171,12 +171,13 @@ func NewListAlertsPaginator(client ListAlertsAPIClient, params *ListAlertsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAlertsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAlerts page. @@ -199,7 +200,10 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_ListChannels.go b/service/mediatailor/api_op_ListChannels.go index dc99ad47c8e..2d7a02c2aec 100644 --- a/service/mediatailor/api_op_ListChannels.go +++ b/service/mediatailor/api_op_ListChannels.go @@ -163,12 +163,13 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChannels page. @@ -191,7 +192,10 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_ListPlaybackConfigurations.go b/service/mediatailor/api_op_ListPlaybackConfigurations.go index 0249d83bae5..088f238f2d3 100644 --- a/service/mediatailor/api_op_ListPlaybackConfigurations.go +++ b/service/mediatailor/api_op_ListPlaybackConfigurations.go @@ -171,12 +171,13 @@ func NewListPlaybackConfigurationsPaginator(client ListPlaybackConfigurationsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlaybackConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlaybackConfigurations page. @@ -199,7 +200,10 @@ func (p *ListPlaybackConfigurationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_ListPrefetchSchedules.go b/service/mediatailor/api_op_ListPrefetchSchedules.go index 180d3cd47bf..371251030b9 100644 --- a/service/mediatailor/api_op_ListPrefetchSchedules.go +++ b/service/mediatailor/api_op_ListPrefetchSchedules.go @@ -186,12 +186,13 @@ func NewListPrefetchSchedulesPaginator(client ListPrefetchSchedulesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPrefetchSchedulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPrefetchSchedules page. @@ -214,7 +215,10 @@ func (p *ListPrefetchSchedulesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_ListSourceLocations.go b/service/mediatailor/api_op_ListSourceLocations.go index 038a576fe3a..bf1e650c7d0 100644 --- a/service/mediatailor/api_op_ListSourceLocations.go +++ b/service/mediatailor/api_op_ListSourceLocations.go @@ -165,12 +165,13 @@ func NewListSourceLocationsPaginator(client ListSourceLocationsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSourceLocationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSourceLocations page. @@ -193,7 +194,10 @@ func (p *ListSourceLocationsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mediatailor/api_op_ListVodSources.go b/service/mediatailor/api_op_ListVodSources.go index 94122d5bc10..6b429a82e12 100644 --- a/service/mediatailor/api_op_ListVodSources.go +++ b/service/mediatailor/api_op_ListVodSources.go @@ -172,12 +172,13 @@ func NewListVodSourcesPaginator(client ListVodSourcesAPIClient, params *ListVodS client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVodSourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVodSources page. @@ -200,7 +201,10 @@ func (p *ListVodSourcesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mgn/api_op_DescribeJobLogItems.go b/service/mgn/api_op_DescribeJobLogItems.go index 434e6ddb185..c4c67cc6286 100644 --- a/service/mgn/api_op_DescribeJobLogItems.go +++ b/service/mgn/api_op_DescribeJobLogItems.go @@ -169,12 +169,13 @@ func NewDescribeJobLogItemsPaginator(client DescribeJobLogItemsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeJobLogItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeJobLogItems page. @@ -197,7 +198,10 @@ func (p *DescribeJobLogItemsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mgn/api_op_DescribeJobs.go b/service/mgn/api_op_DescribeJobs.go index 23c0f5a48f8..08367f8ffd5 100644 --- a/service/mgn/api_op_DescribeJobs.go +++ b/service/mgn/api_op_DescribeJobs.go @@ -172,12 +172,13 @@ func NewDescribeJobsPaginator(client DescribeJobsAPIClient, params *DescribeJobs client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeJobs page. @@ -200,7 +201,10 @@ func (p *DescribeJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go b/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go index 216b6a4a609..51823fdefc1 100644 --- a/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go +++ b/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go @@ -171,12 +171,13 @@ func NewDescribeReplicationConfigurationTemplatesPaginator(client DescribeReplic client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReplicationConfigurationTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReplicationConfigurationTemplates page. @@ -199,7 +200,10 @@ func (p *DescribeReplicationConfigurationTemplatesPaginator) NextPage(ctx contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mgn/api_op_DescribeSourceServers.go b/service/mgn/api_op_DescribeSourceServers.go index 30c9f43ec7c..8e637242b75 100644 --- a/service/mgn/api_op_DescribeSourceServers.go +++ b/service/mgn/api_op_DescribeSourceServers.go @@ -169,12 +169,13 @@ func NewDescribeSourceServersPaginator(client DescribeSourceServersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSourceServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSourceServers page. @@ -197,7 +198,10 @@ func (p *DescribeSourceServersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mgn/api_op_DescribeVcenterClients.go b/service/mgn/api_op_DescribeVcenterClients.go index 6f196bff548..ee429df3541 100644 --- a/service/mgn/api_op_DescribeVcenterClients.go +++ b/service/mgn/api_op_DescribeVcenterClients.go @@ -161,12 +161,13 @@ func NewDescribeVcenterClientsPaginator(client DescribeVcenterClientsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVcenterClientsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVcenterClients page. @@ -189,7 +190,10 @@ func (p *DescribeVcenterClientsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhub/api_op_ListApplicationStates.go b/service/migrationhub/api_op_ListApplicationStates.go index a0381f5fcb2..2dcf11c253c 100644 --- a/service/migrationhub/api_op_ListApplicationStates.go +++ b/service/migrationhub/api_op_ListApplicationStates.go @@ -171,12 +171,13 @@ func NewListApplicationStatesPaginator(client ListApplicationStatesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationStatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationStates page. @@ -203,7 +204,10 @@ func (p *ListApplicationStatesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhub/api_op_ListCreatedArtifacts.go b/service/migrationhub/api_op_ListCreatedArtifacts.go index 34dbaa1a466..1f8d8d6d4c3 100644 --- a/service/migrationhub/api_op_ListCreatedArtifacts.go +++ b/service/migrationhub/api_op_ListCreatedArtifacts.go @@ -189,12 +189,13 @@ func NewListCreatedArtifactsPaginator(client ListCreatedArtifactsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCreatedArtifactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCreatedArtifacts page. @@ -221,7 +222,10 @@ func (p *ListCreatedArtifactsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhub/api_op_ListDiscoveredResources.go b/service/migrationhub/api_op_ListDiscoveredResources.go index 0d33bf69ea8..ddb6676737d 100644 --- a/service/migrationhub/api_op_ListDiscoveredResources.go +++ b/service/migrationhub/api_op_ListDiscoveredResources.go @@ -178,12 +178,13 @@ func NewListDiscoveredResourcesPaginator(client ListDiscoveredResourcesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDiscoveredResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDiscoveredResources page. @@ -210,7 +211,10 @@ func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhub/api_op_ListMigrationTasks.go b/service/migrationhub/api_op_ListMigrationTasks.go index 2e1315f5063..7846151b1f2 100644 --- a/service/migrationhub/api_op_ListMigrationTasks.go +++ b/service/migrationhub/api_op_ListMigrationTasks.go @@ -179,12 +179,13 @@ func NewListMigrationTasksPaginator(client ListMigrationTasksAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMigrationTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMigrationTasks page. @@ -211,7 +212,10 @@ func (p *ListMigrationTasksPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhub/api_op_ListProgressUpdateStreams.go b/service/migrationhub/api_op_ListProgressUpdateStreams.go index b5c4af77314..68fc9d065ea 100644 --- a/service/migrationhub/api_op_ListProgressUpdateStreams.go +++ b/service/migrationhub/api_op_ListProgressUpdateStreams.go @@ -166,12 +166,13 @@ func NewListProgressUpdateStreamsPaginator(client ListProgressUpdateStreamsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProgressUpdateStreamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProgressUpdateStreams page. @@ -198,7 +199,10 @@ func (p *ListProgressUpdateStreamsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go b/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go index 7ce0298844a..66c8f6be8ba 100644 --- a/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go +++ b/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go @@ -181,12 +181,13 @@ func NewDescribeHomeRegionControlsPaginator(client DescribeHomeRegionControlsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeHomeRegionControlsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeHomeRegionControls page. @@ -213,7 +214,10 @@ func (p *DescribeHomeRegionControlsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubrefactorspaces/api_op_ListApplications.go b/service/migrationhubrefactorspaces/api_op_ListApplications.go index d523202ae8a..514106fb1d4 100644 --- a/service/migrationhubrefactorspaces/api_op_ListApplications.go +++ b/service/migrationhubrefactorspaces/api_op_ListApplications.go @@ -171,12 +171,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -203,7 +204,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go b/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go index 9d2a0b97a3a..9857d6f5d12 100644 --- a/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go +++ b/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go @@ -172,12 +172,13 @@ func NewListEnvironmentVpcsPaginator(client ListEnvironmentVpcsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentVpcsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironmentVpcs page. @@ -204,7 +205,10 @@ func (p *ListEnvironmentVpcsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubrefactorspaces/api_op_ListEnvironments.go b/service/migrationhubrefactorspaces/api_op_ListEnvironments.go index f0ff0a4416a..24f910e4ed9 100644 --- a/service/migrationhubrefactorspaces/api_op_ListEnvironments.go +++ b/service/migrationhubrefactorspaces/api_op_ListEnvironments.go @@ -163,12 +163,13 @@ func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironments page. @@ -195,7 +196,10 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubrefactorspaces/api_op_ListRoutes.go b/service/migrationhubrefactorspaces/api_op_ListRoutes.go index e6c87ad7628..3b44672a7ce 100644 --- a/service/migrationhubrefactorspaces/api_op_ListRoutes.go +++ b/service/migrationhubrefactorspaces/api_op_ListRoutes.go @@ -175,12 +175,13 @@ func NewListRoutesPaginator(client ListRoutesAPIClient, params *ListRoutesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoutesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoutes page. @@ -207,7 +208,10 @@ func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubrefactorspaces/api_op_ListServices.go b/service/migrationhubrefactorspaces/api_op_ListServices.go index b2a17b8574b..3b942768702 100644 --- a/service/migrationhubrefactorspaces/api_op_ListServices.go +++ b/service/migrationhubrefactorspaces/api_op_ListServices.go @@ -175,12 +175,13 @@ func NewListServicesPaginator(client ListServicesAPIClient, params *ListServices client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServices page. @@ -207,7 +208,10 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubstrategy/api_op_GetServerDetails.go b/service/migrationhubstrategy/api_op_GetServerDetails.go index 150e471916f..61714e85845 100644 --- a/service/migrationhubstrategy/api_op_GetServerDetails.go +++ b/service/migrationhubstrategy/api_op_GetServerDetails.go @@ -178,12 +178,13 @@ func NewGetServerDetailsPaginator(client GetServerDetailsAPIClient, params *GetS client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetServerDetailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetServerDetails page. @@ -210,7 +211,10 @@ func (p *GetServerDetailsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubstrategy/api_op_ListApplicationComponents.go b/service/migrationhubstrategy/api_op_ListApplicationComponents.go index 20d541e1dc8..52ba4b07bcc 100644 --- a/service/migrationhubstrategy/api_op_ListApplicationComponents.go +++ b/service/migrationhubstrategy/api_op_ListApplicationComponents.go @@ -184,12 +184,13 @@ func NewListApplicationComponentsPaginator(client ListApplicationComponentsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationComponents page. @@ -216,7 +217,10 @@ func (p *ListApplicationComponentsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubstrategy/api_op_ListCollectors.go b/service/migrationhubstrategy/api_op_ListCollectors.go index 9f29deb97d8..46f4c8e8c21 100644 --- a/service/migrationhubstrategy/api_op_ListCollectors.go +++ b/service/migrationhubstrategy/api_op_ListCollectors.go @@ -166,12 +166,13 @@ func NewListCollectorsPaginator(client ListCollectorsAPIClient, params *ListColl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCollectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCollectors page. @@ -198,7 +199,10 @@ func (p *ListCollectorsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubstrategy/api_op_ListImportFileTask.go b/service/migrationhubstrategy/api_op_ListImportFileTask.go index d76a35256fc..4c2761757a9 100644 --- a/service/migrationhubstrategy/api_op_ListImportFileTask.go +++ b/service/migrationhubstrategy/api_op_ListImportFileTask.go @@ -165,12 +165,13 @@ func NewListImportFileTaskPaginator(client ListImportFileTaskAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImportFileTaskPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImportFileTask page. @@ -197,7 +198,10 @@ func (p *ListImportFileTaskPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/migrationhubstrategy/api_op_ListServers.go b/service/migrationhubstrategy/api_op_ListServers.go index 23245ecc764..21013c1ab06 100644 --- a/service/migrationhubstrategy/api_op_ListServers.go +++ b/service/migrationhubstrategy/api_op_ListServers.go @@ -180,12 +180,13 @@ func NewListServersPaginator(client ListServersAPIClient, params *ListServersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServers page. @@ -212,7 +213,10 @@ func (p *ListServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mobile/api_op_ListBundles.go b/service/mobile/api_op_ListBundles.go index dc900f2b290..de6ec900840 100644 --- a/service/mobile/api_op_ListBundles.go +++ b/service/mobile/api_op_ListBundles.go @@ -164,12 +164,13 @@ func NewListBundlesPaginator(client ListBundlesAPIClient, params *ListBundlesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBundlesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBundles page. @@ -192,7 +193,10 @@ func (p *ListBundlesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mobile/api_op_ListProjects.go b/service/mobile/api_op_ListProjects.go index 7e577eb57cd..286afd62682 100644 --- a/service/mobile/api_op_ListProjects.go +++ b/service/mobile/api_op_ListProjects.go @@ -165,12 +165,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -193,7 +194,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mq/api_op_ListBrokers.go b/service/mq/api_op_ListBrokers.go index 2861002a97e..ea5c0f46ef8 100644 --- a/service/mq/api_op_ListBrokers.go +++ b/service/mq/api_op_ListBrokers.go @@ -163,12 +163,13 @@ func NewListBrokersPaginator(client ListBrokersAPIClient, params *ListBrokersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBrokersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBrokers page. @@ -191,7 +192,10 @@ func (p *ListBrokersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListAssignmentsForHIT.go b/service/mturk/api_op_ListAssignmentsForHIT.go index 8ffa816d11b..ec145adbd31 100644 --- a/service/mturk/api_op_ListAssignmentsForHIT.go +++ b/service/mturk/api_op_ListAssignmentsForHIT.go @@ -189,12 +189,13 @@ func NewListAssignmentsForHITPaginator(client ListAssignmentsForHITAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssignmentsForHITPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssignmentsForHIT page. @@ -221,7 +222,10 @@ func (p *ListAssignmentsForHITPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListBonusPayments.go b/service/mturk/api_op_ListBonusPayments.go index 3dfb24399f1..9ee3de065bc 100644 --- a/service/mturk/api_op_ListBonusPayments.go +++ b/service/mturk/api_op_ListBonusPayments.go @@ -177,12 +177,13 @@ func NewListBonusPaymentsPaginator(client ListBonusPaymentsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBonusPaymentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBonusPayments page. @@ -209,7 +210,10 @@ func (p *ListBonusPaymentsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListHITs.go b/service/mturk/api_op_ListHITs.go index 6d24d70d39d..bdf61abafce 100644 --- a/service/mturk/api_op_ListHITs.go +++ b/service/mturk/api_op_ListHITs.go @@ -164,12 +164,13 @@ func NewListHITsPaginator(client ListHITsAPIClient, params *ListHITsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHITsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHITs page. @@ -196,7 +197,10 @@ func (p *ListHITsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListHITsForQualificationType.go b/service/mturk/api_op_ListHITsForQualificationType.go index d556859a0b4..28b02ca467e 100644 --- a/service/mturk/api_op_ListHITsForQualificationType.go +++ b/service/mturk/api_op_ListHITsForQualificationType.go @@ -180,12 +180,13 @@ func NewListHITsForQualificationTypePaginator(client ListHITsForQualificationTyp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHITsForQualificationTypePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHITsForQualificationType page. @@ -212,7 +213,10 @@ func (p *ListHITsForQualificationTypePaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListQualificationRequests.go b/service/mturk/api_op_ListQualificationRequests.go index f05d5bb9cd7..f7fd7169e99 100644 --- a/service/mturk/api_op_ListQualificationRequests.go +++ b/service/mturk/api_op_ListQualificationRequests.go @@ -177,12 +177,13 @@ func NewListQualificationRequestsPaginator(client ListQualificationRequestsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQualificationRequestsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQualificationRequests page. @@ -209,7 +210,10 @@ func (p *ListQualificationRequestsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListQualificationTypes.go b/service/mturk/api_op_ListQualificationTypes.go index b24d4eff273..58dbbd06f2c 100644 --- a/service/mturk/api_op_ListQualificationTypes.go +++ b/service/mturk/api_op_ListQualificationTypes.go @@ -190,12 +190,13 @@ func NewListQualificationTypesPaginator(client ListQualificationTypesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQualificationTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQualificationTypes page. @@ -222,7 +223,10 @@ func (p *ListQualificationTypesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListReviewPolicyResultsForHIT.go b/service/mturk/api_op_ListReviewPolicyResultsForHIT.go index 026d4f6ac6a..abed7533dd2 100644 --- a/service/mturk/api_op_ListReviewPolicyResultsForHIT.go +++ b/service/mturk/api_op_ListReviewPolicyResultsForHIT.go @@ -204,12 +204,13 @@ func NewListReviewPolicyResultsForHITPaginator(client ListReviewPolicyResultsFor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReviewPolicyResultsForHITPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReviewPolicyResultsForHIT page. @@ -236,7 +237,10 @@ func (p *ListReviewPolicyResultsForHITPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListReviewableHITs.go b/service/mturk/api_op_ListReviewableHITs.go index bc989a75d1f..37a45e3433e 100644 --- a/service/mturk/api_op_ListReviewableHITs.go +++ b/service/mturk/api_op_ListReviewableHITs.go @@ -176,12 +176,13 @@ func NewListReviewableHITsPaginator(client ListReviewableHITsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReviewableHITsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReviewableHITs page. @@ -208,7 +209,10 @@ func (p *ListReviewableHITsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListWorkerBlocks.go b/service/mturk/api_op_ListWorkerBlocks.go index 5b70fe8a600..05597e008c2 100644 --- a/service/mturk/api_op_ListWorkerBlocks.go +++ b/service/mturk/api_op_ListWorkerBlocks.go @@ -165,12 +165,13 @@ func NewListWorkerBlocksPaginator(client ListWorkerBlocksAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkerBlocksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkerBlocks page. @@ -197,7 +198,10 @@ func (p *ListWorkerBlocksPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mturk/api_op_ListWorkersWithQualificationType.go b/service/mturk/api_op_ListWorkersWithQualificationType.go index b43f070a416..d92f9eab748 100644 --- a/service/mturk/api_op_ListWorkersWithQualificationType.go +++ b/service/mturk/api_op_ListWorkersWithQualificationType.go @@ -181,12 +181,13 @@ func NewListWorkersWithQualificationTypePaginator(client ListWorkersWithQualific client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkersWithQualificationTypePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkersWithQualificationType page. @@ -213,7 +214,10 @@ func (p *ListWorkersWithQualificationTypePaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/mwaa/api_op_ListEnvironments.go b/service/mwaa/api_op_ListEnvironments.go index 38c680d4823..8cb7ec711de 100644 --- a/service/mwaa/api_op_ListEnvironments.go +++ b/service/mwaa/api_op_ListEnvironments.go @@ -193,12 +193,13 @@ func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironments page. @@ -225,7 +226,10 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBClusterEndpoints.go b/service/neptune/api_op_DescribeDBClusterEndpoints.go index d3f386bffe5..30a206dbf72 100644 --- a/service/neptune/api_op_DescribeDBClusterEndpoints.go +++ b/service/neptune/api_op_DescribeDBClusterEndpoints.go @@ -198,12 +198,13 @@ func NewDescribeDBClusterEndpointsPaginator(client DescribeDBClusterEndpointsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterEndpoints page. @@ -230,7 +231,10 @@ func (p *DescribeDBClusterEndpointsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBClusterParameterGroups.go b/service/neptune/api_op_DescribeDBClusterParameterGroups.go index b16a20037c8..43196d90b48 100644 --- a/service/neptune/api_op_DescribeDBClusterParameterGroups.go +++ b/service/neptune/api_op_DescribeDBClusterParameterGroups.go @@ -190,12 +190,13 @@ func NewDescribeDBClusterParameterGroupsPaginator(client DescribeDBClusterParame client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterParameterGroups page. @@ -222,7 +223,10 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBClusterParameters.go b/service/neptune/api_op_DescribeDBClusterParameters.go index bee261415a1..dee0c9b2721 100644 --- a/service/neptune/api_op_DescribeDBClusterParameters.go +++ b/service/neptune/api_op_DescribeDBClusterParameters.go @@ -192,12 +192,13 @@ func NewDescribeDBClusterParametersPaginator(client DescribeDBClusterParametersA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterParameters page. @@ -224,7 +225,10 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBClusterSnapshots.go b/service/neptune/api_op_DescribeDBClusterSnapshots.go index 23acdaabbec..3eb6d3da3f8 100644 --- a/service/neptune/api_op_DescribeDBClusterSnapshots.go +++ b/service/neptune/api_op_DescribeDBClusterSnapshots.go @@ -238,12 +238,13 @@ func NewDescribeDBClusterSnapshotsPaginator(client DescribeDBClusterSnapshotsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterSnapshots page. @@ -270,7 +271,10 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBClusters.go b/service/neptune/api_op_DescribeDBClusters.go index 9a6a7152605..c1f00e8ea74 100644 --- a/service/neptune/api_op_DescribeDBClusters.go +++ b/service/neptune/api_op_DescribeDBClusters.go @@ -197,12 +197,13 @@ func NewDescribeDBClustersPaginator(client DescribeDBClustersAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusters page. @@ -229,7 +230,10 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBEngineVersions.go b/service/neptune/api_op_DescribeDBEngineVersions.go index b3109b59993..8f13890bb1a 100644 --- a/service/neptune/api_op_DescribeDBEngineVersions.go +++ b/service/neptune/api_op_DescribeDBEngineVersions.go @@ -204,12 +204,13 @@ func NewDescribeDBEngineVersionsPaginator(client DescribeDBEngineVersionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBEngineVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBEngineVersions page. @@ -236,7 +237,10 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBInstances.go b/service/neptune/api_op_DescribeDBInstances.go index 9b402f510b3..709c5ce22bb 100644 --- a/service/neptune/api_op_DescribeDBInstances.go +++ b/service/neptune/api_op_DescribeDBInstances.go @@ -206,12 +206,13 @@ func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBInstances page. @@ -238,7 +239,10 @@ func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBParameterGroups.go b/service/neptune/api_op_DescribeDBParameterGroups.go index 86ef788f05d..c523579946e 100644 --- a/service/neptune/api_op_DescribeDBParameterGroups.go +++ b/service/neptune/api_op_DescribeDBParameterGroups.go @@ -186,12 +186,13 @@ func NewDescribeDBParameterGroupsPaginator(client DescribeDBParameterGroupsAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBParameterGroups page. @@ -218,7 +219,10 @@ func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBParameters.go b/service/neptune/api_op_DescribeDBParameters.go index 5d7d557e74c..24c7f956e7c 100644 --- a/service/neptune/api_op_DescribeDBParameters.go +++ b/service/neptune/api_op_DescribeDBParameters.go @@ -189,12 +189,13 @@ func NewDescribeDBParametersPaginator(client DescribeDBParametersAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBParameters page. @@ -221,7 +222,10 @@ func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeDBSubnetGroups.go b/service/neptune/api_op_DescribeDBSubnetGroups.go index 216d8558a94..2b2696c73db 100644 --- a/service/neptune/api_op_DescribeDBSubnetGroups.go +++ b/service/neptune/api_op_DescribeDBSubnetGroups.go @@ -183,12 +183,13 @@ func NewDescribeDBSubnetGroupsPaginator(client DescribeDBSubnetGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBSubnetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBSubnetGroups page. @@ -215,7 +216,10 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeEngineDefaultParameters.go b/service/neptune/api_op_DescribeEngineDefaultParameters.go index 340de1e6bd0..36f3a67edcc 100644 --- a/service/neptune/api_op_DescribeEngineDefaultParameters.go +++ b/service/neptune/api_op_DescribeEngineDefaultParameters.go @@ -182,12 +182,13 @@ func NewDescribeEngineDefaultParametersPaginator(client DescribeEngineDefaultPar client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEngineDefaultParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEngineDefaultParameters page. @@ -217,7 +218,10 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, p.nextToken = result.EngineDefaults.Marker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeEventSubscriptions.go b/service/neptune/api_op_DescribeEventSubscriptions.go index 49893c451cc..336bc123c71 100644 --- a/service/neptune/api_op_DescribeEventSubscriptions.go +++ b/service/neptune/api_op_DescribeEventSubscriptions.go @@ -187,12 +187,13 @@ func NewDescribeEventSubscriptionsPaginator(client DescribeEventSubscriptionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventSubscriptions page. @@ -219,7 +220,10 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeEvents.go b/service/neptune/api_op_DescribeEvents.go index c68b47fb949..01841bf02ed 100644 --- a/service/neptune/api_op_DescribeEvents.go +++ b/service/neptune/api_op_DescribeEvents.go @@ -224,12 +224,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -256,7 +257,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go b/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go index 8b27849a8a5..836c6bb409b 100644 --- a/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go @@ -202,12 +202,13 @@ func NewDescribeOrderableDBInstanceOptionsPaginator(client DescribeOrderableDBIn client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrderableDBInstanceOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrderableDBInstanceOptions page. @@ -234,7 +235,10 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/neptune/api_op_DescribePendingMaintenanceActions.go b/service/neptune/api_op_DescribePendingMaintenanceActions.go index 2cbcdb2207b..c729ae57ee0 100644 --- a/service/neptune/api_op_DescribePendingMaintenanceActions.go +++ b/service/neptune/api_op_DescribePendingMaintenanceActions.go @@ -195,12 +195,13 @@ func NewDescribePendingMaintenanceActionsPaginator(client DescribePendingMainten client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePendingMaintenanceActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePendingMaintenanceActions page. @@ -227,7 +228,10 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkfirewall/api_op_ListFirewallPolicies.go b/service/networkfirewall/api_op_ListFirewallPolicies.go index fae83ba1275..a32943f5ce3 100644 --- a/service/networkfirewall/api_op_ListFirewallPolicies.go +++ b/service/networkfirewall/api_op_ListFirewallPolicies.go @@ -179,12 +179,13 @@ func NewListFirewallPoliciesPaginator(client ListFirewallPoliciesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallPolicies page. @@ -211,7 +212,10 @@ func (p *ListFirewallPoliciesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkfirewall/api_op_ListFirewalls.go b/service/networkfirewall/api_op_ListFirewalls.go index 8bea0d5ad10..369a311b041 100644 --- a/service/networkfirewall/api_op_ListFirewalls.go +++ b/service/networkfirewall/api_op_ListFirewalls.go @@ -183,12 +183,13 @@ func NewListFirewallsPaginator(client ListFirewallsAPIClient, params *ListFirewa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewalls page. @@ -215,7 +216,10 @@ func (p *ListFirewallsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkfirewall/api_op_ListRuleGroups.go b/service/networkfirewall/api_op_ListRuleGroups.go index 383c44a6287..f3d5ab04f84 100644 --- a/service/networkfirewall/api_op_ListRuleGroups.go +++ b/service/networkfirewall/api_op_ListRuleGroups.go @@ -177,12 +177,13 @@ func NewListRuleGroupsPaginator(client ListRuleGroupsAPIClient, params *ListRule client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRuleGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRuleGroups page. @@ -209,7 +210,10 @@ func (p *ListRuleGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkfirewall/api_op_ListTagsForResource.go b/service/networkfirewall/api_op_ListTagsForResource.go index 48a92325ab4..9b9b6f27013 100644 --- a/service/networkfirewall/api_op_ListTagsForResource.go +++ b/service/networkfirewall/api_op_ListTagsForResource.go @@ -189,12 +189,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -221,7 +222,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_DescribeGlobalNetworks.go b/service/networkmanager/api_op_DescribeGlobalNetworks.go index a8a0917c8c5..730971c3df8 100644 --- a/service/networkmanager/api_op_DescribeGlobalNetworks.go +++ b/service/networkmanager/api_op_DescribeGlobalNetworks.go @@ -167,12 +167,13 @@ func NewDescribeGlobalNetworksPaginator(client DescribeGlobalNetworksAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGlobalNetworksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGlobalNetworks page. @@ -199,7 +200,10 @@ func (p *DescribeGlobalNetworksPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetConnectPeerAssociations.go b/service/networkmanager/api_op_GetConnectPeerAssociations.go index 60bbb55fe83..f79515171c8 100644 --- a/service/networkmanager/api_op_GetConnectPeerAssociations.go +++ b/service/networkmanager/api_op_GetConnectPeerAssociations.go @@ -174,12 +174,13 @@ func NewGetConnectPeerAssociationsPaginator(client GetConnectPeerAssociationsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetConnectPeerAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetConnectPeerAssociations page. @@ -206,7 +207,10 @@ func (p *GetConnectPeerAssociationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetConnections.go b/service/networkmanager/api_op_GetConnections.go index 76c2adc0463..3f0f6af1f2e 100644 --- a/service/networkmanager/api_op_GetConnections.go +++ b/service/networkmanager/api_op_GetConnections.go @@ -174,12 +174,13 @@ func NewGetConnectionsPaginator(client GetConnectionsAPIClient, params *GetConne client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetConnections page. @@ -206,7 +207,10 @@ func (p *GetConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetCoreNetworkChangeSet.go b/service/networkmanager/api_op_GetCoreNetworkChangeSet.go index f8f0119895a..1ea2befbeb4 100644 --- a/service/networkmanager/api_op_GetCoreNetworkChangeSet.go +++ b/service/networkmanager/api_op_GetCoreNetworkChangeSet.go @@ -176,12 +176,13 @@ func NewGetCoreNetworkChangeSetPaginator(client GetCoreNetworkChangeSetAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCoreNetworkChangeSetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCoreNetworkChangeSet page. @@ -208,7 +209,10 @@ func (p *GetCoreNetworkChangeSetPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetCustomerGatewayAssociations.go b/service/networkmanager/api_op_GetCustomerGatewayAssociations.go index 66ea261f6c5..58cda061045 100644 --- a/service/networkmanager/api_op_GetCustomerGatewayAssociations.go +++ b/service/networkmanager/api_op_GetCustomerGatewayAssociations.go @@ -175,12 +175,13 @@ func NewGetCustomerGatewayAssociationsPaginator(client GetCustomerGatewayAssocia client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCustomerGatewayAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCustomerGatewayAssociations page. @@ -207,7 +208,10 @@ func (p *GetCustomerGatewayAssociationsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetDevices.go b/service/networkmanager/api_op_GetDevices.go index 1af6b16a5ee..7d9f157aa16 100644 --- a/service/networkmanager/api_op_GetDevices.go +++ b/service/networkmanager/api_op_GetDevices.go @@ -173,12 +173,13 @@ func NewGetDevicesPaginator(client GetDevicesAPIClient, params *GetDevicesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDevices page. @@ -205,7 +206,10 @@ func (p *GetDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetLinkAssociations.go b/service/networkmanager/api_op_GetLinkAssociations.go index 126013e4459..85e4107a077 100644 --- a/service/networkmanager/api_op_GetLinkAssociations.go +++ b/service/networkmanager/api_op_GetLinkAssociations.go @@ -176,12 +176,13 @@ func NewGetLinkAssociationsPaginator(client GetLinkAssociationsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetLinkAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetLinkAssociations page. @@ -208,7 +209,10 @@ func (p *GetLinkAssociationsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetLinks.go b/service/networkmanager/api_op_GetLinks.go index bef46553f1e..2b4acf00377 100644 --- a/service/networkmanager/api_op_GetLinks.go +++ b/service/networkmanager/api_op_GetLinks.go @@ -181,12 +181,13 @@ func NewGetLinksPaginator(client GetLinksAPIClient, params *GetLinksInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetLinksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetLinks page. @@ -213,7 +214,10 @@ func (p *GetLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetNetworkResourceCounts.go b/service/networkmanager/api_op_GetNetworkResourceCounts.go index 94a49170c34..3cffabb533a 100644 --- a/service/networkmanager/api_op_GetNetworkResourceCounts.go +++ b/service/networkmanager/api_op_GetNetworkResourceCounts.go @@ -209,12 +209,13 @@ func NewGetNetworkResourceCountsPaginator(client GetNetworkResourceCountsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetNetworkResourceCountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetNetworkResourceCounts page. @@ -241,7 +242,10 @@ func (p *GetNetworkResourceCountsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetNetworkResourceRelationships.go b/service/networkmanager/api_op_GetNetworkResourceRelationships.go index 12604edb54c..31ed5ce0bb5 100644 --- a/service/networkmanager/api_op_GetNetworkResourceRelationships.go +++ b/service/networkmanager/api_op_GetNetworkResourceRelationships.go @@ -224,12 +224,13 @@ func NewGetNetworkResourceRelationshipsPaginator(client GetNetworkResourceRelati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetNetworkResourceRelationshipsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetNetworkResourceRelationships page. @@ -256,7 +257,10 @@ func (p *GetNetworkResourceRelationshipsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetNetworkResources.go b/service/networkmanager/api_op_GetNetworkResources.go index fb19b639a95..01d066953b3 100644 --- a/service/networkmanager/api_op_GetNetworkResources.go +++ b/service/networkmanager/api_op_GetNetworkResources.go @@ -247,12 +247,13 @@ func NewGetNetworkResourcesPaginator(client GetNetworkResourcesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetNetworkResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetNetworkResources page. @@ -279,7 +280,10 @@ func (p *GetNetworkResourcesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetNetworkTelemetry.go b/service/networkmanager/api_op_GetNetworkTelemetry.go index 7df251fed6d..363b0b79f6d 100644 --- a/service/networkmanager/api_op_GetNetworkTelemetry.go +++ b/service/networkmanager/api_op_GetNetworkTelemetry.go @@ -222,12 +222,13 @@ func NewGetNetworkTelemetryPaginator(client GetNetworkTelemetryAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetNetworkTelemetryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetNetworkTelemetry page. @@ -254,7 +255,10 @@ func (p *GetNetworkTelemetryPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetSites.go b/service/networkmanager/api_op_GetSites.go index ae98611dd85..0ea230cedc4 100644 --- a/service/networkmanager/api_op_GetSites.go +++ b/service/networkmanager/api_op_GetSites.go @@ -170,12 +170,13 @@ func NewGetSitesPaginator(client GetSitesAPIClient, params *GetSitesInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSitesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSites page. @@ -202,7 +203,10 @@ func (p *GetSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go b/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go index 6a900dcf7ac..93f3a77507d 100644 --- a/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go +++ b/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go @@ -175,12 +175,13 @@ func NewGetTransitGatewayConnectPeerAssociationsPaginator(client GetTransitGatew client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayConnectPeerAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayConnectPeerAssociations page. @@ -207,7 +208,10 @@ func (p *GetTransitGatewayConnectPeerAssociationsPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_GetTransitGatewayRegistrations.go b/service/networkmanager/api_op_GetTransitGatewayRegistrations.go index cc031962b1c..0f747fcd635 100644 --- a/service/networkmanager/api_op_GetTransitGatewayRegistrations.go +++ b/service/networkmanager/api_op_GetTransitGatewayRegistrations.go @@ -176,12 +176,13 @@ func NewGetTransitGatewayRegistrationsPaginator(client GetTransitGatewayRegistra client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTransitGatewayRegistrationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTransitGatewayRegistrations page. @@ -208,7 +209,10 @@ func (p *GetTransitGatewayRegistrationsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_ListAttachments.go b/service/networkmanager/api_op_ListAttachments.go index 93319bcfd02..80d564bb92e 100644 --- a/service/networkmanager/api_op_ListAttachments.go +++ b/service/networkmanager/api_op_ListAttachments.go @@ -172,12 +172,13 @@ func NewListAttachmentsPaginator(client ListAttachmentsAPIClient, params *ListAt client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttachments page. @@ -204,7 +205,10 @@ func (p *ListAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_ListConnectPeers.go b/service/networkmanager/api_op_ListConnectPeers.go index 1a844d3cb6d..91c0845fc5a 100644 --- a/service/networkmanager/api_op_ListConnectPeers.go +++ b/service/networkmanager/api_op_ListConnectPeers.go @@ -166,12 +166,13 @@ func NewListConnectPeersPaginator(client ListConnectPeersAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConnectPeersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConnectPeers page. @@ -198,7 +199,10 @@ func (p *ListConnectPeersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go b/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go index 288ac3bdbd6..3ef5cb8ef03 100644 --- a/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go +++ b/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go @@ -171,12 +171,13 @@ func NewListCoreNetworkPolicyVersionsPaginator(client ListCoreNetworkPolicyVersi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCoreNetworkPolicyVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCoreNetworkPolicyVersions page. @@ -203,7 +204,10 @@ func (p *ListCoreNetworkPolicyVersionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/networkmanager/api_op_ListCoreNetworks.go b/service/networkmanager/api_op_ListCoreNetworks.go index c012ff17091..a8e03a681c5 100644 --- a/service/networkmanager/api_op_ListCoreNetworks.go +++ b/service/networkmanager/api_op_ListCoreNetworks.go @@ -160,12 +160,13 @@ func NewListCoreNetworksPaginator(client ListCoreNetworksAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCoreNetworksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCoreNetworks page. @@ -192,7 +193,10 @@ func (p *ListCoreNetworksPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListEulaAcceptances.go b/service/nimble/api_op_ListEulaAcceptances.go index d32d60ac6ce..4842b073bf1 100644 --- a/service/nimble/api_op_ListEulaAcceptances.go +++ b/service/nimble/api_op_ListEulaAcceptances.go @@ -164,12 +164,13 @@ func NewListEulaAcceptancesPaginator(client ListEulaAcceptancesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEulaAcceptancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEulaAcceptances page. @@ -190,7 +191,10 @@ func (p *ListEulaAcceptancesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListEulas.go b/service/nimble/api_op_ListEulas.go index 34d804cf796..777aa33f07a 100644 --- a/service/nimble/api_op_ListEulas.go +++ b/service/nimble/api_op_ListEulas.go @@ -154,12 +154,13 @@ func NewListEulasPaginator(client ListEulasAPIClient, params *ListEulasInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEulasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEulas page. @@ -180,7 +181,10 @@ func (p *ListEulasPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListLaunchProfileMembers.go b/service/nimble/api_op_ListLaunchProfileMembers.go index d229a5338aa..0148c9fe686 100644 --- a/service/nimble/api_op_ListLaunchProfileMembers.go +++ b/service/nimble/api_op_ListLaunchProfileMembers.go @@ -176,12 +176,13 @@ func NewListLaunchProfileMembersPaginator(client ListLaunchProfileMembersAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLaunchProfileMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLaunchProfileMembers page. @@ -204,7 +205,10 @@ func (p *ListLaunchProfileMembersPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListLaunchProfiles.go b/service/nimble/api_op_ListLaunchProfiles.go index 719361bb021..300425bc9d4 100644 --- a/service/nimble/api_op_ListLaunchProfiles.go +++ b/service/nimble/api_op_ListLaunchProfiles.go @@ -176,12 +176,13 @@ func NewListLaunchProfilesPaginator(client ListLaunchProfilesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLaunchProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLaunchProfiles page. @@ -204,7 +205,10 @@ func (p *ListLaunchProfilesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListStreamingImages.go b/service/nimble/api_op_ListStreamingImages.go index 9b990323424..13729c804fe 100644 --- a/service/nimble/api_op_ListStreamingImages.go +++ b/service/nimble/api_op_ListStreamingImages.go @@ -166,12 +166,13 @@ func NewListStreamingImagesPaginator(client ListStreamingImagesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamingImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamingImages page. @@ -192,7 +193,10 @@ func (p *ListStreamingImagesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListStreamingSessions.go b/service/nimble/api_op_ListStreamingSessions.go index 9b47b0bda13..2a3fa272944 100644 --- a/service/nimble/api_op_ListStreamingSessions.go +++ b/service/nimble/api_op_ListStreamingSessions.go @@ -170,12 +170,13 @@ func NewListStreamingSessionsPaginator(client ListStreamingSessionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamingSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamingSessions page. @@ -196,7 +197,10 @@ func (p *ListStreamingSessionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListStudioComponents.go b/service/nimble/api_op_ListStudioComponents.go index 3060f0a16fb..255b73d9376 100644 --- a/service/nimble/api_op_ListStudioComponents.go +++ b/service/nimble/api_op_ListStudioComponents.go @@ -176,12 +176,13 @@ func NewListStudioComponentsPaginator(client ListStudioComponentsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStudioComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStudioComponents page. @@ -204,7 +205,10 @@ func (p *ListStudioComponentsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListStudioMembers.go b/service/nimble/api_op_ListStudioMembers.go index 9d8bd389c8d..93aa74792eb 100644 --- a/service/nimble/api_op_ListStudioMembers.go +++ b/service/nimble/api_op_ListStudioMembers.go @@ -169,12 +169,13 @@ func NewListStudioMembersPaginator(client ListStudioMembersAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStudioMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStudioMembers page. @@ -197,7 +198,10 @@ func (p *ListStudioMembersPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/nimble/api_op_ListStudios.go b/service/nimble/api_op_ListStudios.go index 6ef8dbfa00a..d3451e749d6 100644 --- a/service/nimble/api_op_ListStudios.go +++ b/service/nimble/api_op_ListStudios.go @@ -154,12 +154,13 @@ func NewListStudiosPaginator(client ListStudiosAPIClient, params *ListStudiosInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStudiosPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStudios page. @@ -180,7 +181,10 @@ func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_DescribeDomainAutoTunes.go b/service/opensearch/api_op_DescribeDomainAutoTunes.go index bc8695346ce..b27c3eeb31a 100644 --- a/service/opensearch/api_op_DescribeDomainAutoTunes.go +++ b/service/opensearch/api_op_DescribeDomainAutoTunes.go @@ -182,12 +182,13 @@ func NewDescribeDomainAutoTunesPaginator(client DescribeDomainAutoTunesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDomainAutoTunesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDomainAutoTunes page. @@ -210,7 +211,10 @@ func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_DescribeInboundConnections.go b/service/opensearch/api_op_DescribeInboundConnections.go index 71af000be1d..ddf9a238f7c 100644 --- a/service/opensearch/api_op_DescribeInboundConnections.go +++ b/service/opensearch/api_op_DescribeInboundConnections.go @@ -186,12 +186,13 @@ func NewDescribeInboundConnectionsPaginator(client DescribeInboundConnectionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInboundConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInboundConnections page. @@ -214,7 +215,10 @@ func (p *DescribeInboundConnectionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_DescribeOutboundConnections.go b/service/opensearch/api_op_DescribeOutboundConnections.go index b34e1ce1511..d5863170d17 100644 --- a/service/opensearch/api_op_DescribeOutboundConnections.go +++ b/service/opensearch/api_op_DescribeOutboundConnections.go @@ -186,12 +186,13 @@ func NewDescribeOutboundConnectionsPaginator(client DescribeOutboundConnectionsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOutboundConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOutboundConnections page. @@ -214,7 +215,10 @@ func (p *DescribeOutboundConnectionsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_DescribePackages.go b/service/opensearch/api_op_DescribePackages.go index d5517ac5491..25f4381ed50 100644 --- a/service/opensearch/api_op_DescribePackages.go +++ b/service/opensearch/api_op_DescribePackages.go @@ -165,12 +165,13 @@ func NewDescribePackagesPaginator(client DescribePackagesAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePackages page. @@ -193,7 +194,10 @@ func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_DescribeReservedInstanceOfferings.go b/service/opensearch/api_op_DescribeReservedInstanceOfferings.go index e3edebb4380..72b6c82c391 100644 --- a/service/opensearch/api_op_DescribeReservedInstanceOfferings.go +++ b/service/opensearch/api_op_DescribeReservedInstanceOfferings.go @@ -171,12 +171,13 @@ func NewDescribeReservedInstanceOfferingsPaginator(client DescribeReservedInstan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedInstanceOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedInstanceOfferings page. @@ -199,7 +200,10 @@ func (p *DescribeReservedInstanceOfferingsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_DescribeReservedInstances.go b/service/opensearch/api_op_DescribeReservedInstances.go index 468f03bed9f..86085f221c1 100644 --- a/service/opensearch/api_op_DescribeReservedInstances.go +++ b/service/opensearch/api_op_DescribeReservedInstances.go @@ -170,12 +170,13 @@ func NewDescribeReservedInstancesPaginator(client DescribeReservedInstancesAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedInstances page. @@ -198,7 +199,10 @@ func (p *DescribeReservedInstancesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_GetPackageVersionHistory.go b/service/opensearch/api_op_GetPackageVersionHistory.go index 82ebe6d831b..fdb983da302 100644 --- a/service/opensearch/api_op_GetPackageVersionHistory.go +++ b/service/opensearch/api_op_GetPackageVersionHistory.go @@ -174,12 +174,13 @@ func NewGetPackageVersionHistoryPaginator(client GetPackageVersionHistoryAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetPackageVersionHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetPackageVersionHistory page. @@ -202,7 +203,10 @@ func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_GetUpgradeHistory.go b/service/opensearch/api_op_GetUpgradeHistory.go index 90b425ceaa2..1ebfa2a64f7 100644 --- a/service/opensearch/api_op_GetUpgradeHistory.go +++ b/service/opensearch/api_op_GetUpgradeHistory.go @@ -177,12 +177,13 @@ func NewGetUpgradeHistoryPaginator(client GetUpgradeHistoryAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetUpgradeHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetUpgradeHistory page. @@ -205,7 +206,10 @@ func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_ListDomainsForPackage.go b/service/opensearch/api_op_ListDomainsForPackage.go index 5a533c5698c..ac2f9636b3a 100644 --- a/service/opensearch/api_op_ListDomainsForPackage.go +++ b/service/opensearch/api_op_ListDomainsForPackage.go @@ -171,12 +171,13 @@ func NewListDomainsForPackagePaginator(client ListDomainsForPackageAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsForPackagePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomainsForPackage page. @@ -199,7 +200,10 @@ func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_ListInstanceTypeDetails.go b/service/opensearch/api_op_ListInstanceTypeDetails.go index 9b749c8b00d..0f72c79fe16 100644 --- a/service/opensearch/api_op_ListInstanceTypeDetails.go +++ b/service/opensearch/api_op_ListInstanceTypeDetails.go @@ -174,12 +174,13 @@ func NewListInstanceTypeDetailsPaginator(client ListInstanceTypeDetailsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstanceTypeDetailsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstanceTypeDetails page. @@ -202,7 +203,10 @@ func (p *ListInstanceTypeDetailsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_ListPackagesForDomain.go b/service/opensearch/api_op_ListPackagesForDomain.go index f50b48f1699..41e58bbecf7 100644 --- a/service/opensearch/api_op_ListPackagesForDomain.go +++ b/service/opensearch/api_op_ListPackagesForDomain.go @@ -172,12 +172,13 @@ func NewListPackagesForDomainPaginator(client ListPackagesForDomainAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagesForDomainPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackagesForDomain page. @@ -200,7 +201,10 @@ func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opensearch/api_op_ListVersions.go b/service/opensearch/api_op_ListVersions.go index 77deb23d209..fda8f1a3299 100644 --- a/service/opensearch/api_op_ListVersions.go +++ b/service/opensearch/api_op_ListVersions.go @@ -170,12 +170,13 @@ func NewListVersionsPaginator(client ListVersionsAPIClient, params *ListVersions client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVersions page. @@ -198,7 +199,10 @@ func (p *ListVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opsworks/api_op_DescribeEcsClusters.go b/service/opsworks/api_op_DescribeEcsClusters.go index 61e1af98ac9..b3f2aff0a8c 100644 --- a/service/opsworks/api_op_DescribeEcsClusters.go +++ b/service/opsworks/api_op_DescribeEcsClusters.go @@ -191,12 +191,13 @@ func NewDescribeEcsClustersPaginator(client DescribeEcsClustersAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEcsClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEcsClusters page. @@ -223,7 +224,10 @@ func (p *DescribeEcsClustersPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opsworkscm/api_op_DescribeBackups.go b/service/opsworkscm/api_op_DescribeBackups.go index 397a4e7f10c..2b19abbf22c 100644 --- a/service/opsworkscm/api_op_DescribeBackups.go +++ b/service/opsworkscm/api_op_DescribeBackups.go @@ -170,12 +170,13 @@ func NewDescribeBackupsPaginator(client DescribeBackupsAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeBackupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeBackups page. @@ -202,7 +203,10 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opsworkscm/api_op_DescribeEvents.go b/service/opsworkscm/api_op_DescribeEvents.go index 91628e6496c..7c0e4fca565 100644 --- a/service/opsworkscm/api_op_DescribeEvents.go +++ b/service/opsworkscm/api_op_DescribeEvents.go @@ -189,12 +189,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -221,7 +222,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opsworkscm/api_op_DescribeServers.go b/service/opsworkscm/api_op_DescribeServers.go index df3d8401546..98ad0c7668d 100644 --- a/service/opsworkscm/api_op_DescribeServers.go +++ b/service/opsworkscm/api_op_DescribeServers.go @@ -184,12 +184,13 @@ func NewDescribeServersPaginator(client DescribeServersAPIClient, params *Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeServers page. @@ -216,7 +217,10 @@ func (p *DescribeServersPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/opsworkscm/api_op_ListTagsForResource.go b/service/opsworkscm/api_op_ListTagsForResource.go index 6cd33adf9f7..9755ca439eb 100644 --- a/service/opsworkscm/api_op_ListTagsForResource.go +++ b/service/opsworkscm/api_op_ListTagsForResource.go @@ -187,12 +187,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -219,7 +220,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListAWSServiceAccessForOrganization.go b/service/organizations/api_op_ListAWSServiceAccessForOrganization.go index 831b4dffb14..615fd9e2e42 100644 --- a/service/organizations/api_op_ListAWSServiceAccessForOrganization.go +++ b/service/organizations/api_op_ListAWSServiceAccessForOrganization.go @@ -196,12 +196,13 @@ func NewListAWSServiceAccessForOrganizationPaginator(client ListAWSServiceAccess client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAWSServiceAccessForOrganizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAWSServiceAccessForOrganization page. @@ -228,7 +229,10 @@ func (p *ListAWSServiceAccessForOrganizationPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListAccounts.go b/service/organizations/api_op_ListAccounts.go index 99189fd130d..b401c7189ad 100644 --- a/service/organizations/api_op_ListAccounts.go +++ b/service/organizations/api_op_ListAccounts.go @@ -189,12 +189,13 @@ func NewListAccountsPaginator(client ListAccountsAPIClient, params *ListAccounts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccounts page. @@ -221,7 +222,10 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListAccountsForParent.go b/service/organizations/api_op_ListAccountsForParent.go index 2139bb9959c..6b680761eca 100644 --- a/service/organizations/api_op_ListAccountsForParent.go +++ b/service/organizations/api_op_ListAccountsForParent.go @@ -202,12 +202,13 @@ func NewListAccountsForParentPaginator(client ListAccountsForParentAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountsForParentPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountsForParent page. @@ -234,7 +235,10 @@ func (p *ListAccountsForParentPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListChildren.go b/service/organizations/api_op_ListChildren.go index 369ffa38d4a..7fc789b08b4 100644 --- a/service/organizations/api_op_ListChildren.go +++ b/service/organizations/api_op_ListChildren.go @@ -212,12 +212,13 @@ func NewListChildrenPaginator(client ListChildrenAPIClient, params *ListChildren client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListChildrenPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListChildren page. @@ -244,7 +245,10 @@ func (p *ListChildrenPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListCreateAccountStatus.go b/service/organizations/api_op_ListCreateAccountStatus.go index 75be9b3f322..85b7843586a 100644 --- a/service/organizations/api_op_ListCreateAccountStatus.go +++ b/service/organizations/api_op_ListCreateAccountStatus.go @@ -197,12 +197,13 @@ func NewListCreateAccountStatusPaginator(client ListCreateAccountStatusAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCreateAccountStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCreateAccountStatus page. @@ -229,7 +230,10 @@ func (p *ListCreateAccountStatusPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListDelegatedAdministrators.go b/service/organizations/api_op_ListDelegatedAdministrators.go index d81df296fd2..ed0ad884c69 100644 --- a/service/organizations/api_op_ListDelegatedAdministrators.go +++ b/service/organizations/api_op_ListDelegatedAdministrators.go @@ -194,12 +194,13 @@ func NewListDelegatedAdministratorsPaginator(client ListDelegatedAdministratorsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDelegatedAdministratorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDelegatedAdministrators page. @@ -226,7 +227,10 @@ func (p *ListDelegatedAdministratorsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListDelegatedServicesForAccount.go b/service/organizations/api_op_ListDelegatedServicesForAccount.go index d48875e810a..08507265fd3 100644 --- a/service/organizations/api_op_ListDelegatedServicesForAccount.go +++ b/service/organizations/api_op_ListDelegatedServicesForAccount.go @@ -196,12 +196,13 @@ func NewListDelegatedServicesForAccountPaginator(client ListDelegatedServicesFor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDelegatedServicesForAccountPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDelegatedServicesForAccount page. @@ -228,7 +229,10 @@ func (p *ListDelegatedServicesForAccountPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListHandshakesForAccount.go b/service/organizations/api_op_ListHandshakesForAccount.go index ae332904070..d8d5d8370ae 100644 --- a/service/organizations/api_op_ListHandshakesForAccount.go +++ b/service/organizations/api_op_ListHandshakesForAccount.go @@ -201,12 +201,13 @@ func NewListHandshakesForAccountPaginator(client ListHandshakesForAccountAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHandshakesForAccountPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHandshakesForAccount page. @@ -233,7 +234,10 @@ func (p *ListHandshakesForAccountPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListHandshakesForOrganization.go b/service/organizations/api_op_ListHandshakesForOrganization.go index 1603d1b13ab..008e75ceebd 100644 --- a/service/organizations/api_op_ListHandshakesForOrganization.go +++ b/service/organizations/api_op_ListHandshakesForOrganization.go @@ -205,12 +205,13 @@ func NewListHandshakesForOrganizationPaginator(client ListHandshakesForOrganizat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHandshakesForOrganizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHandshakesForOrganization page. @@ -237,7 +238,10 @@ func (p *ListHandshakesForOrganizationPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListOrganizationalUnitsForParent.go b/service/organizations/api_op_ListOrganizationalUnitsForParent.go index 8bce0cfd392..58e4971e037 100644 --- a/service/organizations/api_op_ListOrganizationalUnitsForParent.go +++ b/service/organizations/api_op_ListOrganizationalUnitsForParent.go @@ -209,12 +209,13 @@ func NewListOrganizationalUnitsForParentPaginator(client ListOrganizationalUnits client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationalUnitsForParentPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizationalUnitsForParent page. @@ -241,7 +242,10 @@ func (p *ListOrganizationalUnitsForParentPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListParents.go b/service/organizations/api_op_ListParents.go index e2ac1ed3120..beeb174d7eb 100644 --- a/service/organizations/api_op_ListParents.go +++ b/service/organizations/api_op_ListParents.go @@ -209,12 +209,13 @@ func NewListParentsPaginator(client ListParentsAPIClient, params *ListParentsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListParentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListParents page. @@ -241,7 +242,10 @@ func (p *ListParentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListPolicies.go b/service/organizations/api_op_ListPolicies.go index 77cca32c325..fb41594b9a2 100644 --- a/service/organizations/api_op_ListPolicies.go +++ b/service/organizations/api_op_ListPolicies.go @@ -213,12 +213,13 @@ func NewListPoliciesPaginator(client ListPoliciesAPIClient, params *ListPolicies client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPolicies page. @@ -245,7 +246,10 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListPoliciesForTarget.go b/service/organizations/api_op_ListPoliciesForTarget.go index 1468860413c..7ec44f1cf6b 100644 --- a/service/organizations/api_op_ListPoliciesForTarget.go +++ b/service/organizations/api_op_ListPoliciesForTarget.go @@ -234,12 +234,13 @@ func NewListPoliciesForTargetPaginator(client ListPoliciesForTargetAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPoliciesForTargetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPoliciesForTarget page. @@ -266,7 +267,10 @@ func (p *ListPoliciesForTargetPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListRoots.go b/service/organizations/api_op_ListRoots.go index fa09e869cb4..4bdffc1bbcb 100644 --- a/service/organizations/api_op_ListRoots.go +++ b/service/organizations/api_op_ListRoots.go @@ -192,12 +192,13 @@ func NewListRootsPaginator(client ListRootsAPIClient, params *ListRootsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRootsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoots page. @@ -224,7 +225,10 @@ func (p *ListRootsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListTagsForResource.go b/service/organizations/api_op_ListTagsForResource.go index 44db92d078c..058e1ad1fc3 100644 --- a/service/organizations/api_op_ListTagsForResource.go +++ b/service/organizations/api_op_ListTagsForResource.go @@ -193,12 +193,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -219,7 +220,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/organizations/api_op_ListTargetsForPolicy.go b/service/organizations/api_op_ListTargetsForPolicy.go index 52c5e5e9899..f602760d513 100644 --- a/service/organizations/api_op_ListTargetsForPolicy.go +++ b/service/organizations/api_op_ListTargetsForPolicy.go @@ -202,12 +202,13 @@ func NewListTargetsForPolicyPaginator(client ListTargetsForPolicyAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTargetsForPolicyPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTargetsForPolicy page. @@ -234,7 +235,10 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/outposts/api_op_ListCatalogItems.go b/service/outposts/api_op_ListCatalogItems.go index ea75a584e0a..3091d751e39 100644 --- a/service/outposts/api_op_ListCatalogItems.go +++ b/service/outposts/api_op_ListCatalogItems.go @@ -182,12 +182,13 @@ func NewListCatalogItemsPaginator(client ListCatalogItemsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCatalogItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCatalogItems page. @@ -214,7 +215,10 @@ func (p *ListCatalogItemsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/outposts/api_op_ListOrders.go b/service/outposts/api_op_ListOrders.go index cc05829e29b..138631d6917 100644 --- a/service/outposts/api_op_ListOrders.go +++ b/service/outposts/api_op_ListOrders.go @@ -163,12 +163,13 @@ func NewListOrdersPaginator(client ListOrdersAPIClient, params *ListOrdersInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrdersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrders page. @@ -195,7 +196,10 @@ func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/outposts/api_op_ListOutposts.go b/service/outposts/api_op_ListOutposts.go index 4eda8027275..af7d51cd8f0 100644 --- a/service/outposts/api_op_ListOutposts.go +++ b/service/outposts/api_op_ListOutposts.go @@ -181,12 +181,13 @@ func NewListOutpostsPaginator(client ListOutpostsAPIClient, params *ListOutposts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOutpostsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOutposts page. @@ -213,7 +214,10 @@ func (p *ListOutpostsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/outposts/api_op_ListSites.go b/service/outposts/api_op_ListSites.go index b37fa3b49fb..f519337e51c 100644 --- a/service/outposts/api_op_ListSites.go +++ b/service/outposts/api_op_ListSites.go @@ -159,12 +159,13 @@ func NewListSitesPaginator(client ListSitesAPIClient, params *ListSitesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSitesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSites page. @@ -191,7 +192,10 @@ func (p *ListSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListApplicationInstanceDependencies.go b/service/panorama/api_op_ListApplicationInstanceDependencies.go index 9e615cb264d..161e8e6e096 100644 --- a/service/panorama/api_op_ListApplicationInstanceDependencies.go +++ b/service/panorama/api_op_ListApplicationInstanceDependencies.go @@ -174,12 +174,13 @@ func NewListApplicationInstanceDependenciesPaginator(client ListApplicationInsta client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationInstanceDependenciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationInstanceDependencies page. @@ -202,7 +203,10 @@ func (p *ListApplicationInstanceDependenciesPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListApplicationInstanceNodeInstances.go b/service/panorama/api_op_ListApplicationInstanceNodeInstances.go index c98865fc092..084a55aaf2b 100644 --- a/service/panorama/api_op_ListApplicationInstanceNodeInstances.go +++ b/service/panorama/api_op_ListApplicationInstanceNodeInstances.go @@ -172,12 +172,13 @@ func NewListApplicationInstanceNodeInstancesPaginator(client ListApplicationInst client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationInstanceNodeInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationInstanceNodeInstances page. @@ -200,7 +201,10 @@ func (p *ListApplicationInstanceNodeInstancesPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListApplicationInstances.go b/service/panorama/api_op_ListApplicationInstances.go index ee7fda10055..82b099a4be9 100644 --- a/service/panorama/api_op_ListApplicationInstances.go +++ b/service/panorama/api_op_ListApplicationInstances.go @@ -169,12 +169,13 @@ func NewListApplicationInstancesPaginator(client ListApplicationInstancesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationInstances page. @@ -197,7 +198,10 @@ func (p *ListApplicationInstancesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListDevices.go b/service/panorama/api_op_ListDevices.go index 36f8aeb570b..561b30d8cad 100644 --- a/service/panorama/api_op_ListDevices.go +++ b/service/panorama/api_op_ListDevices.go @@ -162,12 +162,13 @@ func NewListDevicesPaginator(client ListDevicesAPIClient, params *ListDevicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevices page. @@ -190,7 +191,10 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListDevicesJobs.go b/service/panorama/api_op_ListDevicesJobs.go index 7e8da71ca7b..a00618a26f1 100644 --- a/service/panorama/api_op_ListDevicesJobs.go +++ b/service/panorama/api_op_ListDevicesJobs.go @@ -164,12 +164,13 @@ func NewListDevicesJobsPaginator(client ListDevicesJobsAPIClient, params *ListDe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicesJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevicesJobs page. @@ -192,7 +193,10 @@ func (p *ListDevicesJobsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListNodeFromTemplateJobs.go b/service/panorama/api_op_ListNodeFromTemplateJobs.go index 391eeed8cdc..b1d08376e52 100644 --- a/service/panorama/api_op_ListNodeFromTemplateJobs.go +++ b/service/panorama/api_op_ListNodeFromTemplateJobs.go @@ -165,12 +165,13 @@ func NewListNodeFromTemplateJobsPaginator(client ListNodeFromTemplateJobsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNodeFromTemplateJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNodeFromTemplateJobs page. @@ -193,7 +194,10 @@ func (p *ListNodeFromTemplateJobsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListNodes.go b/service/panorama/api_op_ListNodes.go index 9f28f7a5f56..498d92b0d5c 100644 --- a/service/panorama/api_op_ListNodes.go +++ b/service/panorama/api_op_ListNodes.go @@ -175,12 +175,13 @@ func NewListNodesPaginator(client ListNodesAPIClient, params *ListNodesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNodesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNodes page. @@ -203,7 +204,10 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListPackageImportJobs.go b/service/panorama/api_op_ListPackageImportJobs.go index a988a0d0772..9b345cec07e 100644 --- a/service/panorama/api_op_ListPackageImportJobs.go +++ b/service/panorama/api_op_ListPackageImportJobs.go @@ -164,12 +164,13 @@ func NewListPackageImportJobsPaginator(client ListPackageImportJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackageImportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackageImportJobs page. @@ -192,7 +193,10 @@ func (p *ListPackageImportJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/panorama/api_op_ListPackages.go b/service/panorama/api_op_ListPackages.go index 7778c24456f..8c976b89ef4 100644 --- a/service/panorama/api_op_ListPackages.go +++ b/service/panorama/api_op_ListPackages.go @@ -160,12 +160,13 @@ func NewListPackagesPaginator(client ListPackagesAPIClient, params *ListPackages client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPackages page. @@ -188,7 +189,10 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListBatchInferenceJobs.go b/service/personalize/api_op_ListBatchInferenceJobs.go index 229004110ea..759ec7ef427 100644 --- a/service/personalize/api_op_ListBatchInferenceJobs.go +++ b/service/personalize/api_op_ListBatchInferenceJobs.go @@ -169,12 +169,13 @@ func NewListBatchInferenceJobsPaginator(client ListBatchInferenceJobsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBatchInferenceJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBatchInferenceJobs page. @@ -201,7 +202,10 @@ func (p *ListBatchInferenceJobsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListBatchSegmentJobs.go b/service/personalize/api_op_ListBatchSegmentJobs.go index 58cf104d8d0..34350a1eade 100644 --- a/service/personalize/api_op_ListBatchSegmentJobs.go +++ b/service/personalize/api_op_ListBatchSegmentJobs.go @@ -169,12 +169,13 @@ func NewListBatchSegmentJobsPaginator(client ListBatchSegmentJobsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBatchSegmentJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBatchSegmentJobs page. @@ -201,7 +202,10 @@ func (p *ListBatchSegmentJobsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListCampaigns.go b/service/personalize/api_op_ListCampaigns.go index bff30583cee..4d7326b9d07 100644 --- a/service/personalize/api_op_ListCampaigns.go +++ b/service/personalize/api_op_ListCampaigns.go @@ -168,12 +168,13 @@ func NewListCampaignsPaginator(client ListCampaignsAPIClient, params *ListCampai client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCampaignsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCampaigns page. @@ -200,7 +201,10 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListDatasetExportJobs.go b/service/personalize/api_op_ListDatasetExportJobs.go index 5dafc146874..288b4026a44 100644 --- a/service/personalize/api_op_ListDatasetExportJobs.go +++ b/service/personalize/api_op_ListDatasetExportJobs.go @@ -171,12 +171,13 @@ func NewListDatasetExportJobsPaginator(client ListDatasetExportJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetExportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetExportJobs page. @@ -203,7 +204,10 @@ func (p *ListDatasetExportJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListDatasetGroups.go b/service/personalize/api_op_ListDatasetGroups.go index 2a029b7bff8..dc56181ae8f 100644 --- a/service/personalize/api_op_ListDatasetGroups.go +++ b/service/personalize/api_op_ListDatasetGroups.go @@ -163,12 +163,13 @@ func NewListDatasetGroupsPaginator(client ListDatasetGroupsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetGroups page. @@ -195,7 +196,10 @@ func (p *ListDatasetGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListDatasetImportJobs.go b/service/personalize/api_op_ListDatasetImportJobs.go index 69dbb7ffd8f..11cc6e44325 100644 --- a/service/personalize/api_op_ListDatasetImportJobs.go +++ b/service/personalize/api_op_ListDatasetImportJobs.go @@ -171,12 +171,13 @@ func NewListDatasetImportJobsPaginator(client ListDatasetImportJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetImportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetImportJobs page. @@ -203,7 +204,10 @@ func (p *ListDatasetImportJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListDatasets.go b/service/personalize/api_op_ListDatasets.go index 262ba657ca4..cb02d26de3d 100644 --- a/service/personalize/api_op_ListDatasets.go +++ b/service/personalize/api_op_ListDatasets.go @@ -166,12 +166,13 @@ func NewListDatasetsPaginator(client ListDatasetsAPIClient, params *ListDatasets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasets page. @@ -198,7 +199,10 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListEventTrackers.go b/service/personalize/api_op_ListEventTrackers.go index dd7ada2fb82..48852e908c4 100644 --- a/service/personalize/api_op_ListEventTrackers.go +++ b/service/personalize/api_op_ListEventTrackers.go @@ -167,12 +167,13 @@ func NewListEventTrackersPaginator(client ListEventTrackersAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEventTrackersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEventTrackers page. @@ -199,7 +200,10 @@ func (p *ListEventTrackersPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListFilters.go b/service/personalize/api_op_ListFilters.go index 856470ef10e..f08257c975d 100644 --- a/service/personalize/api_op_ListFilters.go +++ b/service/personalize/api_op_ListFilters.go @@ -163,12 +163,13 @@ func NewListFiltersPaginator(client ListFiltersAPIClient, params *ListFiltersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFilters page. @@ -195,7 +196,10 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListRecipes.go b/service/personalize/api_op_ListRecipes.go index fd998eab40e..9b6d8810992 100644 --- a/service/personalize/api_op_ListRecipes.go +++ b/service/personalize/api_op_ListRecipes.go @@ -169,12 +169,13 @@ func NewListRecipesPaginator(client ListRecipesAPIClient, params *ListRecipesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecipesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecipes page. @@ -201,7 +202,10 @@ func (p *ListRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListRecommenders.go b/service/personalize/api_op_ListRecommenders.go index 567bc174c66..3facce6b6f8 100644 --- a/service/personalize/api_op_ListRecommenders.go +++ b/service/personalize/api_op_ListRecommenders.go @@ -171,12 +171,13 @@ func NewListRecommendersPaginator(client ListRecommendersAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecommendersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecommenders page. @@ -203,7 +204,10 @@ func (p *ListRecommendersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListSchemas.go b/service/personalize/api_op_ListSchemas.go index e7a5bebf80a..7e462aa0465 100644 --- a/service/personalize/api_op_ListSchemas.go +++ b/service/personalize/api_op_ListSchemas.go @@ -162,12 +162,13 @@ func NewListSchemasPaginator(client ListSchemasAPIClient, params *ListSchemasInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchemasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchemas page. @@ -194,7 +195,10 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListSolutionVersions.go b/service/personalize/api_op_ListSolutionVersions.go index 8c003dfb889..644e076b535 100644 --- a/service/personalize/api_op_ListSolutionVersions.go +++ b/service/personalize/api_op_ListSolutionVersions.go @@ -169,12 +169,13 @@ func NewListSolutionVersionsPaginator(client ListSolutionVersionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSolutionVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSolutionVersions page. @@ -201,7 +202,10 @@ func (p *ListSolutionVersionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/personalize/api_op_ListSolutions.go b/service/personalize/api_op_ListSolutions.go index 5ec45ba0d0f..aaf3c39f6f6 100644 --- a/service/personalize/api_op_ListSolutions.go +++ b/service/personalize/api_op_ListSolutions.go @@ -167,12 +167,13 @@ func NewListSolutionsPaginator(client ListSolutionsAPIClient, params *ListSoluti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSolutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSolutions page. @@ -199,7 +200,10 @@ func (p *ListSolutionsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pinpointemail/api_op_GetDedicatedIps.go b/service/pinpointemail/api_op_GetDedicatedIps.go index 972e8b5fba8..42df983647a 100644 --- a/service/pinpointemail/api_op_GetDedicatedIps.go +++ b/service/pinpointemail/api_op_GetDedicatedIps.go @@ -177,12 +177,13 @@ func NewGetDedicatedIpsPaginator(client GetDedicatedIpsAPIClient, params *GetDed client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDedicatedIpsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDedicatedIps page. @@ -209,7 +210,10 @@ func (p *GetDedicatedIpsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pinpointemail/api_op_ListConfigurationSets.go b/service/pinpointemail/api_op_ListConfigurationSets.go index 6d5210e5f9c..df155215570 100644 --- a/service/pinpointemail/api_op_ListConfigurationSets.go +++ b/service/pinpointemail/api_op_ListConfigurationSets.go @@ -179,12 +179,13 @@ func NewListConfigurationSetsPaginator(client ListConfigurationSetsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigurationSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigurationSets page. @@ -211,7 +212,10 @@ func (p *ListConfigurationSetsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pinpointemail/api_op_ListDedicatedIpPools.go b/service/pinpointemail/api_op_ListDedicatedIpPools.go index 6c22967f9f9..237756c9975 100644 --- a/service/pinpointemail/api_op_ListDedicatedIpPools.go +++ b/service/pinpointemail/api_op_ListDedicatedIpPools.go @@ -173,12 +173,13 @@ func NewListDedicatedIpPoolsPaginator(client ListDedicatedIpPoolsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDedicatedIpPoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDedicatedIpPools page. @@ -205,7 +206,10 @@ func (p *ListDedicatedIpPoolsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pinpointemail/api_op_ListDeliverabilityTestReports.go b/service/pinpointemail/api_op_ListDeliverabilityTestReports.go index 4bd8b3970e2..aad69d3c911 100644 --- a/service/pinpointemail/api_op_ListDeliverabilityTestReports.go +++ b/service/pinpointemail/api_op_ListDeliverabilityTestReports.go @@ -185,12 +185,13 @@ func NewListDeliverabilityTestReportsPaginator(client ListDeliverabilityTestRepo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeliverabilityTestReportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeliverabilityTestReports page. @@ -217,7 +218,10 @@ func (p *ListDeliverabilityTestReportsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go b/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go index 4fdcc168e39..5d25389a068 100644 --- a/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go +++ b/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go @@ -209,12 +209,13 @@ func NewListDomainDeliverabilityCampaignsPaginator(client ListDomainDeliverabili client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainDeliverabilityCampaignsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomainDeliverabilityCampaigns page. @@ -241,7 +242,10 @@ func (p *ListDomainDeliverabilityCampaignsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pinpointemail/api_op_ListEmailIdentities.go b/service/pinpointemail/api_op_ListEmailIdentities.go index a301ac00975..d9b70857e73 100644 --- a/service/pinpointemail/api_op_ListEmailIdentities.go +++ b/service/pinpointemail/api_op_ListEmailIdentities.go @@ -183,12 +183,13 @@ func NewListEmailIdentitiesPaginator(client ListEmailIdentitiesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEmailIdentitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEmailIdentities page. @@ -215,7 +216,10 @@ func (p *ListEmailIdentitiesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/polly/api_op_ListSpeechSynthesisTasks.go b/service/polly/api_op_ListSpeechSynthesisTasks.go index d85f55f7079..e5c6d651bc7 100644 --- a/service/polly/api_op_ListSpeechSynthesisTasks.go +++ b/service/polly/api_op_ListSpeechSynthesisTasks.go @@ -171,12 +171,13 @@ func NewListSpeechSynthesisTasksPaginator(client ListSpeechSynthesisTasksAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSpeechSynthesisTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSpeechSynthesisTasks page. @@ -203,7 +204,10 @@ func (p *ListSpeechSynthesisTasksPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pricing/api_op_DescribeServices.go b/service/pricing/api_op_DescribeServices.go index 201f4b36cd0..450bdd4b58c 100644 --- a/service/pricing/api_op_DescribeServices.go +++ b/service/pricing/api_op_DescribeServices.go @@ -177,12 +177,13 @@ func NewDescribeServicesPaginator(client DescribeServicesAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeServices page. @@ -205,7 +206,10 @@ func (p *DescribeServicesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pricing/api_op_GetAttributeValues.go b/service/pricing/api_op_GetAttributeValues.go index ffefad3786b..236407c0c89 100644 --- a/service/pricing/api_op_GetAttributeValues.go +++ b/service/pricing/api_op_GetAttributeValues.go @@ -183,12 +183,13 @@ func NewGetAttributeValuesPaginator(client GetAttributeValuesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAttributeValuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAttributeValues page. @@ -211,7 +212,10 @@ func (p *GetAttributeValuesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/pricing/api_op_GetProducts.go b/service/pricing/api_op_GetProducts.go index a17e37c8133..2b67fa8e131 100644 --- a/service/pricing/api_op_GetProducts.go +++ b/service/pricing/api_op_GetProducts.go @@ -177,12 +177,13 @@ func NewGetProductsPaginator(client GetProductsAPIClient, params *GetProductsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetProductsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetProducts page. @@ -205,7 +206,10 @@ func (p *GetProductsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListEnvironmentAccountConnections.go b/service/proton/api_op_ListEnvironmentAccountConnections.go index b19bd4bb380..cfb5c666506 100644 --- a/service/proton/api_op_ListEnvironmentAccountConnections.go +++ b/service/proton/api_op_ListEnvironmentAccountConnections.go @@ -188,12 +188,13 @@ func NewListEnvironmentAccountConnectionsPaginator(client ListEnvironmentAccount client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentAccountConnectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironmentAccountConnections page. @@ -220,7 +221,10 @@ func (p *ListEnvironmentAccountConnectionsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListEnvironmentOutputs.go b/service/proton/api_op_ListEnvironmentOutputs.go index e74ad825920..e6e931edd49 100644 --- a/service/proton/api_op_ListEnvironmentOutputs.go +++ b/service/proton/api_op_ListEnvironmentOutputs.go @@ -165,12 +165,13 @@ func NewListEnvironmentOutputsPaginator(client ListEnvironmentOutputsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentOutputsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironmentOutputs page. @@ -191,7 +192,10 @@ func (p *ListEnvironmentOutputsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListEnvironmentProvisionedResources.go b/service/proton/api_op_ListEnvironmentProvisionedResources.go index 0e79b3588dc..30ce0eda8ed 100644 --- a/service/proton/api_op_ListEnvironmentProvisionedResources.go +++ b/service/proton/api_op_ListEnvironmentProvisionedResources.go @@ -168,12 +168,13 @@ func NewListEnvironmentProvisionedResourcesPaginator(client ListEnvironmentProvi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentProvisionedResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironmentProvisionedResources page. @@ -194,7 +195,10 @@ func (p *ListEnvironmentProvisionedResourcesPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListEnvironmentTemplateVersions.go b/service/proton/api_op_ListEnvironmentTemplateVersions.go index 5e91b1b0bf0..ee3a4bed153 100644 --- a/service/proton/api_op_ListEnvironmentTemplateVersions.go +++ b/service/proton/api_op_ListEnvironmentTemplateVersions.go @@ -184,12 +184,13 @@ func NewListEnvironmentTemplateVersionsPaginator(client ListEnvironmentTemplateV client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentTemplateVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironmentTemplateVersions page. @@ -216,7 +217,10 @@ func (p *ListEnvironmentTemplateVersionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListEnvironmentTemplates.go b/service/proton/api_op_ListEnvironmentTemplates.go index ec137c3c867..c9682ad0a05 100644 --- a/service/proton/api_op_ListEnvironmentTemplates.go +++ b/service/proton/api_op_ListEnvironmentTemplates.go @@ -168,12 +168,13 @@ func NewListEnvironmentTemplatesPaginator(client ListEnvironmentTemplatesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironmentTemplates page. @@ -200,7 +201,10 @@ func (p *ListEnvironmentTemplatesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListEnvironments.go b/service/proton/api_op_ListEnvironments.go index 97bad3d9d33..62d60b23f01 100644 --- a/service/proton/api_op_ListEnvironments.go +++ b/service/proton/api_op_ListEnvironments.go @@ -170,12 +170,13 @@ func NewListEnvironmentsPaginator(client ListEnvironmentsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnvironmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnvironments page. @@ -202,7 +203,10 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListRepositories.go b/service/proton/api_op_ListRepositories.go index 384afb15eef..b6ff4deac37 100644 --- a/service/proton/api_op_ListRepositories.go +++ b/service/proton/api_op_ListRepositories.go @@ -164,12 +164,13 @@ func NewListRepositoriesPaginator(client ListRepositoriesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositories page. @@ -196,7 +197,10 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListRepositorySyncDefinitions.go b/service/proton/api_op_ListRepositorySyncDefinitions.go index 1e3ed6f9c37..9c54df40f2a 100644 --- a/service/proton/api_op_ListRepositorySyncDefinitions.go +++ b/service/proton/api_op_ListRepositorySyncDefinitions.go @@ -178,12 +178,13 @@ func NewListRepositorySyncDefinitionsPaginator(client ListRepositorySyncDefiniti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRepositorySyncDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRepositorySyncDefinitions page. @@ -204,7 +205,10 @@ func (p *ListRepositorySyncDefinitionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServiceInstanceOutputs.go b/service/proton/api_op_ListServiceInstanceOutputs.go index a43f9d2b349..69834deb1ad 100644 --- a/service/proton/api_op_ListServiceInstanceOutputs.go +++ b/service/proton/api_op_ListServiceInstanceOutputs.go @@ -171,12 +171,13 @@ func NewListServiceInstanceOutputsPaginator(client ListServiceInstanceOutputsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceInstanceOutputsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceInstanceOutputs page. @@ -197,7 +198,10 @@ func (p *ListServiceInstanceOutputsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServiceInstanceProvisionedResources.go b/service/proton/api_op_ListServiceInstanceProvisionedResources.go index 26ba55f9d92..f4026f38d24 100644 --- a/service/proton/api_op_ListServiceInstanceProvisionedResources.go +++ b/service/proton/api_op_ListServiceInstanceProvisionedResources.go @@ -173,12 +173,13 @@ func NewListServiceInstanceProvisionedResourcesPaginator(client ListServiceInsta client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceInstanceProvisionedResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceInstanceProvisionedResources page. @@ -199,7 +200,10 @@ func (p *ListServiceInstanceProvisionedResourcesPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServiceInstances.go b/service/proton/api_op_ListServiceInstances.go index bd6eb4b4a19..e4d693fea63 100644 --- a/service/proton/api_op_ListServiceInstances.go +++ b/service/proton/api_op_ListServiceInstances.go @@ -168,12 +168,13 @@ func NewListServiceInstancesPaginator(client ListServiceInstancesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceInstances page. @@ -200,7 +201,10 @@ func (p *ListServiceInstancesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServicePipelineOutputs.go b/service/proton/api_op_ListServicePipelineOutputs.go index 8e38d07ca69..bf0499a146f 100644 --- a/service/proton/api_op_ListServicePipelineOutputs.go +++ b/service/proton/api_op_ListServicePipelineOutputs.go @@ -166,12 +166,13 @@ func NewListServicePipelineOutputsPaginator(client ListServicePipelineOutputsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicePipelineOutputsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServicePipelineOutputs page. @@ -192,7 +193,10 @@ func (p *ListServicePipelineOutputsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServicePipelineProvisionedResources.go b/service/proton/api_op_ListServicePipelineProvisionedResources.go index 36d215e28ff..61b1937b4eb 100644 --- a/service/proton/api_op_ListServicePipelineProvisionedResources.go +++ b/service/proton/api_op_ListServicePipelineProvisionedResources.go @@ -168,12 +168,13 @@ func NewListServicePipelineProvisionedResourcesPaginator(client ListServicePipel client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicePipelineProvisionedResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServicePipelineProvisionedResources page. @@ -194,7 +195,10 @@ func (p *ListServicePipelineProvisionedResourcesPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServiceTemplateVersions.go b/service/proton/api_op_ListServiceTemplateVersions.go index a3a14a1fc81..e3e06327009 100644 --- a/service/proton/api_op_ListServiceTemplateVersions.go +++ b/service/proton/api_op_ListServiceTemplateVersions.go @@ -182,12 +182,13 @@ func NewListServiceTemplateVersionsPaginator(client ListServiceTemplateVersionsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceTemplateVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceTemplateVersions page. @@ -214,7 +215,10 @@ func (p *ListServiceTemplateVersionsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServiceTemplates.go b/service/proton/api_op_ListServiceTemplates.go index d922d5a39cd..455cbd14ad4 100644 --- a/service/proton/api_op_ListServiceTemplates.go +++ b/service/proton/api_op_ListServiceTemplates.go @@ -165,12 +165,13 @@ func NewListServiceTemplatesPaginator(client ListServiceTemplatesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceTemplates page. @@ -197,7 +198,10 @@ func (p *ListServiceTemplatesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListServices.go b/service/proton/api_op_ListServices.go index 5cc666df4ab..7bd0a515fdb 100644 --- a/service/proton/api_op_ListServices.go +++ b/service/proton/api_op_ListServices.go @@ -163,12 +163,13 @@ func NewListServicesPaginator(client ListServicesAPIClient, params *ListServices client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServices page. @@ -195,7 +196,10 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/proton/api_op_ListTagsForResource.go b/service/proton/api_op_ListTagsForResource.go index a7268827df4..6be1294b62f 100644 --- a/service/proton/api_op_ListTagsForResource.go +++ b/service/proton/api_op_ListTagsForResource.go @@ -176,12 +176,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -208,7 +209,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go b/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go index 91d23654253..f386e49a28b 100644 --- a/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go +++ b/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go @@ -192,12 +192,13 @@ func NewListJournalKinesisStreamsForLedgerPaginator(client ListJournalKinesisStr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJournalKinesisStreamsForLedgerPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJournalKinesisStreamsForLedger page. @@ -224,7 +225,10 @@ func (p *ListJournalKinesisStreamsForLedgerPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/qldb/api_op_ListJournalS3Exports.go b/service/qldb/api_op_ListJournalS3Exports.go index 8f9cd5378c2..b268724aa9b 100644 --- a/service/qldb/api_op_ListJournalS3Exports.go +++ b/service/qldb/api_op_ListJournalS3Exports.go @@ -177,12 +177,13 @@ func NewListJournalS3ExportsPaginator(client ListJournalS3ExportsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJournalS3ExportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJournalS3Exports page. @@ -209,7 +210,10 @@ func (p *ListJournalS3ExportsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/qldb/api_op_ListJournalS3ExportsForLedger.go b/service/qldb/api_op_ListJournalS3ExportsForLedger.go index b628a41f3be..8e886936460 100644 --- a/service/qldb/api_op_ListJournalS3ExportsForLedger.go +++ b/service/qldb/api_op_ListJournalS3ExportsForLedger.go @@ -190,12 +190,13 @@ func NewListJournalS3ExportsForLedgerPaginator(client ListJournalS3ExportsForLed client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJournalS3ExportsForLedgerPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJournalS3ExportsForLedger page. @@ -222,7 +223,10 @@ func (p *ListJournalS3ExportsForLedgerPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/qldb/api_op_ListLedgers.go b/service/qldb/api_op_ListLedgers.go index 4458db5d4c2..48a5f90d458 100644 --- a/service/qldb/api_op_ListLedgers.go +++ b/service/qldb/api_op_ListLedgers.go @@ -174,12 +174,13 @@ func NewListLedgersPaginator(client ListLedgersAPIClient, params *ListLedgersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLedgersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLedgers page. @@ -206,7 +207,10 @@ func (p *ListLedgersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListAnalyses.go b/service/quicksight/api_op_ListAnalyses.go index dddaae0800c..8f7e35c6d47 100644 --- a/service/quicksight/api_op_ListAnalyses.go +++ b/service/quicksight/api_op_ListAnalyses.go @@ -174,12 +174,13 @@ func NewListAnalysesPaginator(client ListAnalysesAPIClient, params *ListAnalyses client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnalysesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnalyses page. @@ -202,7 +203,10 @@ func (p *ListAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListDashboardVersions.go b/service/quicksight/api_op_ListDashboardVersions.go index 0197685359a..c84e790bbb5 100644 --- a/service/quicksight/api_op_ListDashboardVersions.go +++ b/service/quicksight/api_op_ListDashboardVersions.go @@ -181,12 +181,13 @@ func NewListDashboardVersionsPaginator(client ListDashboardVersionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDashboardVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDashboardVersions page. @@ -209,7 +210,10 @@ func (p *ListDashboardVersionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListDashboards.go b/service/quicksight/api_op_ListDashboards.go index 76296a6a72e..0e791b0e292 100644 --- a/service/quicksight/api_op_ListDashboards.go +++ b/service/quicksight/api_op_ListDashboards.go @@ -176,12 +176,13 @@ func NewListDashboardsPaginator(client ListDashboardsAPIClient, params *ListDash client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDashboardsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDashboards page. @@ -204,7 +205,10 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListDataSets.go b/service/quicksight/api_op_ListDataSets.go index 8eae026f03b..130233d1839 100644 --- a/service/quicksight/api_op_ListDataSets.go +++ b/service/quicksight/api_op_ListDataSets.go @@ -175,12 +175,13 @@ func NewListDataSetsPaginator(client ListDataSetsAPIClient, params *ListDataSets client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSets page. @@ -203,7 +204,10 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListDataSources.go b/service/quicksight/api_op_ListDataSources.go index 5a2885399ea..7c831da9698 100644 --- a/service/quicksight/api_op_ListDataSources.go +++ b/service/quicksight/api_op_ListDataSources.go @@ -175,12 +175,13 @@ func NewListDataSourcesPaginator(client ListDataSourcesAPIClient, params *ListDa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSources page. @@ -203,7 +204,10 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListIngestions.go b/service/quicksight/api_op_ListIngestions.go index 70fcad40ad9..abe496641ec 100644 --- a/service/quicksight/api_op_ListIngestions.go +++ b/service/quicksight/api_op_ListIngestions.go @@ -179,12 +179,13 @@ func NewListIngestionsPaginator(client ListIngestionsAPIClient, params *ListInge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIngestionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIngestions page. @@ -207,7 +208,10 @@ func (p *ListIngestionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListNamespaces.go b/service/quicksight/api_op_ListNamespaces.go index 4a7e8f40a4b..f5f85bc18e5 100644 --- a/service/quicksight/api_op_ListNamespaces.go +++ b/service/quicksight/api_op_ListNamespaces.go @@ -177,12 +177,13 @@ func NewListNamespacesPaginator(client ListNamespacesAPIClient, params *ListName client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNamespacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNamespaces page. @@ -205,7 +206,10 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListTemplateAliases.go b/service/quicksight/api_op_ListTemplateAliases.go index 68d15c452c7..1095a5cc9fd 100644 --- a/service/quicksight/api_op_ListTemplateAliases.go +++ b/service/quicksight/api_op_ListTemplateAliases.go @@ -181,12 +181,13 @@ func NewListTemplateAliasesPaginator(client ListTemplateAliasesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTemplateAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTemplateAliases page. @@ -209,7 +210,10 @@ func (p *ListTemplateAliasesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListTemplateVersions.go b/service/quicksight/api_op_ListTemplateVersions.go index 09e3b97a6f7..8f432f22a97 100644 --- a/service/quicksight/api_op_ListTemplateVersions.go +++ b/service/quicksight/api_op_ListTemplateVersions.go @@ -182,12 +182,13 @@ func NewListTemplateVersionsPaginator(client ListTemplateVersionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTemplateVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTemplateVersions page. @@ -210,7 +211,10 @@ func (p *ListTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListTemplates.go b/service/quicksight/api_op_ListTemplates.go index 0d5b8b578aa..33b39a925af 100644 --- a/service/quicksight/api_op_ListTemplates.go +++ b/service/quicksight/api_op_ListTemplates.go @@ -174,12 +174,13 @@ func NewListTemplatesPaginator(client ListTemplatesAPIClient, params *ListTempla client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTemplates page. @@ -202,7 +203,10 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListThemeVersions.go b/service/quicksight/api_op_ListThemeVersions.go index 420ffd75510..04fdcb3c20a 100644 --- a/service/quicksight/api_op_ListThemeVersions.go +++ b/service/quicksight/api_op_ListThemeVersions.go @@ -180,12 +180,13 @@ func NewListThemeVersionsPaginator(client ListThemeVersionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThemeVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThemeVersions page. @@ -208,7 +209,10 @@ func (p *ListThemeVersionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_ListThemes.go b/service/quicksight/api_op_ListThemes.go index 6e3eb133c3f..629532ae799 100644 --- a/service/quicksight/api_op_ListThemes.go +++ b/service/quicksight/api_op_ListThemes.go @@ -186,12 +186,13 @@ func NewListThemesPaginator(client ListThemesAPIClient, params *ListThemesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThemesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThemes page. @@ -214,7 +215,10 @@ func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_SearchAnalyses.go b/service/quicksight/api_op_SearchAnalyses.go index 78c9db1e9de..4b8bb2d83bb 100644 --- a/service/quicksight/api_op_SearchAnalyses.go +++ b/service/quicksight/api_op_SearchAnalyses.go @@ -182,12 +182,13 @@ func NewSearchAnalysesPaginator(client SearchAnalysesAPIClient, params *SearchAn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchAnalysesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchAnalyses page. @@ -210,7 +211,10 @@ func (p *SearchAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/quicksight/api_op_SearchDashboards.go b/service/quicksight/api_op_SearchDashboards.go index 957e0e97ad8..e495027e6c5 100644 --- a/service/quicksight/api_op_SearchDashboards.go +++ b/service/quicksight/api_op_SearchDashboards.go @@ -185,12 +185,13 @@ func NewSearchDashboardsPaginator(client SearchDashboardsAPIClient, params *Sear client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchDashboardsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchDashboards page. @@ -213,7 +214,10 @@ func (p *SearchDashboardsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_GetResourcePolicies.go b/service/ram/api_op_GetResourcePolicies.go index 9605ba7e0f0..8dde2475b81 100644 --- a/service/ram/api_op_GetResourcePolicies.go +++ b/service/ram/api_op_GetResourcePolicies.go @@ -197,12 +197,13 @@ func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourcePoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourcePolicies page. @@ -229,7 +230,10 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_GetResourceShareAssociations.go b/service/ram/api_op_GetResourceShareAssociations.go index dde9ce701f8..b89ffb899df 100644 --- a/service/ram/api_op_GetResourceShareAssociations.go +++ b/service/ram/api_op_GetResourceShareAssociations.go @@ -224,12 +224,13 @@ func NewGetResourceShareAssociationsPaginator(client GetResourceShareAssociation client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourceShareAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourceShareAssociations page. @@ -256,7 +257,10 @@ func (p *GetResourceShareAssociationsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_GetResourceShareInvitations.go b/service/ram/api_op_GetResourceShareInvitations.go index 7c1d9542af0..fe5953188ab 100644 --- a/service/ram/api_op_GetResourceShareInvitations.go +++ b/service/ram/api_op_GetResourceShareInvitations.go @@ -196,12 +196,13 @@ func NewGetResourceShareInvitationsPaginator(client GetResourceShareInvitationsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourceShareInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourceShareInvitations page. @@ -228,7 +229,10 @@ func (p *GetResourceShareInvitationsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_GetResourceShares.go b/service/ram/api_op_GetResourceShares.go index 6a8aaa9aa5d..ae280792015 100644 --- a/service/ram/api_op_GetResourceShares.go +++ b/service/ram/api_op_GetResourceShares.go @@ -220,12 +220,13 @@ func NewGetResourceSharesPaginator(client GetResourceSharesAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourceSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourceShares page. @@ -252,7 +253,10 @@ func (p *GetResourceSharesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_ListPendingInvitationResources.go b/service/ram/api_op_ListPendingInvitationResources.go index 71161ef05db..f16c0a6f68f 100644 --- a/service/ram/api_op_ListPendingInvitationResources.go +++ b/service/ram/api_op_ListPendingInvitationResources.go @@ -215,12 +215,13 @@ func NewListPendingInvitationResourcesPaginator(client ListPendingInvitationReso client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPendingInvitationResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPendingInvitationResources page. @@ -247,7 +248,10 @@ func (p *ListPendingInvitationResourcesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_ListPermissions.go b/service/ram/api_op_ListPermissions.go index 2eca0d9b3c7..87377f4d05f 100644 --- a/service/ram/api_op_ListPermissions.go +++ b/service/ram/api_op_ListPermissions.go @@ -190,12 +190,13 @@ func NewListPermissionsPaginator(client ListPermissionsAPIClient, params *ListPe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissions page. @@ -222,7 +223,10 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_ListPrincipals.go b/service/ram/api_op_ListPrincipals.go index 308976a7c94..3b9a0426e9f 100644 --- a/service/ram/api_op_ListPrincipals.go +++ b/service/ram/api_op_ListPrincipals.go @@ -241,12 +241,13 @@ func NewListPrincipalsPaginator(client ListPrincipalsAPIClient, params *ListPrin client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPrincipalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPrincipals page. @@ -273,7 +274,10 @@ func (p *ListPrincipalsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_ListResourceSharePermissions.go b/service/ram/api_op_ListResourceSharePermissions.go index 1dcdefcd5a0..b1f99a2d403 100644 --- a/service/ram/api_op_ListResourceSharePermissions.go +++ b/service/ram/api_op_ListResourceSharePermissions.go @@ -197,12 +197,13 @@ func NewListResourceSharePermissionsPaginator(client ListResourceSharePermission client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceSharePermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceSharePermissions page. @@ -229,7 +230,10 @@ func (p *ListResourceSharePermissionsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_ListResourceTypes.go b/service/ram/api_op_ListResourceTypes.go index bde3b103323..0cd46cc3600 100644 --- a/service/ram/api_op_ListResourceTypes.go +++ b/service/ram/api_op_ListResourceTypes.go @@ -199,12 +199,13 @@ func NewListResourceTypesPaginator(client ListResourceTypesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceTypes page. @@ -231,7 +232,10 @@ func (p *ListResourceTypesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ram/api_op_ListResources.go b/service/ram/api_op_ListResources.go index 1453287b905..115dee6c9b8 100644 --- a/service/ram/api_op_ListResources.go +++ b/service/ram/api_op_ListResources.go @@ -231,12 +231,13 @@ func NewListResourcesPaginator(client ListResourcesAPIClient, params *ListResour client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResources page. @@ -263,7 +264,10 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rbin/api_op_ListRules.go b/service/rbin/api_op_ListRules.go index 9eab379054a..d25ee6ba47c 100644 --- a/service/rbin/api_op_ListRules.go +++ b/service/rbin/api_op_ListRules.go @@ -179,12 +179,13 @@ func NewListRulesPaginator(client ListRulesAPIClient, params *ListRulesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRules page. @@ -211,7 +212,10 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeCertificates.go b/service/rds/api_op_DescribeCertificates.go index a857ebe9017..501391b1c06 100644 --- a/service/rds/api_op_DescribeCertificates.go +++ b/service/rds/api_op_DescribeCertificates.go @@ -188,12 +188,13 @@ func NewDescribeCertificatesPaginator(client DescribeCertificatesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCertificates page. @@ -220,7 +221,10 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeCustomAvailabilityZones.go b/service/rds/api_op_DescribeCustomAvailabilityZones.go index 7446d7f0b33..956c3aed94b 100644 --- a/service/rds/api_op_DescribeCustomAvailabilityZones.go +++ b/service/rds/api_op_DescribeCustomAvailabilityZones.go @@ -188,12 +188,13 @@ func NewDescribeCustomAvailabilityZonesPaginator(client DescribeCustomAvailabili client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCustomAvailabilityZonesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCustomAvailabilityZones page. @@ -220,7 +221,10 @@ func (p *DescribeCustomAvailabilityZonesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBClusterBacktracks.go b/service/rds/api_op_DescribeDBClusterBacktracks.go index dae241b2da4..82f9d07b328 100644 --- a/service/rds/api_op_DescribeDBClusterBacktracks.go +++ b/service/rds/api_op_DescribeDBClusterBacktracks.go @@ -233,12 +233,13 @@ func NewDescribeDBClusterBacktracksPaginator(client DescribeDBClusterBacktracksA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterBacktracksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterBacktracks page. @@ -265,7 +266,10 @@ func (p *DescribeDBClusterBacktracksPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBClusterEndpoints.go b/service/rds/api_op_DescribeDBClusterEndpoints.go index a3aa4b3fc9d..1c75435a6a8 100644 --- a/service/rds/api_op_DescribeDBClusterEndpoints.go +++ b/service/rds/api_op_DescribeDBClusterEndpoints.go @@ -197,12 +197,13 @@ func NewDescribeDBClusterEndpointsPaginator(client DescribeDBClusterEndpointsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterEndpoints page. @@ -229,7 +230,10 @@ func (p *DescribeDBClusterEndpointsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBClusterParameterGroups.go b/service/rds/api_op_DescribeDBClusterParameterGroups.go index d14682b3aab..408295168cd 100644 --- a/service/rds/api_op_DescribeDBClusterParameterGroups.go +++ b/service/rds/api_op_DescribeDBClusterParameterGroups.go @@ -199,12 +199,13 @@ func NewDescribeDBClusterParameterGroupsPaginator(client DescribeDBClusterParame client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterParameterGroups page. @@ -231,7 +232,10 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBClusterParameters.go b/service/rds/api_op_DescribeDBClusterParameters.go index 3091f32a4a5..d90d3e4c101 100644 --- a/service/rds/api_op_DescribeDBClusterParameters.go +++ b/service/rds/api_op_DescribeDBClusterParameters.go @@ -202,12 +202,13 @@ func NewDescribeDBClusterParametersPaginator(client DescribeDBClusterParametersA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterParameters page. @@ -234,7 +235,10 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBClusterSnapshots.go b/service/rds/api_op_DescribeDBClusterSnapshots.go index 053ce3630f8..1b06e4c5695 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshots.go +++ b/service/rds/api_op_DescribeDBClusterSnapshots.go @@ -269,12 +269,13 @@ func NewDescribeDBClusterSnapshotsPaginator(client DescribeDBClusterSnapshotsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClusterSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusterSnapshots page. @@ -301,7 +302,10 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBClusters.go b/service/rds/api_op_DescribeDBClusters.go index 777c7e0cd85..c3ac1884314 100644 --- a/service/rds/api_op_DescribeDBClusters.go +++ b/service/rds/api_op_DescribeDBClusters.go @@ -215,12 +215,13 @@ func NewDescribeDBClustersPaginator(client DescribeDBClustersAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBClusters page. @@ -247,7 +248,10 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBEngineVersions.go b/service/rds/api_op_DescribeDBEngineVersions.go index def72b3659e..360b3cf4ac9 100644 --- a/service/rds/api_op_DescribeDBEngineVersions.go +++ b/service/rds/api_op_DescribeDBEngineVersions.go @@ -248,12 +248,13 @@ func NewDescribeDBEngineVersionsPaginator(client DescribeDBEngineVersionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBEngineVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBEngineVersions page. @@ -280,7 +281,10 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go b/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go index 367daaee261..5cdf3d6a8a0 100644 --- a/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go +++ b/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go @@ -223,12 +223,13 @@ func NewDescribeDBInstanceAutomatedBackupsPaginator(client DescribeDBInstanceAut client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBInstanceAutomatedBackupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBInstanceAutomatedBackups page. @@ -255,7 +256,10 @@ func (p *DescribeDBInstanceAutomatedBackupsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBInstances.go b/service/rds/api_op_DescribeDBInstances.go index ab59a513908..dc92fd34cb0 100644 --- a/service/rds/api_op_DescribeDBInstances.go +++ b/service/rds/api_op_DescribeDBInstances.go @@ -219,12 +219,13 @@ func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBInstances page. @@ -251,7 +252,10 @@ func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBLogFiles.go b/service/rds/api_op_DescribeDBLogFiles.go index a3cae68e77f..ad2f25b99e9 100644 --- a/service/rds/api_op_DescribeDBLogFiles.go +++ b/service/rds/api_op_DescribeDBLogFiles.go @@ -196,12 +196,13 @@ func NewDescribeDBLogFilesPaginator(client DescribeDBLogFilesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBLogFilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBLogFiles page. @@ -228,7 +229,10 @@ func (p *DescribeDBLogFilesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBParameterGroups.go b/service/rds/api_op_DescribeDBParameterGroups.go index 99c3f1a97ac..d855acd28f6 100644 --- a/service/rds/api_op_DescribeDBParameterGroups.go +++ b/service/rds/api_op_DescribeDBParameterGroups.go @@ -189,12 +189,13 @@ func NewDescribeDBParameterGroupsPaginator(client DescribeDBParameterGroupsAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBParameterGroups page. @@ -221,7 +222,10 @@ func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBParameters.go b/service/rds/api_op_DescribeDBParameters.go index b59893ebe03..b3421dd65de 100644 --- a/service/rds/api_op_DescribeDBParameters.go +++ b/service/rds/api_op_DescribeDBParameters.go @@ -191,12 +191,13 @@ func NewDescribeDBParametersPaginator(client DescribeDBParametersAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBParameters page. @@ -223,7 +224,10 @@ func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBProxies.go b/service/rds/api_op_DescribeDBProxies.go index fe888c7d407..ee16ad16f38 100644 --- a/service/rds/api_op_DescribeDBProxies.go +++ b/service/rds/api_op_DescribeDBProxies.go @@ -180,12 +180,13 @@ func NewDescribeDBProxiesPaginator(client DescribeDBProxiesAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBProxiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBProxies page. @@ -212,7 +213,10 @@ func (p *DescribeDBProxiesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBProxyEndpoints.go b/service/rds/api_op_DescribeDBProxyEndpoints.go index d89e1cb3aa2..316b9e3f9da 100644 --- a/service/rds/api_op_DescribeDBProxyEndpoints.go +++ b/service/rds/api_op_DescribeDBProxyEndpoints.go @@ -188,12 +188,13 @@ func NewDescribeDBProxyEndpointsPaginator(client DescribeDBProxyEndpointsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBProxyEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBProxyEndpoints page. @@ -220,7 +221,10 @@ func (p *DescribeDBProxyEndpointsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBProxyTargetGroups.go b/service/rds/api_op_DescribeDBProxyTargetGroups.go index 8728835414c..1d705fbe17d 100644 --- a/service/rds/api_op_DescribeDBProxyTargetGroups.go +++ b/service/rds/api_op_DescribeDBProxyTargetGroups.go @@ -189,12 +189,13 @@ func NewDescribeDBProxyTargetGroupsPaginator(client DescribeDBProxyTargetGroupsA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBProxyTargetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBProxyTargetGroups page. @@ -221,7 +222,10 @@ func (p *DescribeDBProxyTargetGroupsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBProxyTargets.go b/service/rds/api_op_DescribeDBProxyTargets.go index 3e649c7b24c..da6cdf5e927 100644 --- a/service/rds/api_op_DescribeDBProxyTargets.go +++ b/service/rds/api_op_DescribeDBProxyTargets.go @@ -186,12 +186,13 @@ func NewDescribeDBProxyTargetsPaginator(client DescribeDBProxyTargetsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBProxyTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBProxyTargets page. @@ -218,7 +219,10 @@ func (p *DescribeDBProxyTargetsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBSecurityGroups.go b/service/rds/api_op_DescribeDBSecurityGroups.go index 44204cb3b86..5a5815e6407 100644 --- a/service/rds/api_op_DescribeDBSecurityGroups.go +++ b/service/rds/api_op_DescribeDBSecurityGroups.go @@ -186,12 +186,13 @@ func NewDescribeDBSecurityGroupsPaginator(client DescribeDBSecurityGroupsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBSecurityGroups page. @@ -218,7 +219,10 @@ func (p *DescribeDBSecurityGroupsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBSnapshots.go b/service/rds/api_op_DescribeDBSnapshots.go index e8498659884..e3ca83f8912 100644 --- a/service/rds/api_op_DescribeDBSnapshots.go +++ b/service/rds/api_op_DescribeDBSnapshots.go @@ -272,12 +272,13 @@ func NewDescribeDBSnapshotsPaginator(client DescribeDBSnapshotsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBSnapshots page. @@ -304,7 +305,10 @@ func (p *DescribeDBSnapshotsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeDBSubnetGroups.go b/service/rds/api_op_DescribeDBSubnetGroups.go index e141a86f4f4..daafd8fdb7d 100644 --- a/service/rds/api_op_DescribeDBSubnetGroups.go +++ b/service/rds/api_op_DescribeDBSubnetGroups.go @@ -186,12 +186,13 @@ func NewDescribeDBSubnetGroupsPaginator(client DescribeDBSubnetGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDBSubnetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDBSubnetGroups page. @@ -218,7 +219,10 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeEngineDefaultParameters.go b/service/rds/api_op_DescribeEngineDefaultParameters.go index ee5b4fad1fe..7c7fffa17a2 100644 --- a/service/rds/api_op_DescribeEngineDefaultParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultParameters.go @@ -183,12 +183,13 @@ func NewDescribeEngineDefaultParametersPaginator(client DescribeEngineDefaultPar client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEngineDefaultParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEngineDefaultParameters page. @@ -218,7 +219,10 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, p.nextToken = result.EngineDefaults.Marker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeEventSubscriptions.go b/service/rds/api_op_DescribeEventSubscriptions.go index d0ce8b5d842..de81347b05c 100644 --- a/service/rds/api_op_DescribeEventSubscriptions.go +++ b/service/rds/api_op_DescribeEventSubscriptions.go @@ -189,12 +189,13 @@ func NewDescribeEventSubscriptionsPaginator(client DescribeEventSubscriptionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventSubscriptions page. @@ -221,7 +222,10 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeEvents.go b/service/rds/api_op_DescribeEvents.go index 1a1bd8e577d..23ea038188e 100644 --- a/service/rds/api_op_DescribeEvents.go +++ b/service/rds/api_op_DescribeEvents.go @@ -234,12 +234,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -266,7 +267,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeExportTasks.go b/service/rds/api_op_DescribeExportTasks.go index b6ebc69cb58..a713879afbc 100644 --- a/service/rds/api_op_DescribeExportTasks.go +++ b/service/rds/api_op_DescribeExportTasks.go @@ -214,12 +214,13 @@ func NewDescribeExportTasksPaginator(client DescribeExportTasksAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeExportTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeExportTasks page. @@ -246,7 +247,10 @@ func (p *DescribeExportTasksPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeGlobalClusters.go b/service/rds/api_op_DescribeGlobalClusters.go index a427da3eaaa..a4ec41c4bab 100644 --- a/service/rds/api_op_DescribeGlobalClusters.go +++ b/service/rds/api_op_DescribeGlobalClusters.go @@ -188,12 +188,13 @@ func NewDescribeGlobalClustersPaginator(client DescribeGlobalClustersAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeGlobalClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeGlobalClusters page. @@ -220,7 +221,10 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeInstallationMedia.go b/service/rds/api_op_DescribeInstallationMedia.go index 963522c5212..635c2c1c3ef 100644 --- a/service/rds/api_op_DescribeInstallationMedia.go +++ b/service/rds/api_op_DescribeInstallationMedia.go @@ -190,12 +190,13 @@ func NewDescribeInstallationMediaPaginator(client DescribeInstallationMediaAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstallationMediaPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstallationMedia page. @@ -222,7 +223,10 @@ func (p *DescribeInstallationMediaPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeOptionGroupOptions.go b/service/rds/api_op_DescribeOptionGroupOptions.go index 40acb7db6df..fb8164267fe 100644 --- a/service/rds/api_op_DescribeOptionGroupOptions.go +++ b/service/rds/api_op_DescribeOptionGroupOptions.go @@ -215,12 +215,13 @@ func NewDescribeOptionGroupOptionsPaginator(client DescribeOptionGroupOptionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOptionGroupOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOptionGroupOptions page. @@ -247,7 +248,10 @@ func (p *DescribeOptionGroupOptionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeOptionGroups.go b/service/rds/api_op_DescribeOptionGroups.go index 630e0fa7461..55a86678568 100644 --- a/service/rds/api_op_DescribeOptionGroups.go +++ b/service/rds/api_op_DescribeOptionGroups.go @@ -216,12 +216,13 @@ func NewDescribeOptionGroupsPaginator(client DescribeOptionGroupsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOptionGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOptionGroups page. @@ -248,7 +249,10 @@ func (p *DescribeOptionGroupsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go index 98806658ebb..5386e1d830e 100644 --- a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go @@ -246,12 +246,13 @@ func NewDescribeOrderableDBInstanceOptionsPaginator(client DescribeOrderableDBIn client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrderableDBInstanceOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrderableDBInstanceOptions page. @@ -278,7 +279,10 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribePendingMaintenanceActions.go b/service/rds/api_op_DescribePendingMaintenanceActions.go index 8f3563de366..d8ada4cdbb6 100644 --- a/service/rds/api_op_DescribePendingMaintenanceActions.go +++ b/service/rds/api_op_DescribePendingMaintenanceActions.go @@ -197,12 +197,13 @@ func NewDescribePendingMaintenanceActionsPaginator(client DescribePendingMainten client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePendingMaintenanceActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePendingMaintenanceActions page. @@ -229,7 +230,10 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeReservedDBInstances.go b/service/rds/api_op_DescribeReservedDBInstances.go index edfbe0fdbb1..161c4ca60a7 100644 --- a/service/rds/api_op_DescribeReservedDBInstances.go +++ b/service/rds/api_op_DescribeReservedDBInstances.go @@ -218,12 +218,13 @@ func NewDescribeReservedDBInstancesPaginator(client DescribeReservedDBInstancesA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedDBInstances page. @@ -250,7 +251,10 @@ func (p *DescribeReservedDBInstancesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeReservedDBInstancesOfferings.go b/service/rds/api_op_DescribeReservedDBInstancesOfferings.go index 2718a84caaf..0c9e1f23ff8 100644 --- a/service/rds/api_op_DescribeReservedDBInstancesOfferings.go +++ b/service/rds/api_op_DescribeReservedDBInstancesOfferings.go @@ -210,12 +210,13 @@ func NewDescribeReservedDBInstancesOfferingsPaginator(client DescribeReservedDBI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedDBInstancesOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedDBInstancesOfferings page. @@ -242,7 +243,10 @@ func (p *DescribeReservedDBInstancesOfferingsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DescribeSourceRegions.go b/service/rds/api_op_DescribeSourceRegions.go index 09a263a994a..8f5763a6cef 100644 --- a/service/rds/api_op_DescribeSourceRegions.go +++ b/service/rds/api_op_DescribeSourceRegions.go @@ -190,12 +190,13 @@ func NewDescribeSourceRegionsPaginator(client DescribeSourceRegionsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSourceRegionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSourceRegions page. @@ -222,7 +223,10 @@ func (p *DescribeSourceRegionsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rds/api_op_DownloadDBLogFilePortion.go b/service/rds/api_op_DownloadDBLogFilePortion.go index 8fac59d9536..89c97d235ba 100644 --- a/service/rds/api_op_DownloadDBLogFilePortion.go +++ b/service/rds/api_op_DownloadDBLogFilePortion.go @@ -230,12 +230,13 @@ func NewDownloadDBLogFilePortionPaginator(client DownloadDBLogFilePortionAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DownloadDBLogFilePortionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DownloadDBLogFilePortion page. @@ -258,7 +259,10 @@ func (p *DownloadDBLogFilePortionPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterDbRevisions.go b/service/redshift/api_op_DescribeClusterDbRevisions.go index 3d95a33caa1..b94a54699ec 100644 --- a/service/redshift/api_op_DescribeClusterDbRevisions.go +++ b/service/redshift/api_op_DescribeClusterDbRevisions.go @@ -185,12 +185,13 @@ func NewDescribeClusterDbRevisionsPaginator(client DescribeClusterDbRevisionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterDbRevisionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterDbRevisions page. @@ -217,7 +218,10 @@ func (p *DescribeClusterDbRevisionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterParameterGroups.go b/service/redshift/api_op_DescribeClusterParameterGroups.go index f46a7f5c0cb..5275ee84b6e 100644 --- a/service/redshift/api_op_DescribeClusterParameterGroups.go +++ b/service/redshift/api_op_DescribeClusterParameterGroups.go @@ -216,12 +216,13 @@ func NewDescribeClusterParameterGroupsPaginator(client DescribeClusterParameterG client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterParameterGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterParameterGroups page. @@ -248,7 +249,10 @@ func (p *DescribeClusterParameterGroupsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterParameters.go b/service/redshift/api_op_DescribeClusterParameters.go index 25cd7d3f9ab..027a3dd188b 100644 --- a/service/redshift/api_op_DescribeClusterParameters.go +++ b/service/redshift/api_op_DescribeClusterParameters.go @@ -205,12 +205,13 @@ func NewDescribeClusterParametersPaginator(client DescribeClusterParametersAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterParameters page. @@ -237,7 +238,10 @@ func (p *DescribeClusterParametersPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterSecurityGroups.go b/service/redshift/api_op_DescribeClusterSecurityGroups.go index a18cbdd055c..f9cdfded89d 100644 --- a/service/redshift/api_op_DescribeClusterSecurityGroups.go +++ b/service/redshift/api_op_DescribeClusterSecurityGroups.go @@ -215,12 +215,13 @@ func NewDescribeClusterSecurityGroupsPaginator(client DescribeClusterSecurityGro client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterSecurityGroups page. @@ -247,7 +248,10 @@ func (p *DescribeClusterSecurityGroupsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterSnapshots.go b/service/redshift/api_op_DescribeClusterSnapshots.go index 9cca6812355..015c7755916 100644 --- a/service/redshift/api_op_DescribeClusterSnapshots.go +++ b/service/redshift/api_op_DescribeClusterSnapshots.go @@ -266,12 +266,13 @@ func NewDescribeClusterSnapshotsPaginator(client DescribeClusterSnapshotsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterSnapshots page. @@ -298,7 +299,10 @@ func (p *DescribeClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterSubnetGroups.go b/service/redshift/api_op_DescribeClusterSubnetGroups.go index 7c5096faf28..fb039dca7c4 100644 --- a/service/redshift/api_op_DescribeClusterSubnetGroups.go +++ b/service/redshift/api_op_DescribeClusterSubnetGroups.go @@ -210,12 +210,13 @@ func NewDescribeClusterSubnetGroupsPaginator(client DescribeClusterSubnetGroupsA client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterSubnetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterSubnetGroups page. @@ -242,7 +243,10 @@ func (p *DescribeClusterSubnetGroupsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterTracks.go b/service/redshift/api_op_DescribeClusterTracks.go index dccb43efc6a..2b552f96ad8 100644 --- a/service/redshift/api_op_DescribeClusterTracks.go +++ b/service/redshift/api_op_DescribeClusterTracks.go @@ -171,12 +171,13 @@ func NewDescribeClusterTracksPaginator(client DescribeClusterTracksAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterTracksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterTracks page. @@ -203,7 +204,10 @@ func (p *DescribeClusterTracksPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusterVersions.go b/service/redshift/api_op_DescribeClusterVersions.go index f828beee32b..f2b766839da 100644 --- a/service/redshift/api_op_DescribeClusterVersions.go +++ b/service/redshift/api_op_DescribeClusterVersions.go @@ -200,12 +200,13 @@ func NewDescribeClusterVersionsPaginator(client DescribeClusterVersionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClusterVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusterVersions page. @@ -232,7 +233,10 @@ func (p *DescribeClusterVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeClusters.go b/service/redshift/api_op_DescribeClusters.go index 80ab50975b6..0191588b727 100644 --- a/service/redshift/api_op_DescribeClusters.go +++ b/service/redshift/api_op_DescribeClusters.go @@ -217,12 +217,13 @@ func NewDescribeClustersPaginator(client DescribeClustersAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeClusters page. @@ -249,7 +250,10 @@ func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeDataShares.go b/service/redshift/api_op_DescribeDataShares.go index 11692dacd76..ed299009b12 100644 --- a/service/redshift/api_op_DescribeDataShares.go +++ b/service/redshift/api_op_DescribeDataShares.go @@ -181,12 +181,13 @@ func NewDescribeDataSharesPaginator(client DescribeDataSharesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDataSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDataShares page. @@ -213,7 +214,10 @@ func (p *DescribeDataSharesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeDataSharesForConsumer.go b/service/redshift/api_op_DescribeDataSharesForConsumer.go index dc9d94fa635..eda661c8e6f 100644 --- a/service/redshift/api_op_DescribeDataSharesForConsumer.go +++ b/service/redshift/api_op_DescribeDataSharesForConsumer.go @@ -189,12 +189,13 @@ func NewDescribeDataSharesForConsumerPaginator(client DescribeDataSharesForConsu client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDataSharesForConsumerPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDataSharesForConsumer page. @@ -221,7 +222,10 @@ func (p *DescribeDataSharesForConsumerPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeDataSharesForProducer.go b/service/redshift/api_op_DescribeDataSharesForProducer.go index 7375397bde4..b65fa82ccac 100644 --- a/service/redshift/api_op_DescribeDataSharesForProducer.go +++ b/service/redshift/api_op_DescribeDataSharesForProducer.go @@ -189,12 +189,13 @@ func NewDescribeDataSharesForProducerPaginator(client DescribeDataSharesForProdu client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDataSharesForProducerPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDataSharesForProducer page. @@ -221,7 +222,10 @@ func (p *DescribeDataSharesForProducerPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeDefaultClusterParameters.go b/service/redshift/api_op_DescribeDefaultClusterParameters.go index 2c1e0c5ba84..6b2750a51fa 100644 --- a/service/redshift/api_op_DescribeDefaultClusterParameters.go +++ b/service/redshift/api_op_DescribeDefaultClusterParameters.go @@ -186,12 +186,13 @@ func NewDescribeDefaultClusterParametersPaginator(client DescribeDefaultClusterP client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDefaultClusterParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDefaultClusterParameters page. @@ -221,7 +222,10 @@ func (p *DescribeDefaultClusterParametersPaginator) NextPage(ctx context.Context p.nextToken = result.DefaultClusterParameters.Marker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeEndpointAccess.go b/service/redshift/api_op_DescribeEndpointAccess.go index addf3455e6f..a61662960e4 100644 --- a/service/redshift/api_op_DescribeEndpointAccess.go +++ b/service/redshift/api_op_DescribeEndpointAccess.go @@ -181,12 +181,13 @@ func NewDescribeEndpointAccessPaginator(client DescribeEndpointAccessAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEndpointAccessPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEndpointAccess page. @@ -213,7 +214,10 @@ func (p *DescribeEndpointAccessPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeEndpointAuthorization.go b/service/redshift/api_op_DescribeEndpointAuthorization.go index cb874d3d1d9..a479f5520b7 100644 --- a/service/redshift/api_op_DescribeEndpointAuthorization.go +++ b/service/redshift/api_op_DescribeEndpointAuthorization.go @@ -185,12 +185,13 @@ func NewDescribeEndpointAuthorizationPaginator(client DescribeEndpointAuthorizat client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEndpointAuthorizationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEndpointAuthorization page. @@ -217,7 +218,10 @@ func (p *DescribeEndpointAuthorizationPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeEventSubscriptions.go b/service/redshift/api_op_DescribeEventSubscriptions.go index d242011fb4d..d2d6a0df157 100644 --- a/service/redshift/api_op_DescribeEventSubscriptions.go +++ b/service/redshift/api_op_DescribeEventSubscriptions.go @@ -210,12 +210,13 @@ func NewDescribeEventSubscriptionsPaginator(client DescribeEventSubscriptionsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEventSubscriptions page. @@ -242,7 +243,10 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeEvents.go b/service/redshift/api_op_DescribeEvents.go index 3fdc6c4cd97..886e47d794e 100644 --- a/service/redshift/api_op_DescribeEvents.go +++ b/service/redshift/api_op_DescribeEvents.go @@ -233,12 +233,13 @@ func NewDescribeEventsPaginator(client DescribeEventsAPIClient, params *Describe client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEvents page. @@ -265,7 +266,10 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeHsmClientCertificates.go b/service/redshift/api_op_DescribeHsmClientCertificates.go index 9260d9e7427..bd6571cef33 100644 --- a/service/redshift/api_op_DescribeHsmClientCertificates.go +++ b/service/redshift/api_op_DescribeHsmClientCertificates.go @@ -213,12 +213,13 @@ func NewDescribeHsmClientCertificatesPaginator(client DescribeHsmClientCertifica client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeHsmClientCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeHsmClientCertificates page. @@ -245,7 +246,10 @@ func (p *DescribeHsmClientCertificatesPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeHsmConfigurations.go b/service/redshift/api_op_DescribeHsmConfigurations.go index aa6dfdfa443..a3d6202ae25 100644 --- a/service/redshift/api_op_DescribeHsmConfigurations.go +++ b/service/redshift/api_op_DescribeHsmConfigurations.go @@ -211,12 +211,13 @@ func NewDescribeHsmConfigurationsPaginator(client DescribeHsmConfigurationsAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeHsmConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeHsmConfigurations page. @@ -243,7 +244,10 @@ func (p *DescribeHsmConfigurationsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeNodeConfigurationOptions.go b/service/redshift/api_op_DescribeNodeConfigurationOptions.go index 12a2b188bf0..bc9d055b591 100644 --- a/service/redshift/api_op_DescribeNodeConfigurationOptions.go +++ b/service/redshift/api_op_DescribeNodeConfigurationOptions.go @@ -206,12 +206,13 @@ func NewDescribeNodeConfigurationOptionsPaginator(client DescribeNodeConfigurati client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeNodeConfigurationOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeNodeConfigurationOptions page. @@ -238,7 +239,10 @@ func (p *DescribeNodeConfigurationOptionsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeOrderableClusterOptions.go b/service/redshift/api_op_DescribeOrderableClusterOptions.go index a81ed7b22d6..004d415e83c 100644 --- a/service/redshift/api_op_DescribeOrderableClusterOptions.go +++ b/service/redshift/api_op_DescribeOrderableClusterOptions.go @@ -201,12 +201,13 @@ func NewDescribeOrderableClusterOptionsPaginator(client DescribeOrderableCluster client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOrderableClusterOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOrderableClusterOptions page. @@ -233,7 +234,10 @@ func (p *DescribeOrderableClusterOptionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go b/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go index ece99d20af3..ffc1ae46909 100644 --- a/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go +++ b/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go @@ -183,12 +183,13 @@ func NewDescribeReservedNodeExchangeStatusPaginator(client DescribeReservedNodeE client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedNodeExchangeStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedNodeExchangeStatus page. @@ -215,7 +216,10 @@ func (p *DescribeReservedNodeExchangeStatusPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeReservedNodeOfferings.go b/service/redshift/api_op_DescribeReservedNodeOfferings.go index 315b6ce3bea..d3c702b3ec0 100644 --- a/service/redshift/api_op_DescribeReservedNodeOfferings.go +++ b/service/redshift/api_op_DescribeReservedNodeOfferings.go @@ -194,12 +194,13 @@ func NewDescribeReservedNodeOfferingsPaginator(client DescribeReservedNodeOfferi client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedNodeOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedNodeOfferings page. @@ -226,7 +227,10 @@ func (p *DescribeReservedNodeOfferingsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeReservedNodes.go b/service/redshift/api_op_DescribeReservedNodes.go index 5d3e57f33f5..3375b2b922d 100644 --- a/service/redshift/api_op_DescribeReservedNodes.go +++ b/service/redshift/api_op_DescribeReservedNodes.go @@ -183,12 +183,13 @@ func NewDescribeReservedNodesPaginator(client DescribeReservedNodesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeReservedNodesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeReservedNodes page. @@ -215,7 +216,10 @@ func (p *DescribeReservedNodesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeScheduledActions.go b/service/redshift/api_op_DescribeScheduledActions.go index 377c7adcd18..f773b710ed8 100644 --- a/service/redshift/api_op_DescribeScheduledActions.go +++ b/service/redshift/api_op_DescribeScheduledActions.go @@ -205,12 +205,13 @@ func NewDescribeScheduledActionsPaginator(client DescribeScheduledActionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeScheduledActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeScheduledActions page. @@ -237,7 +238,10 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeSnapshotCopyGrants.go b/service/redshift/api_op_DescribeSnapshotCopyGrants.go index 8ecefc50fa0..4f145d4eb72 100644 --- a/service/redshift/api_op_DescribeSnapshotCopyGrants.go +++ b/service/redshift/api_op_DescribeSnapshotCopyGrants.go @@ -206,12 +206,13 @@ func NewDescribeSnapshotCopyGrantsPaginator(client DescribeSnapshotCopyGrantsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSnapshotCopyGrantsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSnapshotCopyGrants page. @@ -238,7 +239,10 @@ func (p *DescribeSnapshotCopyGrantsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeSnapshotSchedules.go b/service/redshift/api_op_DescribeSnapshotSchedules.go index 77e25f5bd67..b9e7c2e62a3 100644 --- a/service/redshift/api_op_DescribeSnapshotSchedules.go +++ b/service/redshift/api_op_DescribeSnapshotSchedules.go @@ -188,12 +188,13 @@ func NewDescribeSnapshotSchedulesPaginator(client DescribeSnapshotSchedulesAPICl client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSnapshotSchedulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSnapshotSchedules page. @@ -220,7 +221,10 @@ func (p *DescribeSnapshotSchedulesPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeTableRestoreStatus.go b/service/redshift/api_op_DescribeTableRestoreStatus.go index caa3027014d..b31b03565bd 100644 --- a/service/redshift/api_op_DescribeTableRestoreStatus.go +++ b/service/redshift/api_op_DescribeTableRestoreStatus.go @@ -185,12 +185,13 @@ func NewDescribeTableRestoreStatusPaginator(client DescribeTableRestoreStatusAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTableRestoreStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTableRestoreStatus page. @@ -217,7 +218,10 @@ func (p *DescribeTableRestoreStatusPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeTags.go b/service/redshift/api_op_DescribeTags.go index 67cad9079b1..1fa1575bca1 100644 --- a/service/redshift/api_op_DescribeTags.go +++ b/service/redshift/api_op_DescribeTags.go @@ -245,12 +245,13 @@ func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTags client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTags page. @@ -277,7 +278,10 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_DescribeUsageLimits.go b/service/redshift/api_op_DescribeUsageLimits.go index 3fed8f1ffd0..fda51d6047d 100644 --- a/service/redshift/api_op_DescribeUsageLimits.go +++ b/service/redshift/api_op_DescribeUsageLimits.go @@ -219,12 +219,13 @@ func NewDescribeUsageLimitsPaginator(client DescribeUsageLimitsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeUsageLimitsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeUsageLimits page. @@ -251,7 +252,10 @@ func (p *DescribeUsageLimitsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go b/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go index 978e64a457f..7fff397ecd4 100644 --- a/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go +++ b/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go @@ -196,12 +196,13 @@ func NewGetReservedNodeExchangeConfigurationOptionsPaginator(client GetReservedN client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetReservedNodeExchangeConfigurationOptions page. @@ -228,7 +229,10 @@ func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) NextPage(ctx cont prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshift/api_op_GetReservedNodeExchangeOfferings.go b/service/redshift/api_op_GetReservedNodeExchangeOfferings.go index 87299da0e54..1887e1e6089 100644 --- a/service/redshift/api_op_GetReservedNodeExchangeOfferings.go +++ b/service/redshift/api_op_GetReservedNodeExchangeOfferings.go @@ -180,12 +180,13 @@ func NewGetReservedNodeExchangeOfferingsPaginator(client GetReservedNodeExchange client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetReservedNodeExchangeOfferingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetReservedNodeExchangeOfferings page. @@ -212,7 +213,10 @@ func (p *GetReservedNodeExchangeOfferingsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshiftdata/api_op_DescribeTable.go b/service/redshiftdata/api_op_DescribeTable.go index d748b846a65..322cde12964 100644 --- a/service/redshiftdata/api_op_DescribeTable.go +++ b/service/redshiftdata/api_op_DescribeTable.go @@ -224,12 +224,13 @@ func NewDescribeTablePaginator(client DescribeTableAPIClient, params *DescribeTa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTablePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTable page. @@ -252,7 +253,10 @@ func (p *DescribeTablePaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshiftdata/api_op_GetStatementResult.go b/service/redshiftdata/api_op_GetStatementResult.go index 942e7816dee..a78578fe4a5 100644 --- a/service/redshiftdata/api_op_GetStatementResult.go +++ b/service/redshiftdata/api_op_GetStatementResult.go @@ -184,12 +184,13 @@ func NewGetStatementResultPaginator(client GetStatementResultAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetStatementResultPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetStatementResult page. @@ -210,7 +211,10 @@ func (p *GetStatementResultPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshiftdata/api_op_ListDatabases.go b/service/redshiftdata/api_op_ListDatabases.go index f042ee04be6..2f4fcd55c98 100644 --- a/service/redshiftdata/api_op_ListDatabases.go +++ b/service/redshiftdata/api_op_ListDatabases.go @@ -205,12 +205,13 @@ func NewListDatabasesPaginator(client ListDatabasesAPIClient, params *ListDataba client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatabasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatabases page. @@ -233,7 +234,10 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshiftdata/api_op_ListSchemas.go b/service/redshiftdata/api_op_ListSchemas.go index bdd29a6c079..387950d521f 100644 --- a/service/redshiftdata/api_op_ListSchemas.go +++ b/service/redshiftdata/api_op_ListSchemas.go @@ -215,12 +215,13 @@ func NewListSchemasPaginator(client ListSchemasAPIClient, params *ListSchemasInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchemasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchemas page. @@ -243,7 +244,10 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshiftdata/api_op_ListStatements.go b/service/redshiftdata/api_op_ListStatements.go index 030eb1c196d..6db83010d93 100644 --- a/service/redshiftdata/api_op_ListStatements.go +++ b/service/redshiftdata/api_op_ListStatements.go @@ -211,12 +211,13 @@ func NewListStatementsPaginator(client ListStatementsAPIClient, params *ListStat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStatementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStatements page. @@ -239,7 +240,10 @@ func (p *ListStatementsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/redshiftdata/api_op_ListTables.go b/service/redshiftdata/api_op_ListTables.go index 4284f64f21f..cd30ad76d9e 100644 --- a/service/redshiftdata/api_op_ListTables.go +++ b/service/redshiftdata/api_op_ListTables.go @@ -228,12 +228,13 @@ func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTables page. @@ -256,7 +257,10 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_DescribeProjectVersions.go b/service/rekognition/api_op_DescribeProjectVersions.go index bca838a3714..721ef09253d 100644 --- a/service/rekognition/api_op_DescribeProjectVersions.go +++ b/service/rekognition/api_op_DescribeProjectVersions.go @@ -196,12 +196,13 @@ func NewDescribeProjectVersionsPaginator(client DescribeProjectVersionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeProjectVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeProjectVersions page. @@ -228,7 +229,10 @@ func (p *DescribeProjectVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_DescribeProjects.go b/service/rekognition/api_op_DescribeProjects.go index eee2b6c7d02..4184ef4b37f 100644 --- a/service/rekognition/api_op_DescribeProjects.go +++ b/service/rekognition/api_op_DescribeProjects.go @@ -176,12 +176,13 @@ func NewDescribeProjectsPaginator(client DescribeProjectsAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeProjects page. @@ -208,7 +209,10 @@ func (p *DescribeProjectsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetCelebrityRecognition.go b/service/rekognition/api_op_GetCelebrityRecognition.go index 74aeca8855f..ecd3483e82e 100644 --- a/service/rekognition/api_op_GetCelebrityRecognition.go +++ b/service/rekognition/api_op_GetCelebrityRecognition.go @@ -229,12 +229,13 @@ func NewGetCelebrityRecognitionPaginator(client GetCelebrityRecognitionAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCelebrityRecognitionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCelebrityRecognition page. @@ -261,7 +262,10 @@ func (p *GetCelebrityRecognitionPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetContentModeration.go b/service/rekognition/api_op_GetContentModeration.go index 6c3a5e2b59c..6e22505a005 100644 --- a/service/rekognition/api_op_GetContentModeration.go +++ b/service/rekognition/api_op_GetContentModeration.go @@ -228,12 +228,13 @@ func NewGetContentModerationPaginator(client GetContentModerationAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetContentModerationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetContentModeration page. @@ -260,7 +261,10 @@ func (p *GetContentModerationPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetFaceDetection.go b/service/rekognition/api_op_GetFaceDetection.go index d8989f0a71f..146fb5aadac 100644 --- a/service/rekognition/api_op_GetFaceDetection.go +++ b/service/rekognition/api_op_GetFaceDetection.go @@ -204,12 +204,13 @@ func NewGetFaceDetectionPaginator(client GetFaceDetectionAPIClient, params *GetF client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetFaceDetectionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetFaceDetection page. @@ -236,7 +237,10 @@ func (p *GetFaceDetectionPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetFaceSearch.go b/service/rekognition/api_op_GetFaceSearch.go index 54aa7b8828c..da6c7da107b 100644 --- a/service/rekognition/api_op_GetFaceSearch.go +++ b/service/rekognition/api_op_GetFaceSearch.go @@ -219,12 +219,13 @@ func NewGetFaceSearchPaginator(client GetFaceSearchAPIClient, params *GetFaceSea client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetFaceSearchPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetFaceSearch page. @@ -251,7 +252,10 @@ func (p *GetFaceSearchPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetLabelDetection.go b/service/rekognition/api_op_GetLabelDetection.go index 7b354e9896f..4cae816eac7 100644 --- a/service/rekognition/api_op_GetLabelDetection.go +++ b/service/rekognition/api_op_GetLabelDetection.go @@ -218,12 +218,13 @@ func NewGetLabelDetectionPaginator(client GetLabelDetectionAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetLabelDetectionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetLabelDetection page. @@ -250,7 +251,10 @@ func (p *GetLabelDetectionPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetPersonTracking.go b/service/rekognition/api_op_GetPersonTracking.go index ea6c79eaf42..d03501cbd76 100644 --- a/service/rekognition/api_op_GetPersonTracking.go +++ b/service/rekognition/api_op_GetPersonTracking.go @@ -218,12 +218,13 @@ func NewGetPersonTrackingPaginator(client GetPersonTrackingAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetPersonTrackingPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetPersonTracking page. @@ -250,7 +251,10 @@ func (p *GetPersonTrackingPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetSegmentDetection.go b/service/rekognition/api_op_GetSegmentDetection.go index 182be5a5e49..d3bf24906b2 100644 --- a/service/rekognition/api_op_GetSegmentDetection.go +++ b/service/rekognition/api_op_GetSegmentDetection.go @@ -226,12 +226,13 @@ func NewGetSegmentDetectionPaginator(client GetSegmentDetectionAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSegmentDetectionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSegmentDetection page. @@ -258,7 +259,10 @@ func (p *GetSegmentDetectionPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_GetTextDetection.go b/service/rekognition/api_op_GetTextDetection.go index daeabca6ba2..449f66d710b 100644 --- a/service/rekognition/api_op_GetTextDetection.go +++ b/service/rekognition/api_op_GetTextDetection.go @@ -209,12 +209,13 @@ func NewGetTextDetectionPaginator(client GetTextDetectionAPIClient, params *GetT client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTextDetectionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTextDetection page. @@ -241,7 +242,10 @@ func (p *GetTextDetectionPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_ListCollections.go b/service/rekognition/api_op_ListCollections.go index 0666257cb9d..25fec27de51 100644 --- a/service/rekognition/api_op_ListCollections.go +++ b/service/rekognition/api_op_ListCollections.go @@ -170,12 +170,13 @@ func NewListCollectionsPaginator(client ListCollectionsAPIClient, params *ListCo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCollectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCollections page. @@ -202,7 +203,10 @@ func (p *ListCollectionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_ListDatasetEntries.go b/service/rekognition/api_op_ListDatasetEntries.go index 072cfa6d0b3..3301ab32468 100644 --- a/service/rekognition/api_op_ListDatasetEntries.go +++ b/service/rekognition/api_op_ListDatasetEntries.go @@ -209,12 +209,13 @@ func NewListDatasetEntriesPaginator(client ListDatasetEntriesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetEntriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetEntries page. @@ -241,7 +242,10 @@ func (p *ListDatasetEntriesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_ListDatasetLabels.go b/service/rekognition/api_op_ListDatasetLabels.go index 20e448e923a..519067d2106 100644 --- a/service/rekognition/api_op_ListDatasetLabels.go +++ b/service/rekognition/api_op_ListDatasetLabels.go @@ -181,12 +181,13 @@ func NewListDatasetLabelsPaginator(client ListDatasetLabelsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatasetLabelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatasetLabels page. @@ -213,7 +214,10 @@ func (p *ListDatasetLabelsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_ListFaces.go b/service/rekognition/api_op_ListFaces.go index af7c78c69f6..260f4eb28b0 100644 --- a/service/rekognition/api_op_ListFaces.go +++ b/service/rekognition/api_op_ListFaces.go @@ -178,12 +178,13 @@ func NewListFacesPaginator(client ListFacesAPIClient, params *ListFacesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFaces page. @@ -210,7 +211,10 @@ func (p *ListFacesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rekognition/api_op_ListStreamProcessors.go b/service/rekognition/api_op_ListStreamProcessors.go index 924a4dd70d3..7fab2e27b20 100644 --- a/service/rekognition/api_op_ListStreamProcessors.go +++ b/service/rekognition/api_op_ListStreamProcessors.go @@ -169,12 +169,13 @@ func NewListStreamProcessorsPaginator(client ListStreamProcessorsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamProcessorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreamProcessors page. @@ -201,7 +202,10 @@ func (p *ListStreamProcessorsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAlarmRecommendations.go b/service/resiliencehub/api_op_ListAlarmRecommendations.go index 64cce71426b..7fb9a7c459f 100644 --- a/service/resiliencehub/api_op_ListAlarmRecommendations.go +++ b/service/resiliencehub/api_op_ListAlarmRecommendations.go @@ -175,12 +175,13 @@ func NewListAlarmRecommendationsPaginator(client ListAlarmRecommendationsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAlarmRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAlarmRecommendations page. @@ -201,7 +202,10 @@ func (p *ListAlarmRecommendationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAppAssessments.go b/service/resiliencehub/api_op_ListAppAssessments.go index 0edfd5d520c..69afdb2e6d9 100644 --- a/service/resiliencehub/api_op_ListAppAssessments.go +++ b/service/resiliencehub/api_op_ListAppAssessments.go @@ -186,12 +186,13 @@ func NewListAppAssessmentsPaginator(client ListAppAssessmentsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppAssessmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppAssessments page. @@ -212,7 +213,10 @@ func (p *ListAppAssessmentsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAppComponentCompliances.go b/service/resiliencehub/api_op_ListAppComponentCompliances.go index aa8c0f44348..8148bdd5a34 100644 --- a/service/resiliencehub/api_op_ListAppComponentCompliances.go +++ b/service/resiliencehub/api_op_ListAppComponentCompliances.go @@ -175,12 +175,13 @@ func NewListAppComponentCompliancesPaginator(client ListAppComponentCompliancesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppComponentCompliancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppComponentCompliances page. @@ -201,7 +202,10 @@ func (p *ListAppComponentCompliancesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAppComponentRecommendations.go b/service/resiliencehub/api_op_ListAppComponentRecommendations.go index f7d15eeb603..87676ace123 100644 --- a/service/resiliencehub/api_op_ListAppComponentRecommendations.go +++ b/service/resiliencehub/api_op_ListAppComponentRecommendations.go @@ -175,12 +175,13 @@ func NewListAppComponentRecommendationsPaginator(client ListAppComponentRecommen client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppComponentRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppComponentRecommendations page. @@ -201,7 +202,10 @@ func (p *ListAppComponentRecommendationsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAppVersionResourceMappings.go b/service/resiliencehub/api_op_ListAppVersionResourceMappings.go index b0fcb51ac95..8157070a7db 100644 --- a/service/resiliencehub/api_op_ListAppVersionResourceMappings.go +++ b/service/resiliencehub/api_op_ListAppVersionResourceMappings.go @@ -184,12 +184,13 @@ func NewListAppVersionResourceMappingsPaginator(client ListAppVersionResourceMap client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppVersionResourceMappingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppVersionResourceMappings page. @@ -210,7 +211,10 @@ func (p *ListAppVersionResourceMappingsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAppVersionResources.go b/service/resiliencehub/api_op_ListAppVersionResources.go index 5a695665c01..9493b179784 100644 --- a/service/resiliencehub/api_op_ListAppVersionResources.go +++ b/service/resiliencehub/api_op_ListAppVersionResources.go @@ -185,12 +185,13 @@ func NewListAppVersionResourcesPaginator(client ListAppVersionResourcesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppVersionResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppVersionResources page. @@ -211,7 +212,10 @@ func (p *ListAppVersionResourcesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListAppVersions.go b/service/resiliencehub/api_op_ListAppVersions.go index d23363c2c9a..cf54958dca4 100644 --- a/service/resiliencehub/api_op_ListAppVersions.go +++ b/service/resiliencehub/api_op_ListAppVersions.go @@ -170,12 +170,13 @@ func NewListAppVersionsPaginator(client ListAppVersionsAPIClient, params *ListAp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppVersions page. @@ -196,7 +197,10 @@ func (p *ListAppVersionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListApps.go b/service/resiliencehub/api_op_ListApps.go index 13ce877cf1f..678d135ba8b 100644 --- a/service/resiliencehub/api_op_ListApps.go +++ b/service/resiliencehub/api_op_ListApps.go @@ -167,12 +167,13 @@ func NewListAppsPaginator(client ListAppsAPIClient, params *ListAppsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApps page. @@ -193,7 +194,10 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListRecommendationTemplates.go b/service/resiliencehub/api_op_ListRecommendationTemplates.go index 310c00439f8..34d0eea9d35 100644 --- a/service/resiliencehub/api_op_ListRecommendationTemplates.go +++ b/service/resiliencehub/api_op_ListRecommendationTemplates.go @@ -184,12 +184,13 @@ func NewListRecommendationTemplatesPaginator(client ListRecommendationTemplatesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecommendationTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecommendationTemplates page. @@ -210,7 +211,10 @@ func (p *ListRecommendationTemplatesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListResiliencyPolicies.go b/service/resiliencehub/api_op_ListResiliencyPolicies.go index 6d3d8f96131..7353eb7bb76 100644 --- a/service/resiliencehub/api_op_ListResiliencyPolicies.go +++ b/service/resiliencehub/api_op_ListResiliencyPolicies.go @@ -162,12 +162,13 @@ func NewListResiliencyPoliciesPaginator(client ListResiliencyPoliciesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResiliencyPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResiliencyPolicies page. @@ -188,7 +189,10 @@ func (p *ListResiliencyPoliciesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListSopRecommendations.go b/service/resiliencehub/api_op_ListSopRecommendations.go index db575a67302..f939f8cbab2 100644 --- a/service/resiliencehub/api_op_ListSopRecommendations.go +++ b/service/resiliencehub/api_op_ListSopRecommendations.go @@ -173,12 +173,13 @@ func NewListSopRecommendationsPaginator(client ListSopRecommendationsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSopRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSopRecommendations page. @@ -199,7 +200,10 @@ func (p *ListSopRecommendationsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go b/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go index ba1321f2715..2eca2f8b949 100644 --- a/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go +++ b/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go @@ -161,12 +161,13 @@ func NewListSuggestedResiliencyPoliciesPaginator(client ListSuggestedResiliencyP client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSuggestedResiliencyPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSuggestedResiliencyPolicies page. @@ -187,7 +188,10 @@ func (p *ListSuggestedResiliencyPoliciesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListTestRecommendations.go b/service/resiliencehub/api_op_ListTestRecommendations.go index fb873cca11f..6c3036e456e 100644 --- a/service/resiliencehub/api_op_ListTestRecommendations.go +++ b/service/resiliencehub/api_op_ListTestRecommendations.go @@ -172,12 +172,13 @@ func NewListTestRecommendationsPaginator(client ListTestRecommendationsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTestRecommendationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTestRecommendations page. @@ -198,7 +199,10 @@ func (p *ListTestRecommendationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go b/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go index 779e2b5fbde..718538c117d 100644 --- a/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go +++ b/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go @@ -188,12 +188,13 @@ func NewListUnsupportedAppVersionResourcesPaginator(client ListUnsupportedAppVer client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUnsupportedAppVersionResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUnsupportedAppVersionResources page. @@ -214,7 +215,10 @@ func (p *ListUnsupportedAppVersionResourcesPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroups/api_op_ListGroupResources.go b/service/resourcegroups/api_op_ListGroupResources.go index 393e0b0c8ef..9a0a75f9136 100644 --- a/service/resourcegroups/api_op_ListGroupResources.go +++ b/service/resourcegroups/api_op_ListGroupResources.go @@ -240,12 +240,13 @@ func NewListGroupResourcesPaginator(client ListGroupResourcesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupResources page. @@ -272,7 +273,10 @@ func (p *ListGroupResourcesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroups/api_op_ListGroups.go b/service/resourcegroups/api_op_ListGroups.go index ae200c086e4..a185f34b51b 100644 --- a/service/resourcegroups/api_op_ListGroups.go +++ b/service/resourcegroups/api_op_ListGroups.go @@ -213,12 +213,13 @@ func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. @@ -245,7 +246,10 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroups/api_op_SearchResources.go b/service/resourcegroups/api_op_SearchResources.go index 93abfe11ef6..3955560c119 100644 --- a/service/resourcegroups/api_op_SearchResources.go +++ b/service/resourcegroups/api_op_SearchResources.go @@ -210,12 +210,13 @@ func NewSearchResourcesPaginator(client SearchResourcesAPIClient, params *Search client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchResources page. @@ -242,7 +243,10 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go b/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go index 1927d1a1d56..84f863a4a56 100644 --- a/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go +++ b/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go @@ -229,12 +229,13 @@ func NewGetComplianceSummaryPaginator(client GetComplianceSummaryAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.PaginationToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetComplianceSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetComplianceSummary page. @@ -261,7 +262,10 @@ func (p *GetComplianceSummaryPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.PaginationToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroupstaggingapi/api_op_GetResources.go b/service/resourcegroupstaggingapi/api_op_GetResources.go index 64b15c00fad..af56d4d7396 100644 --- a/service/resourcegroupstaggingapi/api_op_GetResources.go +++ b/service/resourcegroupstaggingapi/api_op_GetResources.go @@ -283,12 +283,13 @@ func NewGetResourcesPaginator(client GetResourcesAPIClient, params *GetResources client: client, params: params, firstPage: true, + nextToken: params.PaginationToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResources page. @@ -315,7 +316,10 @@ func (p *GetResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.PaginationToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroupstaggingapi/api_op_GetTagKeys.go b/service/resourcegroupstaggingapi/api_op_GetTagKeys.go index 4ed184cfb0d..ee55df4f207 100644 --- a/service/resourcegroupstaggingapi/api_op_GetTagKeys.go +++ b/service/resourcegroupstaggingapi/api_op_GetTagKeys.go @@ -159,12 +159,13 @@ func NewGetTagKeysPaginator(client GetTagKeysAPIClient, params *GetTagKeysInput, client: client, params: params, firstPage: true, + nextToken: params.PaginationToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTagKeysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTagKeys page. @@ -185,7 +186,10 @@ func (p *GetTagKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.PaginationToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/resourcegroupstaggingapi/api_op_GetTagValues.go b/service/resourcegroupstaggingapi/api_op_GetTagValues.go index 2101f28484b..96608e43e88 100644 --- a/service/resourcegroupstaggingapi/api_op_GetTagValues.go +++ b/service/resourcegroupstaggingapi/api_op_GetTagValues.go @@ -171,12 +171,13 @@ func NewGetTagValuesPaginator(client GetTagValuesAPIClient, params *GetTagValues client: client, params: params, firstPage: true, + nextToken: params.PaginationToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTagValuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTagValues page. @@ -197,7 +198,10 @@ func (p *GetTagValuesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.PaginationToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListDeploymentJobs.go b/service/robomaker/api_op_ListDeploymentJobs.go index aeca1721475..cc2dee76c26 100644 --- a/service/robomaker/api_op_ListDeploymentJobs.go +++ b/service/robomaker/api_op_ListDeploymentJobs.go @@ -187,12 +187,13 @@ func NewListDeploymentJobsPaginator(client ListDeploymentJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeploymentJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeploymentJobs page. @@ -219,7 +220,10 @@ func (p *ListDeploymentJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListFleets.go b/service/robomaker/api_op_ListFleets.go index 0ea7269ce2e..ae3f1ba27ec 100644 --- a/service/robomaker/api_op_ListFleets.go +++ b/service/robomaker/api_op_ListFleets.go @@ -185,12 +185,13 @@ func NewListFleetsPaginator(client ListFleetsAPIClient, params *ListFleetsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFleets page. @@ -217,7 +218,10 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListRobotApplications.go b/service/robomaker/api_op_ListRobotApplications.go index c96974f3c82..d1fc843c198 100644 --- a/service/robomaker/api_op_ListRobotApplications.go +++ b/service/robomaker/api_op_ListRobotApplications.go @@ -188,12 +188,13 @@ func NewListRobotApplicationsPaginator(client ListRobotApplicationsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRobotApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRobotApplications page. @@ -220,7 +221,10 @@ func (p *ListRobotApplicationsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListRobots.go b/service/robomaker/api_op_ListRobots.go index 24bb58e8deb..2a3591a5880 100644 --- a/service/robomaker/api_op_ListRobots.go +++ b/service/robomaker/api_op_ListRobots.go @@ -185,12 +185,13 @@ func NewListRobotsPaginator(client ListRobotsAPIClient, params *ListRobotsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRobotsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRobots page. @@ -217,7 +218,10 @@ func (p *ListRobotsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListSimulationApplications.go b/service/robomaker/api_op_ListSimulationApplications.go index eaaef2c845f..2e84ea2abb2 100644 --- a/service/robomaker/api_op_ListSimulationApplications.go +++ b/service/robomaker/api_op_ListSimulationApplications.go @@ -193,12 +193,13 @@ func NewListSimulationApplicationsPaginator(client ListSimulationApplicationsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSimulationApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSimulationApplications page. @@ -225,7 +226,10 @@ func (p *ListSimulationApplicationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListSimulationJobBatches.go b/service/robomaker/api_op_ListSimulationJobBatches.go index 00e18511b08..de151128669 100644 --- a/service/robomaker/api_op_ListSimulationJobBatches.go +++ b/service/robomaker/api_op_ListSimulationJobBatches.go @@ -180,12 +180,13 @@ func NewListSimulationJobBatchesPaginator(client ListSimulationJobBatchesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSimulationJobBatchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSimulationJobBatches page. @@ -212,7 +213,10 @@ func (p *ListSimulationJobBatchesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListSimulationJobs.go b/service/robomaker/api_op_ListSimulationJobs.go index da31c7e5106..fb1503bd467 100644 --- a/service/robomaker/api_op_ListSimulationJobs.go +++ b/service/robomaker/api_op_ListSimulationJobs.go @@ -189,12 +189,13 @@ func NewListSimulationJobsPaginator(client ListSimulationJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSimulationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSimulationJobs page. @@ -221,7 +222,10 @@ func (p *ListSimulationJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListWorldExportJobs.go b/service/robomaker/api_op_ListWorldExportJobs.go index 2bff97629de..7c1128c3cde 100644 --- a/service/robomaker/api_op_ListWorldExportJobs.go +++ b/service/robomaker/api_op_ListWorldExportJobs.go @@ -184,12 +184,13 @@ func NewListWorldExportJobsPaginator(client ListWorldExportJobsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorldExportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorldExportJobs page. @@ -216,7 +217,10 @@ func (p *ListWorldExportJobsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListWorldGenerationJobs.go b/service/robomaker/api_op_ListWorldGenerationJobs.go index 521d20246d0..93d2df65d1d 100644 --- a/service/robomaker/api_op_ListWorldGenerationJobs.go +++ b/service/robomaker/api_op_ListWorldGenerationJobs.go @@ -187,12 +187,13 @@ func NewListWorldGenerationJobsPaginator(client ListWorldGenerationJobsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorldGenerationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorldGenerationJobs page. @@ -219,7 +220,10 @@ func (p *ListWorldGenerationJobsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListWorldTemplates.go b/service/robomaker/api_op_ListWorldTemplates.go index f7d43816859..eb7e8dd3066 100644 --- a/service/robomaker/api_op_ListWorldTemplates.go +++ b/service/robomaker/api_op_ListWorldTemplates.go @@ -179,12 +179,13 @@ func NewListWorldTemplatesPaginator(client ListWorldTemplatesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorldTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorldTemplates page. @@ -211,7 +212,10 @@ func (p *ListWorldTemplatesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/robomaker/api_op_ListWorlds.go b/service/robomaker/api_op_ListWorlds.go index 8d4a67866c6..391d327390d 100644 --- a/service/robomaker/api_op_ListWorlds.go +++ b/service/robomaker/api_op_ListWorlds.go @@ -180,12 +180,13 @@ func NewListWorldsPaginator(client ListWorldsAPIClient, params *ListWorldsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorldsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorlds page. @@ -212,7 +213,10 @@ func (p *ListWorldsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53/api_op_ListHealthChecks.go b/service/route53/api_op_ListHealthChecks.go index 5f34a4efa77..95fc11043f3 100644 --- a/service/route53/api_op_ListHealthChecks.go +++ b/service/route53/api_op_ListHealthChecks.go @@ -200,12 +200,13 @@ func NewListHealthChecksPaginator(client ListHealthChecksAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHealthChecksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHealthChecks page. @@ -232,7 +233,10 @@ func (p *ListHealthChecksPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53/api_op_ListHostedZones.go b/service/route53/api_op_ListHostedZones.go index ad8f8203149..dcff1efe392 100644 --- a/service/route53/api_op_ListHostedZones.go +++ b/service/route53/api_op_ListHostedZones.go @@ -211,12 +211,13 @@ func NewListHostedZonesPaginator(client ListHostedZonesAPIClient, params *ListHo client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHostedZonesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHostedZones page. @@ -243,7 +244,10 @@ func (p *ListHostedZonesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53/api_op_ListQueryLoggingConfigs.go b/service/route53/api_op_ListQueryLoggingConfigs.go index 728ab1a6773..33c1b7b9802 100644 --- a/service/route53/api_op_ListQueryLoggingConfigs.go +++ b/service/route53/api_op_ListQueryLoggingConfigs.go @@ -207,12 +207,13 @@ func NewListQueryLoggingConfigsPaginator(client ListQueryLoggingConfigsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQueryLoggingConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQueryLoggingConfigs page. @@ -239,7 +240,10 @@ func (p *ListQueryLoggingConfigsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53domains/api_op_ListDomains.go b/service/route53domains/api_op_ListDomains.go index 8ac5052d6ca..b878fa63f33 100644 --- a/service/route53domains/api_op_ListDomains.go +++ b/service/route53domains/api_op_ListDomains.go @@ -170,12 +170,13 @@ func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInp client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomains page. @@ -202,7 +203,10 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextPageMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53domains/api_op_ListOperations.go b/service/route53domains/api_op_ListOperations.go index 3598d1d9f6f..e1195c25f41 100644 --- a/service/route53domains/api_op_ListOperations.go +++ b/service/route53domains/api_op_ListOperations.go @@ -178,12 +178,13 @@ func NewListOperationsPaginator(client ListOperationsAPIClient, params *ListOper client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOperationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOperations page. @@ -210,7 +211,10 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextPageMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go b/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go index 3db62558cd4..b0add921eee 100644 --- a/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go +++ b/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go @@ -172,12 +172,13 @@ func NewListAssociatedRoute53HealthChecksPaginator(client ListAssociatedRoute53H client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociatedRoute53HealthChecksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociatedRoute53HealthChecks page. @@ -200,7 +201,10 @@ func (p *ListAssociatedRoute53HealthChecksPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoverycontrolconfig/api_op_ListClusters.go b/service/route53recoverycontrolconfig/api_op_ListClusters.go index 5485c56c060..48ce9662536 100644 --- a/service/route53recoverycontrolconfig/api_op_ListClusters.go +++ b/service/route53recoverycontrolconfig/api_op_ListClusters.go @@ -159,12 +159,13 @@ func NewListClustersPaginator(client ListClustersAPIClient, params *ListClusters client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClustersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClusters page. @@ -187,7 +188,10 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoverycontrolconfig/api_op_ListControlPanels.go b/service/route53recoverycontrolconfig/api_op_ListControlPanels.go index 2c699dcec7a..fa6cf8dea97 100644 --- a/service/route53recoverycontrolconfig/api_op_ListControlPanels.go +++ b/service/route53recoverycontrolconfig/api_op_ListControlPanels.go @@ -163,12 +163,13 @@ func NewListControlPanelsPaginator(client ListControlPanelsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListControlPanelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListControlPanels page. @@ -191,7 +192,10 @@ func (p *ListControlPanelsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go b/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go index e3f80a3eed8..e001022447b 100644 --- a/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go +++ b/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go @@ -173,12 +173,13 @@ func NewListRoutingControlsPaginator(client ListRoutingControlsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRoutingControlsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRoutingControls page. @@ -201,7 +202,10 @@ func (p *ListRoutingControlsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go b/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go index 2b7e5472b48..d80a9d27bf7 100644 --- a/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go +++ b/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go @@ -170,12 +170,13 @@ func NewListSafetyRulesPaginator(client ListSafetyRulesAPIClient, params *ListSa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSafetyRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSafetyRules page. @@ -198,7 +199,10 @@ func (p *ListSafetyRulesPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go b/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go index 16df994fccb..edf0fbd9679 100644 --- a/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go +++ b/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go @@ -173,12 +173,13 @@ func NewGetCellReadinessSummaryPaginator(client GetCellReadinessSummaryAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCellReadinessSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCellReadinessSummary page. @@ -201,7 +202,10 @@ func (p *GetCellReadinessSummaryPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go b/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go index 7b610dec463..82f8a16abe1 100644 --- a/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go +++ b/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go @@ -180,12 +180,13 @@ func NewGetReadinessCheckResourceStatusPaginator(client GetReadinessCheckResourc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetReadinessCheckResourceStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetReadinessCheckResourceStatus page. @@ -208,7 +209,10 @@ func (p *GetReadinessCheckResourceStatusPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go b/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go index 483dd02a160..94d6a7f8602 100644 --- a/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go +++ b/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go @@ -176,12 +176,13 @@ func NewGetReadinessCheckStatusPaginator(client GetReadinessCheckStatusAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetReadinessCheckStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetReadinessCheckStatus page. @@ -204,7 +205,10 @@ func (p *GetReadinessCheckStatusPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go b/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go index 9e377305487..e5113c9e505 100644 --- a/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go +++ b/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go @@ -174,12 +174,13 @@ func NewGetRecoveryGroupReadinessSummaryPaginator(client GetRecoveryGroupReadine client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetRecoveryGroupReadinessSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetRecoveryGroupReadinessSummary page. @@ -202,7 +203,10 @@ func (p *GetRecoveryGroupReadinessSummaryPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_ListCells.go b/service/route53recoveryreadiness/api_op_ListCells.go index 3295346e836..c010a0162ad 100644 --- a/service/route53recoveryreadiness/api_op_ListCells.go +++ b/service/route53recoveryreadiness/api_op_ListCells.go @@ -159,12 +159,13 @@ func NewListCellsPaginator(client ListCellsAPIClient, params *ListCellsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCellsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCells page. @@ -187,7 +188,10 @@ func (p *ListCellsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go b/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go index 31dd6a95f4a..10c5c6b34e4 100644 --- a/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go +++ b/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go @@ -162,12 +162,13 @@ func NewListCrossAccountAuthorizationsPaginator(client ListCrossAccountAuthoriza client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCrossAccountAuthorizationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCrossAccountAuthorizations page. @@ -190,7 +191,10 @@ func (p *ListCrossAccountAuthorizationsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_ListReadinessChecks.go b/service/route53recoveryreadiness/api_op_ListReadinessChecks.go index d4bd86dcce6..5b0073127d1 100644 --- a/service/route53recoveryreadiness/api_op_ListReadinessChecks.go +++ b/service/route53recoveryreadiness/api_op_ListReadinessChecks.go @@ -161,12 +161,13 @@ func NewListReadinessChecksPaginator(client ListReadinessChecksAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReadinessChecksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReadinessChecks page. @@ -189,7 +190,10 @@ func (p *ListReadinessChecksPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go b/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go index aa7ba969323..5915a9ea484 100644 --- a/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go +++ b/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go @@ -161,12 +161,13 @@ func NewListRecoveryGroupsPaginator(client ListRecoveryGroupsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRecoveryGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRecoveryGroups page. @@ -189,7 +190,10 @@ func (p *ListRecoveryGroupsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_ListResourceSets.go b/service/route53recoveryreadiness/api_op_ListResourceSets.go index 2208a4f28a3..ae3c7e94d55 100644 --- a/service/route53recoveryreadiness/api_op_ListResourceSets.go +++ b/service/route53recoveryreadiness/api_op_ListResourceSets.go @@ -160,12 +160,13 @@ func NewListResourceSetsPaginator(client ListResourceSetsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceSets page. @@ -188,7 +189,10 @@ func (p *ListResourceSetsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53recoveryreadiness/api_op_ListRules.go b/service/route53recoveryreadiness/api_op_ListRules.go index f2303795efe..f2662197b72 100644 --- a/service/route53recoveryreadiness/api_op_ListRules.go +++ b/service/route53recoveryreadiness/api_op_ListRules.go @@ -162,12 +162,13 @@ func NewListRulesPaginator(client ListRulesAPIClient, params *ListRulesInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRules page. @@ -190,7 +191,10 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListFirewallConfigs.go b/service/route53resolver/api_op_ListFirewallConfigs.go index 97d97c5264e..b29c7ce5568 100644 --- a/service/route53resolver/api_op_ListFirewallConfigs.go +++ b/service/route53resolver/api_op_ListFirewallConfigs.go @@ -177,12 +177,13 @@ func NewListFirewallConfigsPaginator(client ListFirewallConfigsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallConfigs page. @@ -209,7 +210,10 @@ func (p *ListFirewallConfigsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListFirewallDomainLists.go b/service/route53resolver/api_op_ListFirewallDomainLists.go index 18ee30e75de..e8fc04ad30e 100644 --- a/service/route53resolver/api_op_ListFirewallDomainLists.go +++ b/service/route53resolver/api_op_ListFirewallDomainLists.go @@ -178,12 +178,13 @@ func NewListFirewallDomainListsPaginator(client ListFirewallDomainListsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallDomainListsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallDomainLists page. @@ -210,7 +211,10 @@ func (p *ListFirewallDomainListsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListFirewallDomains.go b/service/route53resolver/api_op_ListFirewallDomains.go index 5cb8b5f9b6a..f7ef3ef2ef8 100644 --- a/service/route53resolver/api_op_ListFirewallDomains.go +++ b/service/route53resolver/api_op_ListFirewallDomains.go @@ -184,12 +184,13 @@ func NewListFirewallDomainsPaginator(client ListFirewallDomainsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallDomains page. @@ -216,7 +217,10 @@ func (p *ListFirewallDomainsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go b/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go index d7a5bf76c84..bf753e33102 100644 --- a/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go +++ b/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go @@ -197,12 +197,13 @@ func NewListFirewallRuleGroupAssociationsPaginator(client ListFirewallRuleGroupA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallRuleGroupAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallRuleGroupAssociations page. @@ -229,7 +230,10 @@ func (p *ListFirewallRuleGroupAssociationsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListFirewallRuleGroups.go b/service/route53resolver/api_op_ListFirewallRuleGroups.go index 96d02fad5b5..e8de8677b7f 100644 --- a/service/route53resolver/api_op_ListFirewallRuleGroups.go +++ b/service/route53resolver/api_op_ListFirewallRuleGroups.go @@ -176,12 +176,13 @@ func NewListFirewallRuleGroupsPaginator(client ListFirewallRuleGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallRuleGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallRuleGroups page. @@ -208,7 +209,10 @@ func (p *ListFirewallRuleGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListFirewallRules.go b/service/route53resolver/api_op_ListFirewallRules.go index bf9559bd500..890e5bef05f 100644 --- a/service/route53resolver/api_op_ListFirewallRules.go +++ b/service/route53resolver/api_op_ListFirewallRules.go @@ -205,12 +205,13 @@ func NewListFirewallRulesPaginator(client ListFirewallRulesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallRules page. @@ -237,7 +238,10 @@ func (p *ListFirewallRulesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverConfigs.go b/service/route53resolver/api_op_ListResolverConfigs.go index 4dfa0c4b515..7e42b2fadfc 100644 --- a/service/route53resolver/api_op_ListResolverConfigs.go +++ b/service/route53resolver/api_op_ListResolverConfigs.go @@ -177,12 +177,13 @@ func NewListResolverConfigsPaginator(client ListResolverConfigsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverConfigs page. @@ -209,7 +210,10 @@ func (p *ListResolverConfigsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverDnssecConfigs.go b/service/route53resolver/api_op_ListResolverDnssecConfigs.go index 1258f6063b1..f4cb7ead8af 100644 --- a/service/route53resolver/api_op_ListResolverDnssecConfigs.go +++ b/service/route53resolver/api_op_ListResolverDnssecConfigs.go @@ -183,12 +183,13 @@ func NewListResolverDnssecConfigsPaginator(client ListResolverDnssecConfigsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverDnssecConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverDnssecConfigs page. @@ -215,7 +216,10 @@ func (p *ListResolverDnssecConfigsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go b/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go index b3b4c5a0eca..9124131c9b6 100644 --- a/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go +++ b/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go @@ -187,12 +187,13 @@ func NewListResolverEndpointIpAddressesPaginator(client ListResolverEndpointIpAd client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverEndpointIpAddressesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverEndpointIpAddresses page. @@ -219,7 +220,10 @@ func (p *ListResolverEndpointIpAddressesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverEndpoints.go b/service/route53resolver/api_op_ListResolverEndpoints.go index f0de85304c3..7cda39f688a 100644 --- a/service/route53resolver/api_op_ListResolverEndpoints.go +++ b/service/route53resolver/api_op_ListResolverEndpoints.go @@ -181,12 +181,13 @@ func NewListResolverEndpointsPaginator(client ListResolverEndpointsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverEndpoints page. @@ -213,7 +214,10 @@ func (p *ListResolverEndpointsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go b/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go index 1842332ea6a..44c647dbcf3 100644 --- a/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go +++ b/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go @@ -258,12 +258,13 @@ func NewListResolverQueryLogConfigAssociationsPaginator(client ListResolverQuery client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverQueryLogConfigAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverQueryLogConfigAssociations page. @@ -290,7 +291,10 @@ func (p *ListResolverQueryLogConfigAssociationsPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverQueryLogConfigs.go b/service/route53resolver/api_op_ListResolverQueryLogConfigs.go index ed1d035848b..93e1f64a27e 100644 --- a/service/route53resolver/api_op_ListResolverQueryLogConfigs.go +++ b/service/route53resolver/api_op_ListResolverQueryLogConfigs.go @@ -261,12 +261,13 @@ func NewListResolverQueryLogConfigsPaginator(client ListResolverQueryLogConfigsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverQueryLogConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverQueryLogConfigs page. @@ -293,7 +294,10 @@ func (p *ListResolverQueryLogConfigsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverRuleAssociations.go b/service/route53resolver/api_op_ListResolverRuleAssociations.go index e7fcfd3c977..b856fa1e851 100644 --- a/service/route53resolver/api_op_ListResolverRuleAssociations.go +++ b/service/route53resolver/api_op_ListResolverRuleAssociations.go @@ -186,12 +186,13 @@ func NewListResolverRuleAssociationsPaginator(client ListResolverRuleAssociation client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverRuleAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverRuleAssociations page. @@ -218,7 +219,10 @@ func (p *ListResolverRuleAssociationsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListResolverRules.go b/service/route53resolver/api_op_ListResolverRules.go index 4e0c7a6d4ef..d0318808668 100644 --- a/service/route53resolver/api_op_ListResolverRules.go +++ b/service/route53resolver/api_op_ListResolverRules.go @@ -181,12 +181,13 @@ func NewListResolverRulesPaginator(client ListResolverRulesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResolverRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResolverRules page. @@ -213,7 +214,10 @@ func (p *ListResolverRulesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/route53resolver/api_op_ListTagsForResource.go b/service/route53resolver/api_op_ListTagsForResource.go index 85152a66c32..3ce25fda3a6 100644 --- a/service/route53resolver/api_op_ListTagsForResource.go +++ b/service/route53resolver/api_op_ListTagsForResource.go @@ -179,12 +179,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -211,7 +212,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rum/api_op_GetAppMonitorData.go b/service/rum/api_op_GetAppMonitorData.go index cb52b4c5c63..1f50fd8efb9 100644 --- a/service/rum/api_op_GetAppMonitorData.go +++ b/service/rum/api_op_GetAppMonitorData.go @@ -180,12 +180,13 @@ func NewGetAppMonitorDataPaginator(client GetAppMonitorDataAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetAppMonitorDataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetAppMonitorData page. @@ -208,7 +209,10 @@ func (p *GetAppMonitorDataPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/rum/api_op_ListAppMonitors.go b/service/rum/api_op_ListAppMonitors.go index 06420f3ef14..b29d51a3850 100644 --- a/service/rum/api_op_ListAppMonitors.go +++ b/service/rum/api_op_ListAppMonitors.go @@ -162,12 +162,13 @@ func NewListAppMonitorsPaginator(client ListAppMonitorsAPIClient, params *ListAp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppMonitorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppMonitors page. @@ -194,7 +195,10 @@ func (p *ListAppMonitorsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3/api_op_ListObjectsV2.go b/service/s3/api_op_ListObjectsV2.go index 3ebfee5ce25..6fcb7e35b0e 100644 --- a/service/s3/api_op_ListObjectsV2.go +++ b/service/s3/api_op_ListObjectsV2.go @@ -329,12 +329,13 @@ func NewListObjectsV2Paginator(client ListObjectsV2APIClient, params *ListObject client: client, params: params, firstPage: true, + nextToken: params.ContinuationToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListObjectsV2Paginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListObjectsV2 page. @@ -360,7 +361,10 @@ func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*O p.nextToken = result.NextContinuationToken } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3/api_op_ListParts.go b/service/s3/api_op_ListParts.go index 6e0df29ec98..f907683acd3 100644 --- a/service/s3/api_op_ListParts.go +++ b/service/s3/api_op_ListParts.go @@ -316,12 +316,13 @@ func NewListPartsPaginator(client ListPartsAPIClient, params *ListPartsInput, op client: client, params: params, firstPage: true, + nextToken: params.PartNumberMarker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPartsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListParts page. @@ -347,7 +348,10 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio p.nextToken = result.NextPartNumberMarker } - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3control/api_op_ListAccessPoints.go b/service/s3control/api_op_ListAccessPoints.go index 9d2f6db59de..689bde53647 100644 --- a/service/s3control/api_op_ListAccessPoints.go +++ b/service/s3control/api_op_ListAccessPoints.go @@ -267,12 +267,13 @@ func NewListAccessPointsPaginator(client ListAccessPointsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessPointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessPoints page. @@ -295,7 +296,10 @@ func (p *ListAccessPointsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3control/api_op_ListAccessPointsForObjectLambda.go b/service/s3control/api_op_ListAccessPointsForObjectLambda.go index e8efbd5fec5..67446517122 100644 --- a/service/s3control/api_op_ListAccessPointsForObjectLambda.go +++ b/service/s3control/api_op_ListAccessPointsForObjectLambda.go @@ -251,12 +251,13 @@ func NewListAccessPointsForObjectLambdaPaginator(client ListAccessPointsForObjec client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessPointsForObjectLambdaPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessPointsForObjectLambda page. @@ -279,7 +280,10 @@ func (p *ListAccessPointsForObjectLambdaPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3control/api_op_ListJobs.go b/service/s3control/api_op_ListJobs.go index 91f20d8415c..7373e6382e2 100644 --- a/service/s3control/api_op_ListJobs.go +++ b/service/s3control/api_op_ListJobs.go @@ -253,12 +253,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -281,7 +282,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3control/api_op_ListMultiRegionAccessPoints.go b/service/s3control/api_op_ListMultiRegionAccessPoints.go index 4707615ea91..b3711ada8a9 100644 --- a/service/s3control/api_op_ListMultiRegionAccessPoints.go +++ b/service/s3control/api_op_ListMultiRegionAccessPoints.go @@ -255,12 +255,13 @@ func NewListMultiRegionAccessPointsPaginator(client ListMultiRegionAccessPointsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMultiRegionAccessPointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMultiRegionAccessPoints page. @@ -283,7 +284,10 @@ func (p *ListMultiRegionAccessPointsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3control/api_op_ListRegionalBuckets.go b/service/s3control/api_op_ListRegionalBuckets.go index 6f7510480db..b7155dd42b9 100644 --- a/service/s3control/api_op_ListRegionalBuckets.go +++ b/service/s3control/api_op_ListRegionalBuckets.go @@ -235,12 +235,13 @@ func NewListRegionalBucketsPaginator(client ListRegionalBucketsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRegionalBucketsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRegionalBuckets page. @@ -263,7 +264,10 @@ func (p *ListRegionalBucketsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3control/api_op_ListStorageLensConfigurations.go b/service/s3control/api_op_ListStorageLensConfigurations.go index deeaf0ca4b7..09042168209 100644 --- a/service/s3control/api_op_ListStorageLensConfigurations.go +++ b/service/s3control/api_op_ListStorageLensConfigurations.go @@ -225,12 +225,13 @@ func NewListStorageLensConfigurationsPaginator(client ListStorageLensConfigurati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStorageLensConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStorageLensConfigurations page. @@ -251,7 +252,10 @@ func (p *ListStorageLensConfigurationsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/s3outposts/api_op_ListEndpoints.go b/service/s3outposts/api_op_ListEndpoints.go index 2efcb079bfc..dd321fb79af 100644 --- a/service/s3outposts/api_op_ListEndpoints.go +++ b/service/s3outposts/api_op_ListEndpoints.go @@ -173,12 +173,13 @@ func NewListEndpointsPaginator(client ListEndpointsAPIClient, params *ListEndpoi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEndpoints page. @@ -201,7 +202,10 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListActions.go b/service/sagemaker/api_op_ListActions.go index b1598d1d8fe..96cb3cb5848 100644 --- a/service/sagemaker/api_op_ListActions.go +++ b/service/sagemaker/api_op_ListActions.go @@ -181,12 +181,13 @@ func NewListActionsPaginator(client ListActionsAPIClient, params *ListActionsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActions page. @@ -213,7 +214,10 @@ func (p *ListActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListAlgorithms.go b/service/sagemaker/api_op_ListAlgorithms.go index 2e62f0f0fc6..af9e58636d8 100644 --- a/service/sagemaker/api_op_ListAlgorithms.go +++ b/service/sagemaker/api_op_ListAlgorithms.go @@ -184,12 +184,13 @@ func NewListAlgorithmsPaginator(client ListAlgorithmsAPIClient, params *ListAlgo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAlgorithmsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAlgorithms page. @@ -216,7 +217,10 @@ func (p *ListAlgorithmsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListAppImageConfigs.go b/service/sagemaker/api_op_ListAppImageConfigs.go index 6fb060130d3..4eb9322ce15 100644 --- a/service/sagemaker/api_op_ListAppImageConfigs.go +++ b/service/sagemaker/api_op_ListAppImageConfigs.go @@ -194,12 +194,13 @@ func NewListAppImageConfigsPaginator(client ListAppImageConfigsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppImageConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAppImageConfigs page. @@ -226,7 +227,10 @@ func (p *ListAppImageConfigsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListApps.go b/service/sagemaker/api_op_ListApps.go index 7750ffa0635..3c3abae07d5 100644 --- a/service/sagemaker/api_op_ListApps.go +++ b/service/sagemaker/api_op_ListApps.go @@ -173,12 +173,13 @@ func NewListAppsPaginator(client ListAppsAPIClient, params *ListAppsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAppsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApps page. @@ -205,7 +206,10 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListArtifacts.go b/service/sagemaker/api_op_ListArtifacts.go index 6796775596c..b6f27c1568f 100644 --- a/service/sagemaker/api_op_ListArtifacts.go +++ b/service/sagemaker/api_op_ListArtifacts.go @@ -181,12 +181,13 @@ func NewListArtifactsPaginator(client ListArtifactsAPIClient, params *ListArtifa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListArtifactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListArtifacts page. @@ -213,7 +214,10 @@ func (p *ListArtifactsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListAssociations.go b/service/sagemaker/api_op_ListAssociations.go index 6d47fdad5d1..cf2171bca54 100644 --- a/service/sagemaker/api_op_ListAssociations.go +++ b/service/sagemaker/api_op_ListAssociations.go @@ -192,12 +192,13 @@ func NewListAssociationsPaginator(client ListAssociationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociations page. @@ -224,7 +225,10 @@ func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListAutoMLJobs.go b/service/sagemaker/api_op_ListAutoMLJobs.go index 2f601a8286d..97a7c5485a1 100644 --- a/service/sagemaker/api_op_ListAutoMLJobs.go +++ b/service/sagemaker/api_op_ListAutoMLJobs.go @@ -189,12 +189,13 @@ func NewListAutoMLJobsPaginator(client ListAutoMLJobsAPIClient, params *ListAuto client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAutoMLJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAutoMLJobs page. @@ -217,7 +218,10 @@ func (p *ListAutoMLJobsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go b/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go index 0fd94819072..a54d08eb28c 100644 --- a/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go +++ b/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go @@ -187,12 +187,13 @@ func NewListCandidatesForAutoMLJobPaginator(client ListCandidatesForAutoMLJobAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCandidatesForAutoMLJobPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCandidatesForAutoMLJob page. @@ -215,7 +216,10 @@ func (p *ListCandidatesForAutoMLJobPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListCodeRepositories.go b/service/sagemaker/api_op_ListCodeRepositories.go index a70871dbf08..481aa83c6fb 100644 --- a/service/sagemaker/api_op_ListCodeRepositories.go +++ b/service/sagemaker/api_op_ListCodeRepositories.go @@ -208,12 +208,13 @@ func NewListCodeRepositoriesPaginator(client ListCodeRepositoriesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCodeRepositoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCodeRepositories page. @@ -240,7 +241,10 @@ func (p *ListCodeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListCompilationJobs.go b/service/sagemaker/api_op_ListCompilationJobs.go index 0a8e375ea89..29eb63a4eda 100644 --- a/service/sagemaker/api_op_ListCompilationJobs.go +++ b/service/sagemaker/api_op_ListCompilationJobs.go @@ -201,12 +201,13 @@ func NewListCompilationJobsPaginator(client ListCompilationJobsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCompilationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCompilationJobs page. @@ -233,7 +234,10 @@ func (p *ListCompilationJobsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListContexts.go b/service/sagemaker/api_op_ListContexts.go index e7ed47e6205..ab07baf081a 100644 --- a/service/sagemaker/api_op_ListContexts.go +++ b/service/sagemaker/api_op_ListContexts.go @@ -181,12 +181,13 @@ func NewListContextsPaginator(client ListContextsAPIClient, params *ListContexts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContextsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContexts page. @@ -213,7 +214,10 @@ func (p *ListContextsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListDataQualityJobDefinitions.go b/service/sagemaker/api_op_ListDataQualityJobDefinitions.go index 92cba09da7d..d4e6e6dd423 100644 --- a/service/sagemaker/api_op_ListDataQualityJobDefinitions.go +++ b/service/sagemaker/api_op_ListDataQualityJobDefinitions.go @@ -195,12 +195,13 @@ func NewListDataQualityJobDefinitionsPaginator(client ListDataQualityJobDefiniti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataQualityJobDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataQualityJobDefinitions page. @@ -227,7 +228,10 @@ func (p *ListDataQualityJobDefinitionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListDeviceFleets.go b/service/sagemaker/api_op_ListDeviceFleets.go index 6564e494844..cda1af036a7 100644 --- a/service/sagemaker/api_op_ListDeviceFleets.go +++ b/service/sagemaker/api_op_ListDeviceFleets.go @@ -186,12 +186,13 @@ func NewListDeviceFleetsPaginator(client ListDeviceFleetsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeviceFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeviceFleets page. @@ -214,7 +215,10 @@ func (p *ListDeviceFleetsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListDevices.go b/service/sagemaker/api_op_ListDevices.go index b1586a5f9ba..2b8d659904d 100644 --- a/service/sagemaker/api_op_ListDevices.go +++ b/service/sagemaker/api_op_ListDevices.go @@ -173,12 +173,13 @@ func NewListDevicesPaginator(client ListDevicesAPIClient, params *ListDevicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevices page. @@ -201,7 +202,10 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListDomains.go b/service/sagemaker/api_op_ListDomains.go index b85fdbd5696..a26b344b0e7 100644 --- a/service/sagemaker/api_op_ListDomains.go +++ b/service/sagemaker/api_op_ListDomains.go @@ -161,12 +161,13 @@ func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomains page. @@ -193,7 +194,10 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListEdgePackagingJobs.go b/service/sagemaker/api_op_ListEdgePackagingJobs.go index 6bf8840e9b9..23b4b4eb740 100644 --- a/service/sagemaker/api_op_ListEdgePackagingJobs.go +++ b/service/sagemaker/api_op_ListEdgePackagingJobs.go @@ -192,12 +192,13 @@ func NewListEdgePackagingJobsPaginator(client ListEdgePackagingJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEdgePackagingJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEdgePackagingJobs page. @@ -220,7 +221,10 @@ func (p *ListEdgePackagingJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListEndpointConfigs.go b/service/sagemaker/api_op_ListEndpointConfigs.go index 8222a0787fc..25337a66495 100644 --- a/service/sagemaker/api_op_ListEndpointConfigs.go +++ b/service/sagemaker/api_op_ListEndpointConfigs.go @@ -185,12 +185,13 @@ func NewListEndpointConfigsPaginator(client ListEndpointConfigsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEndpointConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEndpointConfigs page. @@ -217,7 +218,10 @@ func (p *ListEndpointConfigsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListEndpoints.go b/service/sagemaker/api_op_ListEndpoints.go index b3b65524686..e8be21ba40f 100644 --- a/service/sagemaker/api_op_ListEndpoints.go +++ b/service/sagemaker/api_op_ListEndpoints.go @@ -196,12 +196,13 @@ func NewListEndpointsPaginator(client ListEndpointsAPIClient, params *ListEndpoi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEndpointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEndpoints page. @@ -228,7 +229,10 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListExperiments.go b/service/sagemaker/api_op_ListExperiments.go index 05a842966c7..ef43ee9d29d 100644 --- a/service/sagemaker/api_op_ListExperiments.go +++ b/service/sagemaker/api_op_ListExperiments.go @@ -178,12 +178,13 @@ func NewListExperimentsPaginator(client ListExperimentsAPIClient, params *ListEx client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperimentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperiments page. @@ -210,7 +211,10 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListFlowDefinitions.go b/service/sagemaker/api_op_ListFlowDefinitions.go index 9a6a3b25347..63b2f701bd1 100644 --- a/service/sagemaker/api_op_ListFlowDefinitions.go +++ b/service/sagemaker/api_op_ListFlowDefinitions.go @@ -180,12 +180,13 @@ func NewListFlowDefinitionsPaginator(client ListFlowDefinitionsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFlowDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFlowDefinitions page. @@ -212,7 +213,10 @@ func (p *ListFlowDefinitionsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListHumanTaskUis.go b/service/sagemaker/api_op_ListHumanTaskUis.go index c735d8c3e1a..378d3896cc5 100644 --- a/service/sagemaker/api_op_ListHumanTaskUis.go +++ b/service/sagemaker/api_op_ListHumanTaskUis.go @@ -179,12 +179,13 @@ func NewListHumanTaskUisPaginator(client ListHumanTaskUisAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHumanTaskUisPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHumanTaskUis page. @@ -211,7 +212,10 @@ func (p *ListHumanTaskUisPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListHyperParameterTuningJobs.go b/service/sagemaker/api_op_ListHyperParameterTuningJobs.go index b019bad8163..513bbbcebeb 100644 --- a/service/sagemaker/api_op_ListHyperParameterTuningJobs.go +++ b/service/sagemaker/api_op_ListHyperParameterTuningJobs.go @@ -201,12 +201,13 @@ func NewListHyperParameterTuningJobsPaginator(client ListHyperParameterTuningJob client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHyperParameterTuningJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHyperParameterTuningJobs page. @@ -233,7 +234,10 @@ func (p *ListHyperParameterTuningJobsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListImageVersions.go b/service/sagemaker/api_op_ListImageVersions.go index f2fd076dc0c..8f55a65bbdc 100644 --- a/service/sagemaker/api_op_ListImageVersions.go +++ b/service/sagemaker/api_op_ListImageVersions.go @@ -191,12 +191,13 @@ func NewListImageVersionsPaginator(client ListImageVersionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImageVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImageVersions page. @@ -223,7 +224,10 @@ func (p *ListImageVersionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListImages.go b/service/sagemaker/api_op_ListImages.go index 9237f6137a0..d2830ffa517 100644 --- a/service/sagemaker/api_op_ListImages.go +++ b/service/sagemaker/api_op_ListImages.go @@ -184,12 +184,13 @@ func NewListImagesPaginator(client ListImagesAPIClient, params *ListImagesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImages page. @@ -216,7 +217,10 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go b/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go index e12076d3b12..b00f8d04212 100644 --- a/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go +++ b/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go @@ -196,12 +196,13 @@ func NewListInferenceRecommendationsJobsPaginator(client ListInferenceRecommenda client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInferenceRecommendationsJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInferenceRecommendationsJobs page. @@ -228,7 +229,10 @@ func (p *ListInferenceRecommendationsJobsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListLabelingJobs.go b/service/sagemaker/api_op_ListLabelingJobs.go index 4dff8b649ee..a205f5a3526 100644 --- a/service/sagemaker/api_op_ListLabelingJobs.go +++ b/service/sagemaker/api_op_ListLabelingJobs.go @@ -193,12 +193,13 @@ func NewListLabelingJobsPaginator(client ListLabelingJobsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLabelingJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLabelingJobs page. @@ -225,7 +226,10 @@ func (p *ListLabelingJobsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go b/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go index 4b2edc9d651..585573560e7 100644 --- a/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go +++ b/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go @@ -196,12 +196,13 @@ func NewListLabelingJobsForWorkteamPaginator(client ListLabelingJobsForWorkteamA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLabelingJobsForWorkteamPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLabelingJobsForWorkteam page. @@ -228,7 +229,10 @@ func (p *ListLabelingJobsForWorkteamPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListLineageGroups.go b/service/sagemaker/api_op_ListLineageGroups.go index 84c284a6f08..4cd1667dd51 100644 --- a/service/sagemaker/api_op_ListLineageGroups.go +++ b/service/sagemaker/api_op_ListLineageGroups.go @@ -182,12 +182,13 @@ func NewListLineageGroupsPaginator(client ListLineageGroupsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLineageGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLineageGroups page. @@ -214,7 +215,10 @@ func (p *ListLineageGroupsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModelBiasJobDefinitions.go b/service/sagemaker/api_op_ListModelBiasJobDefinitions.go index 4ce3afd3681..8877a11493e 100644 --- a/service/sagemaker/api_op_ListModelBiasJobDefinitions.go +++ b/service/sagemaker/api_op_ListModelBiasJobDefinitions.go @@ -190,12 +190,13 @@ func NewListModelBiasJobDefinitionsPaginator(client ListModelBiasJobDefinitionsA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelBiasJobDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModelBiasJobDefinitions page. @@ -222,7 +223,10 @@ func (p *ListModelBiasJobDefinitionsPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go b/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go index 40334868046..40221afea8a 100644 --- a/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go +++ b/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go @@ -190,12 +190,13 @@ func NewListModelExplainabilityJobDefinitionsPaginator(client ListModelExplainab client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelExplainabilityJobDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModelExplainabilityJobDefinitions page. @@ -222,7 +223,10 @@ func (p *ListModelExplainabilityJobDefinitionsPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModelMetadata.go b/service/sagemaker/api_op_ListModelMetadata.go index 84c0fe87660..ffcb1588d09 100644 --- a/service/sagemaker/api_op_ListModelMetadata.go +++ b/service/sagemaker/api_op_ListModelMetadata.go @@ -174,12 +174,13 @@ func NewListModelMetadataPaginator(client ListModelMetadataAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelMetadataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModelMetadata page. @@ -206,7 +207,10 @@ func (p *ListModelMetadataPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModelPackageGroups.go b/service/sagemaker/api_op_ListModelPackageGroups.go index bfcc6bb8a46..93f52ef050f 100644 --- a/service/sagemaker/api_op_ListModelPackageGroups.go +++ b/service/sagemaker/api_op_ListModelPackageGroups.go @@ -183,12 +183,13 @@ func NewListModelPackageGroupsPaginator(client ListModelPackageGroupsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelPackageGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModelPackageGroups page. @@ -215,7 +216,10 @@ func (p *ListModelPackageGroupsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModelPackages.go b/service/sagemaker/api_op_ListModelPackages.go index 397f1d98651..230b372c0b8 100644 --- a/service/sagemaker/api_op_ListModelPackages.go +++ b/service/sagemaker/api_op_ListModelPackages.go @@ -204,12 +204,13 @@ func NewListModelPackagesPaginator(client ListModelPackagesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelPackagesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModelPackages page. @@ -236,7 +237,10 @@ func (p *ListModelPackagesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModelQualityJobDefinitions.go b/service/sagemaker/api_op_ListModelQualityJobDefinitions.go index b508c56a060..15ef27e44a1 100644 --- a/service/sagemaker/api_op_ListModelQualityJobDefinitions.go +++ b/service/sagemaker/api_op_ListModelQualityJobDefinitions.go @@ -194,12 +194,13 @@ func NewListModelQualityJobDefinitionsPaginator(client ListModelQualityJobDefini client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelQualityJobDefinitionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModelQualityJobDefinitions page. @@ -226,7 +227,10 @@ func (p *ListModelQualityJobDefinitionsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListModels.go b/service/sagemaker/api_op_ListModels.go index 84be0370c8e..03cbe2a8372 100644 --- a/service/sagemaker/api_op_ListModels.go +++ b/service/sagemaker/api_op_ListModels.go @@ -182,12 +182,13 @@ func NewListModelsPaginator(client ListModelsAPIClient, params *ListModelsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListModels page. @@ -214,7 +215,10 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListMonitoringExecutions.go b/service/sagemaker/api_op_ListMonitoringExecutions.go index 2ed0b50013a..a3ce989f000 100644 --- a/service/sagemaker/api_op_ListMonitoringExecutions.go +++ b/service/sagemaker/api_op_ListMonitoringExecutions.go @@ -210,12 +210,13 @@ func NewListMonitoringExecutionsPaginator(client ListMonitoringExecutionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMonitoringExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMonitoringExecutions page. @@ -242,7 +243,10 @@ func (p *ListMonitoringExecutionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListMonitoringSchedules.go b/service/sagemaker/api_op_ListMonitoringSchedules.go index c7134c42f1e..820e0b3be58 100644 --- a/service/sagemaker/api_op_ListMonitoringSchedules.go +++ b/service/sagemaker/api_op_ListMonitoringSchedules.go @@ -206,12 +206,13 @@ func NewListMonitoringSchedulesPaginator(client ListMonitoringSchedulesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMonitoringSchedulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMonitoringSchedules page. @@ -238,7 +239,10 @@ func (p *ListMonitoringSchedulesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go b/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go index 236fd42313d..8a1778b3d61 100644 --- a/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go +++ b/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go @@ -195,12 +195,13 @@ func NewListNotebookInstanceLifecycleConfigsPaginator(client ListNotebookInstanc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotebookInstanceLifecycleConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotebookInstanceLifecycleConfigs page. @@ -227,7 +228,10 @@ func (p *ListNotebookInstanceLifecycleConfigsPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListNotebookInstances.go b/service/sagemaker/api_op_ListNotebookInstances.go index 84a1cde45d6..48743ba23cf 100644 --- a/service/sagemaker/api_op_ListNotebookInstances.go +++ b/service/sagemaker/api_op_ListNotebookInstances.go @@ -214,12 +214,13 @@ func NewListNotebookInstancesPaginator(client ListNotebookInstancesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotebookInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotebookInstances page. @@ -246,7 +247,10 @@ func (p *ListNotebookInstancesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListPipelineExecutionSteps.go b/service/sagemaker/api_op_ListPipelineExecutionSteps.go index 4fca17c61e8..299abbf5c8e 100644 --- a/service/sagemaker/api_op_ListPipelineExecutionSteps.go +++ b/service/sagemaker/api_op_ListPipelineExecutionSteps.go @@ -176,12 +176,13 @@ func NewListPipelineExecutionStepsPaginator(client ListPipelineExecutionStepsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelineExecutionStepsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelineExecutionSteps page. @@ -208,7 +209,10 @@ func (p *ListPipelineExecutionStepsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListPipelineExecutions.go b/service/sagemaker/api_op_ListPipelineExecutions.go index 53706a250da..0c6b630e24d 100644 --- a/service/sagemaker/api_op_ListPipelineExecutions.go +++ b/service/sagemaker/api_op_ListPipelineExecutions.go @@ -190,12 +190,13 @@ func NewListPipelineExecutionsPaginator(client ListPipelineExecutionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelineExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelineExecutions page. @@ -222,7 +223,10 @@ func (p *ListPipelineExecutionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListPipelineParametersForExecution.go b/service/sagemaker/api_op_ListPipelineParametersForExecution.go index b752a7b4ef6..65ac490c43f 100644 --- a/service/sagemaker/api_op_ListPipelineParametersForExecution.go +++ b/service/sagemaker/api_op_ListPipelineParametersForExecution.go @@ -175,12 +175,13 @@ func NewListPipelineParametersForExecutionPaginator(client ListPipelineParameter client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelineParametersForExecutionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelineParametersForExecution page. @@ -207,7 +208,10 @@ func (p *ListPipelineParametersForExecutionPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListPipelines.go b/service/sagemaker/api_op_ListPipelines.go index c72e1c8f917..9dee4f44fd3 100644 --- a/service/sagemaker/api_op_ListPipelines.go +++ b/service/sagemaker/api_op_ListPipelines.go @@ -182,12 +182,13 @@ func NewListPipelinesPaginator(client ListPipelinesAPIClient, params *ListPipeli client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPipelinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPipelines page. @@ -214,7 +215,10 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListProcessingJobs.go b/service/sagemaker/api_op_ListProcessingJobs.go index a2b97dfecd1..9a70f7943c5 100644 --- a/service/sagemaker/api_op_ListProcessingJobs.go +++ b/service/sagemaker/api_op_ListProcessingJobs.go @@ -192,12 +192,13 @@ func NewListProcessingJobsPaginator(client ListProcessingJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProcessingJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProcessingJobs page. @@ -224,7 +225,10 @@ func (p *ListProcessingJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListProjects.go b/service/sagemaker/api_op_ListProjects.go index 14ddb9caefd..15a961e612e 100644 --- a/service/sagemaker/api_op_ListProjects.go +++ b/service/sagemaker/api_op_ListProjects.go @@ -181,12 +181,13 @@ func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjects client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProjectsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProjects page. @@ -213,7 +214,10 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListStudioLifecycleConfigs.go b/service/sagemaker/api_op_ListStudioLifecycleConfigs.go index e80ef5dde2e..5cbf604d1fb 100644 --- a/service/sagemaker/api_op_ListStudioLifecycleConfigs.go +++ b/service/sagemaker/api_op_ListStudioLifecycleConfigs.go @@ -198,12 +198,13 @@ func NewListStudioLifecycleConfigsPaginator(client ListStudioLifecycleConfigsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStudioLifecycleConfigsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStudioLifecycleConfigs page. @@ -230,7 +231,10 @@ func (p *ListStudioLifecycleConfigsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListSubscribedWorkteams.go b/service/sagemaker/api_op_ListSubscribedWorkteams.go index 9d22ec025ba..81f215209c6 100644 --- a/service/sagemaker/api_op_ListSubscribedWorkteams.go +++ b/service/sagemaker/api_op_ListSubscribedWorkteams.go @@ -173,12 +173,13 @@ func NewListSubscribedWorkteamsPaginator(client ListSubscribedWorkteamsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSubscribedWorkteamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSubscribedWorkteams page. @@ -205,7 +206,10 @@ func (p *ListSubscribedWorkteamsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListTags.go b/service/sagemaker/api_op_ListTags.go index 1d186bef745..a767bb4fb59 100644 --- a/service/sagemaker/api_op_ListTags.go +++ b/service/sagemaker/api_op_ListTags.go @@ -170,12 +170,13 @@ func NewListTagsPaginator(client ListTagsAPIClient, params *ListTagsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTags page. @@ -202,7 +203,10 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListTrainingJobs.go b/service/sagemaker/api_op_ListTrainingJobs.go index ff6d517df53..30f103fc920 100644 --- a/service/sagemaker/api_op_ListTrainingJobs.go +++ b/service/sagemaker/api_op_ListTrainingJobs.go @@ -204,12 +204,13 @@ func NewListTrainingJobsPaginator(client ListTrainingJobsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrainingJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrainingJobs page. @@ -236,7 +237,10 @@ func (p *ListTrainingJobsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go b/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go index ab900c0645a..e79715d5ec3 100644 --- a/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go +++ b/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go @@ -190,12 +190,13 @@ func NewListTrainingJobsForHyperParameterTuningJobPaginator(client ListTrainingJ client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrainingJobsForHyperParameterTuningJobPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrainingJobsForHyperParameterTuningJob page. @@ -222,7 +223,10 @@ func (p *ListTrainingJobsForHyperParameterTuningJobPaginator) NextPage(ctx conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListTransformJobs.go b/service/sagemaker/api_op_ListTransformJobs.go index 793941dc3f5..aab82de07c0 100644 --- a/service/sagemaker/api_op_ListTransformJobs.go +++ b/service/sagemaker/api_op_ListTransformJobs.go @@ -193,12 +193,13 @@ func NewListTransformJobsPaginator(client ListTransformJobsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTransformJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTransformJobs page. @@ -225,7 +226,10 @@ func (p *ListTransformJobsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListTrialComponents.go b/service/sagemaker/api_op_ListTrialComponents.go index a118753465f..e155f12aa5c 100644 --- a/service/sagemaker/api_op_ListTrialComponents.go +++ b/service/sagemaker/api_op_ListTrialComponents.go @@ -199,12 +199,13 @@ func NewListTrialComponentsPaginator(client ListTrialComponentsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrialComponentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrialComponents page. @@ -231,7 +232,10 @@ func (p *ListTrialComponentsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListTrials.go b/service/sagemaker/api_op_ListTrials.go index 22b3ac0d6b7..5a8a7a3c33e 100644 --- a/service/sagemaker/api_op_ListTrials.go +++ b/service/sagemaker/api_op_ListTrials.go @@ -184,12 +184,13 @@ func NewListTrialsPaginator(client ListTrialsAPIClient, params *ListTrialsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrialsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrials page. @@ -216,7 +217,10 @@ func (p *ListTrialsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListUserProfiles.go b/service/sagemaker/api_op_ListUserProfiles.go index f53052b1d0b..1bbf42ec552 100644 --- a/service/sagemaker/api_op_ListUserProfiles.go +++ b/service/sagemaker/api_op_ListUserProfiles.go @@ -174,12 +174,13 @@ func NewListUserProfilesPaginator(client ListUserProfilesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserProfiles page. @@ -206,7 +207,10 @@ func (p *ListUserProfilesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListWorkforces.go b/service/sagemaker/api_op_ListWorkforces.go index 7222cfa890d..b4bf6bd4025 100644 --- a/service/sagemaker/api_op_ListWorkforces.go +++ b/service/sagemaker/api_op_ListWorkforces.go @@ -173,12 +173,13 @@ func NewListWorkforcesPaginator(client ListWorkforcesAPIClient, params *ListWork client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkforcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkforces page. @@ -205,7 +206,10 @@ func (p *ListWorkforcesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_ListWorkteams.go b/service/sagemaker/api_op_ListWorkteams.go index 2ab64ce07c9..197450625b3 100644 --- a/service/sagemaker/api_op_ListWorkteams.go +++ b/service/sagemaker/api_op_ListWorkteams.go @@ -176,12 +176,13 @@ func NewListWorkteamsPaginator(client ListWorkteamsAPIClient, params *ListWorkte client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkteamsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkteams page. @@ -208,7 +209,10 @@ func (p *ListWorkteamsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_QueryLineage.go b/service/sagemaker/api_op_QueryLineage.go index d74e0ba4454..75f7ad98683 100644 --- a/service/sagemaker/api_op_QueryLineage.go +++ b/service/sagemaker/api_op_QueryLineage.go @@ -212,12 +212,13 @@ func NewQueryLineagePaginator(client QueryLineageAPIClient, params *QueryLineage client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *QueryLineagePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next QueryLineage page. @@ -244,7 +245,10 @@ func (p *QueryLineagePaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemaker/api_op_Search.go b/service/sagemaker/api_op_Search.go index 84afdbf6b76..9344e69b671 100644 --- a/service/sagemaker/api_op_Search.go +++ b/service/sagemaker/api_op_Search.go @@ -189,12 +189,13 @@ func NewSearchPaginator(client SearchAPIClient, params *SearchInput, optFns ...f client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next Search page. @@ -221,7 +222,10 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sagemakera2iruntime/api_op_ListHumanLoops.go b/service/sagemakera2iruntime/api_op_ListHumanLoops.go index 515acc7f713..bfcdd8e9355 100644 --- a/service/sagemakera2iruntime/api_op_ListHumanLoops.go +++ b/service/sagemakera2iruntime/api_op_ListHumanLoops.go @@ -188,12 +188,13 @@ func NewListHumanLoopsPaginator(client ListHumanLoopsAPIClient, params *ListHuma client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListHumanLoopsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListHumanLoops page. @@ -216,7 +217,10 @@ func (p *ListHumanLoopsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/schemas/api_op_ListDiscoverers.go b/service/schemas/api_op_ListDiscoverers.go index c12f2a6949b..a20595e1dd7 100644 --- a/service/schemas/api_op_ListDiscoverers.go +++ b/service/schemas/api_op_ListDiscoverers.go @@ -170,12 +170,13 @@ func NewListDiscoverersPaginator(client ListDiscoverersAPIClient, params *ListDi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDiscoverersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDiscoverers page. @@ -198,7 +199,10 @@ func (p *ListDiscoverersPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/schemas/api_op_ListRegistries.go b/service/schemas/api_op_ListRegistries.go index 3527edd443c..2405e05d6ac 100644 --- a/service/schemas/api_op_ListRegistries.go +++ b/service/schemas/api_op_ListRegistries.go @@ -169,12 +169,13 @@ func NewListRegistriesPaginator(client ListRegistriesAPIClient, params *ListRegi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRegistriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRegistries page. @@ -197,7 +198,10 @@ func (p *ListRegistriesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/schemas/api_op_ListSchemaVersions.go b/service/schemas/api_op_ListSchemaVersions.go index f0c693d82fd..b84ef25ba5e 100644 --- a/service/schemas/api_op_ListSchemaVersions.go +++ b/service/schemas/api_op_ListSchemaVersions.go @@ -176,12 +176,13 @@ func NewListSchemaVersionsPaginator(client ListSchemaVersionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchemaVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchemaVersions page. @@ -204,7 +205,10 @@ func (p *ListSchemaVersionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/schemas/api_op_ListSchemas.go b/service/schemas/api_op_ListSchemas.go index 34bbc91f9ad..2c1e026d57d 100644 --- a/service/schemas/api_op_ListSchemas.go +++ b/service/schemas/api_op_ListSchemas.go @@ -173,12 +173,13 @@ func NewListSchemasPaginator(client ListSchemasAPIClient, params *ListSchemasInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSchemasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSchemas page. @@ -201,7 +202,10 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/schemas/api_op_SearchSchemas.go b/service/schemas/api_op_SearchSchemas.go index c751a286928..b372c0eb43e 100644 --- a/service/schemas/api_op_SearchSchemas.go +++ b/service/schemas/api_op_SearchSchemas.go @@ -175,12 +175,13 @@ func NewSearchSchemasPaginator(client SearchSchemasAPIClient, params *SearchSche client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchSchemasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchSchemas page. @@ -203,7 +204,10 @@ func (p *SearchSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/secretsmanager/api_op_ListSecretVersionIds.go b/service/secretsmanager/api_op_ListSecretVersionIds.go index fe2eb0c7443..a2c27d32859 100644 --- a/service/secretsmanager/api_op_ListSecretVersionIds.go +++ b/service/secretsmanager/api_op_ListSecretVersionIds.go @@ -229,12 +229,13 @@ func NewListSecretVersionIdsPaginator(client ListSecretVersionIdsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecretVersionIdsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecretVersionIds page. @@ -257,7 +258,10 @@ func (p *ListSecretVersionIdsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/secretsmanager/api_op_ListSecrets.go b/service/secretsmanager/api_op_ListSecrets.go index e10f9b194a9..4e390399a2d 100644 --- a/service/secretsmanager/api_op_ListSecrets.go +++ b/service/secretsmanager/api_op_ListSecrets.go @@ -207,12 +207,13 @@ func NewListSecretsPaginator(client ListSecretsAPIClient, params *ListSecretsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecretsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecrets page. @@ -235,7 +236,10 @@ func (p *ListSecretsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_DescribeActionTargets.go b/service/securityhub/api_op_DescribeActionTargets.go index 44d79b4fa6f..d4c2edc4172 100644 --- a/service/securityhub/api_op_DescribeActionTargets.go +++ b/service/securityhub/api_op_DescribeActionTargets.go @@ -170,12 +170,13 @@ func NewDescribeActionTargetsPaginator(client DescribeActionTargetsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeActionTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeActionTargets page. @@ -198,7 +199,10 @@ func (p *DescribeActionTargetsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_DescribeProducts.go b/service/securityhub/api_op_DescribeProducts.go index 6f1a202930c..6b3108563b6 100644 --- a/service/securityhub/api_op_DescribeProducts.go +++ b/service/securityhub/api_op_DescribeProducts.go @@ -171,12 +171,13 @@ func NewDescribeProductsPaginator(client DescribeProductsAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeProductsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeProducts page. @@ -199,7 +200,10 @@ func (p *DescribeProductsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_DescribeStandards.go b/service/securityhub/api_op_DescribeStandards.go index 18fc0a61d6f..8f2e2c4f956 100644 --- a/service/securityhub/api_op_DescribeStandards.go +++ b/service/securityhub/api_op_DescribeStandards.go @@ -164,12 +164,13 @@ func NewDescribeStandardsPaginator(client DescribeStandardsAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStandardsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStandards page. @@ -192,7 +193,10 @@ func (p *DescribeStandardsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_DescribeStandardsControls.go b/service/securityhub/api_op_DescribeStandardsControls.go index ff3cefa803d..ab28929e6dd 100644 --- a/service/securityhub/api_op_DescribeStandardsControls.go +++ b/service/securityhub/api_op_DescribeStandardsControls.go @@ -177,12 +177,13 @@ func NewDescribeStandardsControlsPaginator(client DescribeStandardsControlsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeStandardsControlsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeStandardsControls page. @@ -205,7 +206,10 @@ func (p *DescribeStandardsControlsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_GetEnabledStandards.go b/service/securityhub/api_op_GetEnabledStandards.go index 885e14a25a1..56700f93967 100644 --- a/service/securityhub/api_op_GetEnabledStandards.go +++ b/service/securityhub/api_op_GetEnabledStandards.go @@ -168,12 +168,13 @@ func NewGetEnabledStandardsPaginator(client GetEnabledStandardsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetEnabledStandardsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetEnabledStandards page. @@ -196,7 +197,10 @@ func (p *GetEnabledStandardsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_GetFindings.go b/service/securityhub/api_op_GetFindings.go index c814e10cad2..05065ce832e 100644 --- a/service/securityhub/api_op_GetFindings.go +++ b/service/securityhub/api_op_GetFindings.go @@ -177,12 +177,13 @@ func NewGetFindingsPaginator(client GetFindingsAPIClient, params *GetFindingsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetFindingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetFindings page. @@ -205,7 +206,10 @@ func (p *GetFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_GetInsights.go b/service/securityhub/api_op_GetInsights.go index cc3900da8ff..6382e40fc25 100644 --- a/service/securityhub/api_op_GetInsights.go +++ b/service/securityhub/api_op_GetInsights.go @@ -169,12 +169,13 @@ func NewGetInsightsPaginator(client GetInsightsAPIClient, params *GetInsightsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInsightsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInsights page. @@ -197,7 +198,10 @@ func (p *GetInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_ListEnabledProductsForImport.go b/service/securityhub/api_op_ListEnabledProductsForImport.go index 76cbbbded9c..e0adcd481c2 100644 --- a/service/securityhub/api_op_ListEnabledProductsForImport.go +++ b/service/securityhub/api_op_ListEnabledProductsForImport.go @@ -167,12 +167,13 @@ func NewListEnabledProductsForImportPaginator(client ListEnabledProductsForImpor client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEnabledProductsForImportPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEnabledProductsForImport page. @@ -195,7 +196,10 @@ func (p *ListEnabledProductsForImportPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_ListFindingAggregators.go b/service/securityhub/api_op_ListFindingAggregators.go index a19e2367d75..e0f6c81d510 100644 --- a/service/securityhub/api_op_ListFindingAggregators.go +++ b/service/securityhub/api_op_ListFindingAggregators.go @@ -167,12 +167,13 @@ func NewListFindingAggregatorsPaginator(client ListFindingAggregatorsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFindingAggregatorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFindingAggregators page. @@ -195,7 +196,10 @@ func (p *ListFindingAggregatorsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_ListInvitations.go b/service/securityhub/api_op_ListInvitations.go index 578757388c5..c3d96fd7084 100644 --- a/service/securityhub/api_op_ListInvitations.go +++ b/service/securityhub/api_op_ListInvitations.go @@ -166,12 +166,13 @@ func NewListInvitationsPaginator(client ListInvitationsAPIClient, params *ListIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInvitations page. @@ -194,7 +195,10 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_ListMembers.go b/service/securityhub/api_op_ListMembers.go index d51680358c6..1b5e3a144ca 100644 --- a/service/securityhub/api_op_ListMembers.go +++ b/service/securityhub/api_op_ListMembers.go @@ -172,12 +172,13 @@ func NewListMembersPaginator(client ListMembersAPIClient, params *ListMembersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMembers page. @@ -200,7 +201,10 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/securityhub/api_op_ListOrganizationAdminAccounts.go b/service/securityhub/api_op_ListOrganizationAdminAccounts.go index c01e49b4833..f1e50f94f90 100644 --- a/service/securityhub/api_op_ListOrganizationAdminAccounts.go +++ b/service/securityhub/api_op_ListOrganizationAdminAccounts.go @@ -167,12 +167,13 @@ func NewListOrganizationAdminAccountsPaginator(client ListOrganizationAdminAccou client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationAdminAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizationAdminAccounts page. @@ -195,7 +196,10 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go b/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go index 974268d71f2..bd5808816a7 100644 --- a/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go +++ b/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go @@ -174,12 +174,13 @@ func NewListApplicationDependenciesPaginator(client ListApplicationDependenciesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationDependenciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationDependencies page. @@ -202,7 +203,10 @@ func (p *ListApplicationDependenciesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go b/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go index d264c22b8de..4bda85e669d 100644 --- a/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go +++ b/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go @@ -170,12 +170,13 @@ func NewListApplicationVersionsPaginator(client ListApplicationVersionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplicationVersions page. @@ -198,7 +199,10 @@ func (p *ListApplicationVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/serverlessapplicationrepository/api_op_ListApplications.go b/service/serverlessapplicationrepository/api_op_ListApplications.go index 29e7c6bc408..e7089245b46 100644 --- a/service/serverlessapplicationrepository/api_op_ListApplications.go +++ b/service/serverlessapplicationrepository/api_op_ListApplications.go @@ -160,12 +160,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -188,7 +189,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_DescribePortfolioShares.go b/service/servicecatalog/api_op_DescribePortfolioShares.go index 842b93e9dbc..994607fc155 100644 --- a/service/servicecatalog/api_op_DescribePortfolioShares.go +++ b/service/servicecatalog/api_op_DescribePortfolioShares.go @@ -187,12 +187,13 @@ func NewDescribePortfolioSharesPaginator(client DescribePortfolioSharesAPIClient client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePortfolioSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePortfolioShares page. @@ -215,7 +216,10 @@ func (p *DescribePortfolioSharesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_GetProvisionedProductOutputs.go b/service/servicecatalog/api_op_GetProvisionedProductOutputs.go index 64cc00e14b2..47ce785724f 100644 --- a/service/servicecatalog/api_op_GetProvisionedProductOutputs.go +++ b/service/servicecatalog/api_op_GetProvisionedProductOutputs.go @@ -188,12 +188,13 @@ func NewGetProvisionedProductOutputsPaginator(client GetProvisionedProductOutput client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetProvisionedProductOutputsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetProvisionedProductOutputs page. @@ -216,7 +217,10 @@ func (p *GetProvisionedProductOutputsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go b/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go index bdd60011ef8..9c11bd77bf0 100644 --- a/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go +++ b/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go @@ -186,12 +186,13 @@ func NewListAcceptedPortfolioSharesPaginator(client ListAcceptedPortfolioSharesA client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAcceptedPortfolioSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAcceptedPortfolioShares page. @@ -214,7 +215,10 @@ func (p *ListAcceptedPortfolioSharesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListBudgetsForResource.go b/service/servicecatalog/api_op_ListBudgetsForResource.go index c7dc09825d8..76d546071d2 100644 --- a/service/servicecatalog/api_op_ListBudgetsForResource.go +++ b/service/servicecatalog/api_op_ListBudgetsForResource.go @@ -180,12 +180,13 @@ func NewListBudgetsForResourcePaginator(client ListBudgetsForResourceAPIClient, client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBudgetsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBudgetsForResource page. @@ -208,7 +209,10 @@ func (p *ListBudgetsForResourcePaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListConstraintsForPortfolio.go b/service/servicecatalog/api_op_ListConstraintsForPortfolio.go index d53e93c4844..090b4c57a55 100644 --- a/service/servicecatalog/api_op_ListConstraintsForPortfolio.go +++ b/service/servicecatalog/api_op_ListConstraintsForPortfolio.go @@ -185,12 +185,13 @@ func NewListConstraintsForPortfolioPaginator(client ListConstraintsForPortfolioA client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConstraintsForPortfolioPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConstraintsForPortfolio page. @@ -213,7 +214,10 @@ func (p *ListConstraintsForPortfolioPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListLaunchPaths.go b/service/servicecatalog/api_op_ListLaunchPaths.go index 15608e2df8f..27d0574f493 100644 --- a/service/servicecatalog/api_op_ListLaunchPaths.go +++ b/service/servicecatalog/api_op_ListLaunchPaths.go @@ -181,12 +181,13 @@ func NewListLaunchPathsPaginator(client ListLaunchPathsAPIClient, params *ListLa client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLaunchPathsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLaunchPaths page. @@ -209,7 +210,10 @@ func (p *ListLaunchPathsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go b/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go index b913cd6c848..356d892956f 100644 --- a/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go +++ b/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go @@ -200,12 +200,13 @@ func NewListOrganizationPortfolioAccessPaginator(client ListOrganizationPortfoli client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationPortfolioAccessPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizationPortfolioAccess page. @@ -228,7 +229,10 @@ func (p *ListOrganizationPortfolioAccessPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListPortfolioAccess.go b/service/servicecatalog/api_op_ListPortfolioAccess.go index 44baaf62641..62402bceec4 100644 --- a/service/servicecatalog/api_op_ListPortfolioAccess.go +++ b/service/servicecatalog/api_op_ListPortfolioAccess.go @@ -186,12 +186,13 @@ func NewListPortfolioAccessPaginator(client ListPortfolioAccessAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPortfolioAccessPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPortfolioAccess page. @@ -214,7 +215,10 @@ func (p *ListPortfolioAccessPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListPortfolios.go b/service/servicecatalog/api_op_ListPortfolios.go index 4bbfa9d969e..eb441ca43f2 100644 --- a/service/servicecatalog/api_op_ListPortfolios.go +++ b/service/servicecatalog/api_op_ListPortfolios.go @@ -171,12 +171,13 @@ func NewListPortfoliosPaginator(client ListPortfoliosAPIClient, params *ListPort client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPortfoliosPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPortfolios page. @@ -199,7 +200,10 @@ func (p *ListPortfoliosPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListPortfoliosForProduct.go b/service/servicecatalog/api_op_ListPortfoliosForProduct.go index d6e3805ca33..6150a76d03a 100644 --- a/service/servicecatalog/api_op_ListPortfoliosForProduct.go +++ b/service/servicecatalog/api_op_ListPortfoliosForProduct.go @@ -181,12 +181,13 @@ func NewListPortfoliosForProductPaginator(client ListPortfoliosForProductAPIClie client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPortfoliosForProductPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPortfoliosForProduct page. @@ -209,7 +210,10 @@ func (p *ListPortfoliosForProductPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go b/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go index dd655045e52..c3b34a5457d 100644 --- a/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go +++ b/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go @@ -182,12 +182,13 @@ func NewListPrincipalsForPortfolioPaginator(client ListPrincipalsForPortfolioAPI client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPrincipalsForPortfolioPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPrincipalsForPortfolio page. @@ -210,7 +211,10 @@ func (p *ListPrincipalsForPortfolioPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go b/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go index 09f75f79873..b59aeddf1a2 100644 --- a/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go +++ b/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go @@ -184,12 +184,13 @@ func NewListProvisioningArtifactsForServiceActionPaginator(client ListProvisioni client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProvisioningArtifactsForServiceActionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProvisioningArtifactsForServiceAction page. @@ -212,7 +213,10 @@ func (p *ListProvisioningArtifactsForServiceActionPaginator) NextPage(ctx contex prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListResourcesForTagOption.go b/service/servicecatalog/api_op_ListResourcesForTagOption.go index a70088c85b4..383c0dc27fc 100644 --- a/service/servicecatalog/api_op_ListResourcesForTagOption.go +++ b/service/servicecatalog/api_op_ListResourcesForTagOption.go @@ -179,12 +179,13 @@ func NewListResourcesForTagOptionPaginator(client ListResourcesForTagOptionAPICl client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesForTagOptionPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourcesForTagOption page. @@ -207,7 +208,10 @@ func (p *ListResourcesForTagOptionPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.PageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListServiceActions.go b/service/servicecatalog/api_op_ListServiceActions.go index 7089a72fc44..23844bb6130 100644 --- a/service/servicecatalog/api_op_ListServiceActions.go +++ b/service/servicecatalog/api_op_ListServiceActions.go @@ -173,12 +173,13 @@ func NewListServiceActionsPaginator(client ListServiceActionsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceActionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceActions page. @@ -201,7 +202,10 @@ func (p *ListServiceActionsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go b/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go index 3e36e02600d..b6520aeeeee 100644 --- a/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go +++ b/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go @@ -189,12 +189,13 @@ func NewListServiceActionsForProvisioningArtifactPaginator(client ListServiceAct client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceActionsForProvisioningArtifactPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceActionsForProvisioningArtifact page. @@ -217,7 +218,10 @@ func (p *ListServiceActionsForProvisioningArtifactPaginator) NextPage(ctx contex prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_ListTagOptions.go b/service/servicecatalog/api_op_ListTagOptions.go index 5bccc16f13c..975e6c28750 100644 --- a/service/servicecatalog/api_op_ListTagOptions.go +++ b/service/servicecatalog/api_op_ListTagOptions.go @@ -166,12 +166,13 @@ func NewListTagOptionsPaginator(client ListTagOptionsAPIClient, params *ListTagO client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagOptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagOptions page. @@ -194,7 +195,10 @@ func (p *ListTagOptionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.PageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_SearchProducts.go b/service/servicecatalog/api_op_SearchProducts.go index dc8dfbdc203..ddfbead6d5a 100644 --- a/service/servicecatalog/api_op_SearchProducts.go +++ b/service/servicecatalog/api_op_SearchProducts.go @@ -184,12 +184,13 @@ func NewSearchProductsPaginator(client SearchProductsAPIClient, params *SearchPr client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchProductsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchProducts page. @@ -212,7 +213,10 @@ func (p *SearchProductsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_SearchProductsAsAdmin.go b/service/servicecatalog/api_op_SearchProductsAsAdmin.go index d4132a5de60..1afecc0ec5f 100644 --- a/service/servicecatalog/api_op_SearchProductsAsAdmin.go +++ b/service/servicecatalog/api_op_SearchProductsAsAdmin.go @@ -188,12 +188,13 @@ func NewSearchProductsAsAdminPaginator(client SearchProductsAsAdminAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchProductsAsAdminPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchProductsAsAdmin page. @@ -216,7 +217,10 @@ func (p *SearchProductsAsAdminPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalog/api_op_SearchProvisionedProducts.go b/service/servicecatalog/api_op_SearchProvisionedProducts.go index bbd5c1af32b..61c3893eb7d 100644 --- a/service/servicecatalog/api_op_SearchProvisionedProducts.go +++ b/service/servicecatalog/api_op_SearchProvisionedProducts.go @@ -194,12 +194,13 @@ func NewSearchProvisionedProductsPaginator(client SearchProvisionedProductsAPICl client: client, params: params, firstPage: true, + nextToken: params.PageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchProvisionedProductsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchProvisionedProducts page. @@ -222,7 +223,10 @@ func (p *SearchProvisionedProductsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalogappregistry/api_op_ListApplications.go b/service/servicecatalogappregistry/api_op_ListApplications.go index c86d83bb5fa..6dacb8d84f9 100644 --- a/service/servicecatalogappregistry/api_op_ListApplications.go +++ b/service/servicecatalogappregistry/api_op_ListApplications.go @@ -162,12 +162,13 @@ func NewListApplicationsPaginator(client ListApplicationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListApplications page. @@ -190,7 +191,10 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go b/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go index 6481e196b94..325508aaa26 100644 --- a/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go +++ b/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go @@ -173,12 +173,13 @@ func NewListAssociatedAttributeGroupsPaginator(client ListAssociatedAttributeGro client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociatedAttributeGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociatedAttributeGroups page. @@ -201,7 +202,10 @@ func (p *ListAssociatedAttributeGroupsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalogappregistry/api_op_ListAssociatedResources.go b/service/servicecatalogappregistry/api_op_ListAssociatedResources.go index b006ab9479d..0d162fd348a 100644 --- a/service/servicecatalogappregistry/api_op_ListAssociatedResources.go +++ b/service/servicecatalogappregistry/api_op_ListAssociatedResources.go @@ -173,12 +173,13 @@ func NewListAssociatedResourcesPaginator(client ListAssociatedResourcesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociatedResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociatedResources page. @@ -201,7 +202,10 @@ func (p *ListAssociatedResourcesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicecatalogappregistry/api_op_ListAttributeGroups.go b/service/servicecatalogappregistry/api_op_ListAttributeGroups.go index e2d19884e79..d1de25a8e32 100644 --- a/service/servicecatalogappregistry/api_op_ListAttributeGroups.go +++ b/service/servicecatalogappregistry/api_op_ListAttributeGroups.go @@ -163,12 +163,13 @@ func NewListAttributeGroupsPaginator(client ListAttributeGroupsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttributeGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttributeGroups page. @@ -191,7 +192,10 @@ func (p *ListAttributeGroupsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicediscovery/api_op_GetInstancesHealthStatus.go b/service/servicediscovery/api_op_GetInstancesHealthStatus.go index 480eb68fa64..11a3986e3fc 100644 --- a/service/servicediscovery/api_op_GetInstancesHealthStatus.go +++ b/service/servicediscovery/api_op_GetInstancesHealthStatus.go @@ -192,12 +192,13 @@ func NewGetInstancesHealthStatusPaginator(client GetInstancesHealthStatusAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInstancesHealthStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInstancesHealthStatus page. @@ -224,7 +225,10 @@ func (p *GetInstancesHealthStatusPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicediscovery/api_op_ListInstances.go b/service/servicediscovery/api_op_ListInstances.go index 7071a928c97..ef0a1cc0211 100644 --- a/service/servicediscovery/api_op_ListInstances.go +++ b/service/servicediscovery/api_op_ListInstances.go @@ -178,12 +178,13 @@ func NewListInstancesPaginator(client ListInstancesAPIClient, params *ListInstan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstances page. @@ -210,7 +211,10 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicediscovery/api_op_ListNamespaces.go b/service/servicediscovery/api_op_ListNamespaces.go index 891d7cab949..5e3264fac3e 100644 --- a/service/servicediscovery/api_op_ListNamespaces.go +++ b/service/servicediscovery/api_op_ListNamespaces.go @@ -186,12 +186,13 @@ func NewListNamespacesPaginator(client ListNamespacesAPIClient, params *ListName client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNamespacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNamespaces page. @@ -218,7 +219,10 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicediscovery/api_op_ListOperations.go b/service/servicediscovery/api_op_ListOperations.go index 7c00bc591d9..76c05d478a1 100644 --- a/service/servicediscovery/api_op_ListOperations.go +++ b/service/servicediscovery/api_op_ListOperations.go @@ -185,12 +185,13 @@ func NewListOperationsPaginator(client ListOperationsAPIClient, params *ListOper client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOperationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOperations page. @@ -217,7 +218,10 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicediscovery/api_op_ListServices.go b/service/servicediscovery/api_op_ListServices.go index 4c8c87e5698..21c8985dbb5 100644 --- a/service/servicediscovery/api_op_ListServices.go +++ b/service/servicediscovery/api_op_ListServices.go @@ -184,12 +184,13 @@ func NewListServicesPaginator(client ListServicesAPIClient, params *ListServices client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServices page. @@ -216,7 +217,10 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go b/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go index fd7dadbd9f0..d890ce1fb38 100644 --- a/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go +++ b/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go @@ -177,12 +177,13 @@ func NewListAWSDefaultServiceQuotasPaginator(client ListAWSDefaultServiceQuotasA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAWSDefaultServiceQuotasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAWSDefaultServiceQuotas page. @@ -209,7 +210,10 @@ func (p *ListAWSDefaultServiceQuotasPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go index 1cbfb53e3e5..0ae30e73aae 100644 --- a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go +++ b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go @@ -174,12 +174,13 @@ func NewListRequestedServiceQuotaChangeHistoryPaginator(client ListRequestedServ client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRequestedServiceQuotaChangeHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRequestedServiceQuotaChangeHistory page. @@ -206,7 +207,10 @@ func (p *ListRequestedServiceQuotaChangeHistoryPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go index dcf727784ff..7bce7c67d50 100644 --- a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go +++ b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go @@ -184,12 +184,13 @@ func NewListRequestedServiceQuotaChangeHistoryByQuotaPaginator(client ListReques client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRequestedServiceQuotaChangeHistoryByQuotaPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRequestedServiceQuotaChangeHistoryByQuota page. @@ -216,7 +217,10 @@ func (p *ListRequestedServiceQuotaChangeHistoryByQuotaPaginator) NextPage(ctx co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go b/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go index 96a69b36122..bce2dd39f13 100644 --- a/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go +++ b/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go @@ -174,12 +174,13 @@ func NewListServiceQuotaIncreaseRequestsInTemplatePaginator(client ListServiceQu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceQuotaIncreaseRequestsInTemplatePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceQuotaIncreaseRequestsInTemplate page. @@ -206,7 +207,10 @@ func (p *ListServiceQuotaIncreaseRequestsInTemplatePaginator) NextPage(ctx conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicequotas/api_op_ListServiceQuotas.go b/service/servicequotas/api_op_ListServiceQuotas.go index 469112b4037..8899b7cc126 100644 --- a/service/servicequotas/api_op_ListServiceQuotas.go +++ b/service/servicequotas/api_op_ListServiceQuotas.go @@ -175,12 +175,13 @@ func NewListServiceQuotasPaginator(client ListServiceQuotasAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServiceQuotasPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServiceQuotas page. @@ -207,7 +208,10 @@ func (p *ListServiceQuotasPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/servicequotas/api_op_ListServices.go b/service/servicequotas/api_op_ListServices.go index 994f333477a..8bf4ae1446a 100644 --- a/service/servicequotas/api_op_ListServices.go +++ b/service/servicequotas/api_op_ListServices.go @@ -164,12 +164,13 @@ func NewListServicesPaginator(client ListServicesAPIClient, params *ListServices client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServices page. @@ -196,7 +197,10 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ses/api_op_ListCustomVerificationEmailTemplates.go b/service/ses/api_op_ListCustomVerificationEmailTemplates.go index 0533f3fe929..275ab091cfe 100644 --- a/service/ses/api_op_ListCustomVerificationEmailTemplates.go +++ b/service/ses/api_op_ListCustomVerificationEmailTemplates.go @@ -183,12 +183,13 @@ func NewListCustomVerificationEmailTemplatesPaginator(client ListCustomVerificat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomVerificationEmailTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomVerificationEmailTemplates page. @@ -215,7 +216,10 @@ func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ses/api_op_ListIdentities.go b/service/ses/api_op_ListIdentities.go index 6afe1e18434..a25e17b1f79 100644 --- a/service/ses/api_op_ListIdentities.go +++ b/service/ses/api_op_ListIdentities.go @@ -173,12 +173,13 @@ func NewListIdentitiesPaginator(client ListIdentitiesAPIClient, params *ListIden client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIdentitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIdentities page. @@ -205,7 +206,10 @@ func (p *ListIdentitiesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_GetDedicatedIps.go b/service/sesv2/api_op_GetDedicatedIps.go index 2f799ea3ff6..f9a365ec063 100644 --- a/service/sesv2/api_op_GetDedicatedIps.go +++ b/service/sesv2/api_op_GetDedicatedIps.go @@ -177,12 +177,13 @@ func NewGetDedicatedIpsPaginator(client GetDedicatedIpsAPIClient, params *GetDed client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetDedicatedIpsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetDedicatedIps page. @@ -209,7 +210,10 @@ func (p *GetDedicatedIpsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListConfigurationSets.go b/service/sesv2/api_op_ListConfigurationSets.go index 100b6ea0480..45f71dd469f 100644 --- a/service/sesv2/api_op_ListConfigurationSets.go +++ b/service/sesv2/api_op_ListConfigurationSets.go @@ -179,12 +179,13 @@ func NewListConfigurationSetsPaginator(client ListConfigurationSetsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListConfigurationSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListConfigurationSets page. @@ -211,7 +212,10 @@ func (p *ListConfigurationSetsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListContactLists.go b/service/sesv2/api_op_ListContactLists.go index beed3c78e5e..16795672492 100644 --- a/service/sesv2/api_op_ListContactLists.go +++ b/service/sesv2/api_op_ListContactLists.go @@ -171,12 +171,13 @@ func NewListContactListsPaginator(client ListContactListsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactListsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContactLists page. @@ -203,7 +204,10 @@ func (p *ListContactListsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListContacts.go b/service/sesv2/api_op_ListContacts.go index 7790a02b75e..6e1d2033a41 100644 --- a/service/sesv2/api_op_ListContacts.go +++ b/service/sesv2/api_op_ListContacts.go @@ -182,12 +182,13 @@ func NewListContactsPaginator(client ListContactsAPIClient, params *ListContacts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContacts page. @@ -214,7 +215,10 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go b/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go index 660b01f1cae..6162b75e73b 100644 --- a/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go +++ b/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go @@ -183,12 +183,13 @@ func NewListCustomVerificationEmailTemplatesPaginator(client ListCustomVerificat client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCustomVerificationEmailTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCustomVerificationEmailTemplates page. @@ -215,7 +216,10 @@ func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Con prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListDedicatedIpPools.go b/service/sesv2/api_op_ListDedicatedIpPools.go index e02a28084ab..df03e077375 100644 --- a/service/sesv2/api_op_ListDedicatedIpPools.go +++ b/service/sesv2/api_op_ListDedicatedIpPools.go @@ -173,12 +173,13 @@ func NewListDedicatedIpPoolsPaginator(client ListDedicatedIpPoolsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDedicatedIpPoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDedicatedIpPools page. @@ -205,7 +206,10 @@ func (p *ListDedicatedIpPoolsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListDeliverabilityTestReports.go b/service/sesv2/api_op_ListDeliverabilityTestReports.go index ae832fe0722..9d679c573b6 100644 --- a/service/sesv2/api_op_ListDeliverabilityTestReports.go +++ b/service/sesv2/api_op_ListDeliverabilityTestReports.go @@ -185,12 +185,13 @@ func NewListDeliverabilityTestReportsPaginator(client ListDeliverabilityTestRepo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeliverabilityTestReportsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeliverabilityTestReports page. @@ -217,7 +218,10 @@ func (p *ListDeliverabilityTestReportsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go b/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go index ffb10ed87c6..2a4758bf1be 100644 --- a/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go +++ b/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go @@ -207,12 +207,13 @@ func NewListDomainDeliverabilityCampaignsPaginator(client ListDomainDeliverabili client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainDeliverabilityCampaignsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomainDeliverabilityCampaigns page. @@ -239,7 +240,10 @@ func (p *ListDomainDeliverabilityCampaignsPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListEmailIdentities.go b/service/sesv2/api_op_ListEmailIdentities.go index dd4ede80a77..ca15f3be2e2 100644 --- a/service/sesv2/api_op_ListEmailIdentities.go +++ b/service/sesv2/api_op_ListEmailIdentities.go @@ -183,12 +183,13 @@ func NewListEmailIdentitiesPaginator(client ListEmailIdentitiesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEmailIdentitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEmailIdentities page. @@ -215,7 +216,10 @@ func (p *ListEmailIdentitiesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListEmailTemplates.go b/service/sesv2/api_op_ListEmailTemplates.go index 265276faf4d..0e8deafca5e 100644 --- a/service/sesv2/api_op_ListEmailTemplates.go +++ b/service/sesv2/api_op_ListEmailTemplates.go @@ -180,12 +180,13 @@ func NewListEmailTemplatesPaginator(client ListEmailTemplatesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEmailTemplatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEmailTemplates page. @@ -212,7 +213,10 @@ func (p *ListEmailTemplatesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListImportJobs.go b/service/sesv2/api_op_ListImportJobs.go index 1e4dfc92a2a..7af517c4e9a 100644 --- a/service/sesv2/api_op_ListImportJobs.go +++ b/service/sesv2/api_op_ListImportJobs.go @@ -178,12 +178,13 @@ func NewListImportJobsPaginator(client ListImportJobsAPIClient, params *ListImpo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListImportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListImportJobs page. @@ -210,7 +211,10 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sesv2/api_op_ListSuppressedDestinations.go b/service/sesv2/api_op_ListSuppressedDestinations.go index 2a8934f87ad..6dc663cf5e9 100644 --- a/service/sesv2/api_op_ListSuppressedDestinations.go +++ b/service/sesv2/api_op_ListSuppressedDestinations.go @@ -192,12 +192,13 @@ func NewListSuppressedDestinationsPaginator(client ListSuppressedDestinationsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSuppressedDestinationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSuppressedDestinations page. @@ -224,7 +225,10 @@ func (p *ListSuppressedDestinationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sfn/api_op_GetExecutionHistory.go b/service/sfn/api_op_GetExecutionHistory.go index b83590536bd..eb75d1caf8e 100644 --- a/service/sfn/api_op_GetExecutionHistory.go +++ b/service/sfn/api_op_GetExecutionHistory.go @@ -202,12 +202,13 @@ func NewGetExecutionHistoryPaginator(client GetExecutionHistoryAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetExecutionHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetExecutionHistory page. @@ -230,7 +231,10 @@ func (p *GetExecutionHistoryPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sfn/api_op_ListActivities.go b/service/sfn/api_op_ListActivities.go index 5ca6387e199..664c2377f16 100644 --- a/service/sfn/api_op_ListActivities.go +++ b/service/sfn/api_op_ListActivities.go @@ -184,12 +184,13 @@ func NewListActivitiesPaginator(client ListActivitiesAPIClient, params *ListActi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActivitiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActivities page. @@ -212,7 +213,10 @@ func (p *ListActivitiesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sfn/api_op_ListExecutions.go b/service/sfn/api_op_ListExecutions.go index d6aa2d17ece..77775229c9f 100644 --- a/service/sfn/api_op_ListExecutions.go +++ b/service/sfn/api_op_ListExecutions.go @@ -198,12 +198,13 @@ func NewListExecutionsPaginator(client ListExecutionsAPIClient, params *ListExec client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExecutions page. @@ -226,7 +227,10 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sfn/api_op_ListStateMachines.go b/service/sfn/api_op_ListStateMachines.go index 4096584f75b..6d982e7d39a 100644 --- a/service/sfn/api_op_ListStateMachines.go +++ b/service/sfn/api_op_ListStateMachines.go @@ -182,12 +182,13 @@ func NewListStateMachinesPaginator(client ListStateMachinesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStateMachinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStateMachines page. @@ -210,7 +211,10 @@ func (p *ListStateMachinesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/shield/api_op_ListAttacks.go b/service/shield/api_op_ListAttacks.go index efa8eb86e46..66a1443f446 100644 --- a/service/shield/api_op_ListAttacks.go +++ b/service/shield/api_op_ListAttacks.go @@ -205,12 +205,13 @@ func NewListAttacksPaginator(client ListAttacksAPIClient, params *ListAttacksInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAttacksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAttacks page. @@ -237,7 +238,10 @@ func (p *ListAttacksPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/shield/api_op_ListProtectionGroups.go b/service/shield/api_op_ListProtectionGroups.go index a8feeee55e1..b5c602e903b 100644 --- a/service/shield/api_op_ListProtectionGroups.go +++ b/service/shield/api_op_ListProtectionGroups.go @@ -190,12 +190,13 @@ func NewListProtectionGroupsPaginator(client ListProtectionGroupsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProtectionGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProtectionGroups page. @@ -222,7 +223,10 @@ func (p *ListProtectionGroupsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/shield/api_op_ListProtections.go b/service/shield/api_op_ListProtections.go index c68f4d714e7..bc2b047804a 100644 --- a/service/shield/api_op_ListProtections.go +++ b/service/shield/api_op_ListProtections.go @@ -187,12 +187,13 @@ func NewListProtectionsPaginator(client ListProtectionsAPIClient, params *ListPr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListProtectionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListProtections page. @@ -219,7 +220,10 @@ func (p *ListProtectionsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/shield/api_op_ListResourcesInProtectionGroup.go b/service/shield/api_op_ListResourcesInProtectionGroup.go index ee2b30de2cd..762db690bd0 100644 --- a/service/shield/api_op_ListResourcesInProtectionGroup.go +++ b/service/shield/api_op_ListResourcesInProtectionGroup.go @@ -202,12 +202,13 @@ func NewListResourcesInProtectionGroupPaginator(client ListResourcesInProtection client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesInProtectionGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourcesInProtectionGroup page. @@ -234,7 +235,10 @@ func (p *ListResourcesInProtectionGroupPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/signer/api_op_ListSigningJobs.go b/service/signer/api_op_ListSigningJobs.go index 5fca5e4b968..3fe1a1dd2e4 100644 --- a/service/signer/api_op_ListSigningJobs.go +++ b/service/signer/api_op_ListSigningJobs.go @@ -200,12 +200,13 @@ func NewListSigningJobsPaginator(client ListSigningJobsAPIClient, params *ListSi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSigningJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSigningJobs page. @@ -232,7 +233,10 @@ func (p *ListSigningJobsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/signer/api_op_ListSigningPlatforms.go b/service/signer/api_op_ListSigningPlatforms.go index 90decc448c2..6a7b726b4ed 100644 --- a/service/signer/api_op_ListSigningPlatforms.go +++ b/service/signer/api_op_ListSigningPlatforms.go @@ -178,12 +178,13 @@ func NewListSigningPlatformsPaginator(client ListSigningPlatformsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSigningPlatformsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSigningPlatforms page. @@ -210,7 +211,10 @@ func (p *ListSigningPlatformsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/signer/api_op_ListSigningProfiles.go b/service/signer/api_op_ListSigningProfiles.go index 9d169ffdc8d..693291854bd 100644 --- a/service/signer/api_op_ListSigningProfiles.go +++ b/service/signer/api_op_ListSigningProfiles.go @@ -181,12 +181,13 @@ func NewListSigningProfilesPaginator(client ListSigningProfilesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSigningProfilesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSigningProfiles page. @@ -213,7 +214,10 @@ func (p *ListSigningProfilesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sms/api_op_GetConnectors.go b/service/sms/api_op_GetConnectors.go index 47473fa58f4..e88a25436e9 100644 --- a/service/sms/api_op_GetConnectors.go +++ b/service/sms/api_op_GetConnectors.go @@ -164,12 +164,13 @@ func NewGetConnectorsPaginator(client GetConnectorsAPIClient, params *GetConnect client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetConnectorsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetConnectors page. @@ -196,7 +197,10 @@ func (p *GetConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sms/api_op_GetReplicationJobs.go b/service/sms/api_op_GetReplicationJobs.go index a68b4c0980a..cb0abd63aea 100644 --- a/service/sms/api_op_GetReplicationJobs.go +++ b/service/sms/api_op_GetReplicationJobs.go @@ -169,12 +169,13 @@ func NewGetReplicationJobsPaginator(client GetReplicationJobsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetReplicationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetReplicationJobs page. @@ -201,7 +202,10 @@ func (p *GetReplicationJobsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sms/api_op_GetReplicationRuns.go b/service/sms/api_op_GetReplicationRuns.go index 449c7e8fb00..d690b864b36 100644 --- a/service/sms/api_op_GetReplicationRuns.go +++ b/service/sms/api_op_GetReplicationRuns.go @@ -177,12 +177,13 @@ func NewGetReplicationRunsPaginator(client GetReplicationRunsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetReplicationRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetReplicationRuns page. @@ -209,7 +210,10 @@ func (p *GetReplicationRunsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sms/api_op_GetServers.go b/service/sms/api_op_GetServers.go index df91ad88379..1cea6e3462d 100644 --- a/service/sms/api_op_GetServers.go +++ b/service/sms/api_op_GetServers.go @@ -175,12 +175,13 @@ func NewGetServersPaginator(client GetServersAPIClient, params *GetServersInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetServers page. @@ -207,7 +208,10 @@ func (p *GetServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/snowball/api_op_DescribeAddresses.go b/service/snowball/api_op_DescribeAddresses.go index 827dfd5340e..570b90df19f 100644 --- a/service/snowball/api_op_DescribeAddresses.go +++ b/service/snowball/api_op_DescribeAddresses.go @@ -166,12 +166,13 @@ func NewDescribeAddressesPaginator(client DescribeAddressesAPIClient, params *De client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAddressesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAddresses page. @@ -198,7 +199,10 @@ func (p *DescribeAddressesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/snowball/api_op_ListJobs.go b/service/snowball/api_op_ListJobs.go index e9f818422bc..966f34a9f6e 100644 --- a/service/snowball/api_op_ListJobs.go +++ b/service/snowball/api_op_ListJobs.go @@ -168,12 +168,13 @@ func NewListJobsPaginator(client ListJobsAPIClient, params *ListJobsInput, optFn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListJobs page. @@ -200,7 +201,10 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/snowdevicemanagement/api_op_ListDeviceResources.go b/service/snowdevicemanagement/api_op_ListDeviceResources.go index 8b4051159ff..53eca385563 100644 --- a/service/snowdevicemanagement/api_op_ListDeviceResources.go +++ b/service/snowdevicemanagement/api_op_ListDeviceResources.go @@ -173,12 +173,13 @@ func NewListDeviceResourcesPaginator(client ListDeviceResourcesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeviceResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeviceResources page. @@ -205,7 +206,10 @@ func (p *ListDeviceResourcesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/snowdevicemanagement/api_op_ListDevices.go b/service/snowdevicemanagement/api_op_ListDevices.go index c5cc4811f33..961bb5baf46 100644 --- a/service/snowdevicemanagement/api_op_ListDevices.go +++ b/service/snowdevicemanagement/api_op_ListDevices.go @@ -164,12 +164,13 @@ func NewListDevicesPaginator(client ListDevicesAPIClient, params *ListDevicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevices page. @@ -196,7 +197,10 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/snowdevicemanagement/api_op_ListExecutions.go b/service/snowdevicemanagement/api_op_ListExecutions.go index e08328867f6..c52672e4c89 100644 --- a/service/snowdevicemanagement/api_op_ListExecutions.go +++ b/service/snowdevicemanagement/api_op_ListExecutions.go @@ -172,12 +172,13 @@ func NewListExecutionsPaginator(client ListExecutionsAPIClient, params *ListExec client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExecutions page. @@ -204,7 +205,10 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/snowdevicemanagement/api_op_ListTasks.go b/service/snowdevicemanagement/api_op_ListTasks.go index cc004e1fc15..420bb132158 100644 --- a/service/snowdevicemanagement/api_op_ListTasks.go +++ b/service/snowdevicemanagement/api_op_ListTasks.go @@ -162,12 +162,13 @@ func NewListTasksPaginator(client ListTasksAPIClient, params *ListTasksInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTasks page. @@ -194,7 +195,10 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListEndpointsByPlatformApplication.go b/service/sns/api_op_ListEndpointsByPlatformApplication.go index 5c296de1f1b..47f6ab13951 100644 --- a/service/sns/api_op_ListEndpointsByPlatformApplication.go +++ b/service/sns/api_op_ListEndpointsByPlatformApplication.go @@ -176,12 +176,13 @@ func NewListEndpointsByPlatformApplicationPaginator(client ListEndpointsByPlatfo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEndpointsByPlatformApplicationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEndpointsByPlatformApplication page. @@ -202,7 +203,10 @@ func (p *ListEndpointsByPlatformApplicationPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListOriginationNumbers.go b/service/sns/api_op_ListOriginationNumbers.go index fd7c73ef492..98483b1cc4b 100644 --- a/service/sns/api_op_ListOriginationNumbers.go +++ b/service/sns/api_op_ListOriginationNumbers.go @@ -166,12 +166,13 @@ func NewListOriginationNumbersPaginator(client ListOriginationNumbersAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOriginationNumbersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOriginationNumbers page. @@ -198,7 +199,10 @@ func (p *ListOriginationNumbersPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListPhoneNumbersOptedOut.go b/service/sns/api_op_ListPhoneNumbersOptedOut.go index 0878c850ccc..04b2721d7f8 100644 --- a/service/sns/api_op_ListPhoneNumbersOptedOut.go +++ b/service/sns/api_op_ListPhoneNumbersOptedOut.go @@ -163,12 +163,13 @@ func NewListPhoneNumbersOptedOutPaginator(client ListPhoneNumbersOptedOutAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPhoneNumbersOptedOutPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPhoneNumbersOptedOut page. @@ -189,7 +190,10 @@ func (p *ListPhoneNumbersOptedOutPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListPlatformApplications.go b/service/sns/api_op_ListPlatformApplications.go index d774e241de7..6ce2ddb9b8d 100644 --- a/service/sns/api_op_ListPlatformApplications.go +++ b/service/sns/api_op_ListPlatformApplications.go @@ -166,12 +166,13 @@ func NewListPlatformApplicationsPaginator(client ListPlatformApplicationsAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPlatformApplicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPlatformApplications page. @@ -192,7 +193,10 @@ func (p *ListPlatformApplicationsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListSMSSandboxPhoneNumbers.go b/service/sns/api_op_ListSMSSandboxPhoneNumbers.go index 7c3c8662b01..5e33ef1c29c 100644 --- a/service/sns/api_op_ListSMSSandboxPhoneNumbers.go +++ b/service/sns/api_op_ListSMSSandboxPhoneNumbers.go @@ -176,12 +176,13 @@ func NewListSMSSandboxPhoneNumbersPaginator(client ListSMSSandboxPhoneNumbersAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSMSSandboxPhoneNumbersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSMSSandboxPhoneNumbers page. @@ -208,7 +209,10 @@ func (p *ListSMSSandboxPhoneNumbersPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListSubscriptions.go b/service/sns/api_op_ListSubscriptions.go index 1bdaa3c27e5..16dd9681bee 100644 --- a/service/sns/api_op_ListSubscriptions.go +++ b/service/sns/api_op_ListSubscriptions.go @@ -158,12 +158,13 @@ func NewListSubscriptionsPaginator(client ListSubscriptionsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSubscriptions page. @@ -184,7 +185,10 @@ func (p *ListSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListSubscriptionsByTopic.go b/service/sns/api_op_ListSubscriptionsByTopic.go index a8ad9f36092..84e5bd62c2a 100644 --- a/service/sns/api_op_ListSubscriptionsByTopic.go +++ b/service/sns/api_op_ListSubscriptionsByTopic.go @@ -168,12 +168,13 @@ func NewListSubscriptionsByTopicPaginator(client ListSubscriptionsByTopicAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSubscriptionsByTopicPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSubscriptionsByTopic page. @@ -194,7 +195,10 @@ func (p *ListSubscriptionsByTopicPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sns/api_op_ListTopics.go b/service/sns/api_op_ListTopics.go index 0abdce8293d..2fc4f200a46 100644 --- a/service/sns/api_op_ListTopics.go +++ b/service/sns/api_op_ListTopics.go @@ -155,12 +155,13 @@ func NewListTopicsPaginator(client ListTopicsAPIClient, params *ListTopicsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTopicsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTopics page. @@ -181,7 +182,10 @@ func (p *ListTopicsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sqs/api_op_ListDeadLetterSourceQueues.go b/service/sqs/api_op_ListDeadLetterSourceQueues.go index b8b2b9d2ea2..be568b74707 100644 --- a/service/sqs/api_op_ListDeadLetterSourceQueues.go +++ b/service/sqs/api_op_ListDeadLetterSourceQueues.go @@ -190,12 +190,13 @@ func NewListDeadLetterSourceQueuesPaginator(client ListDeadLetterSourceQueuesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDeadLetterSourceQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDeadLetterSourceQueues page. @@ -222,7 +223,10 @@ func (p *ListDeadLetterSourceQueuesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sqs/api_op_ListQueues.go b/service/sqs/api_op_ListQueues.go index 15802c73b38..2e853b7f6fb 100644 --- a/service/sqs/api_op_ListQueues.go +++ b/service/sqs/api_op_ListQueues.go @@ -182,12 +182,13 @@ func NewListQueuesPaginator(client ListQueuesAPIClient, params *ListQueuesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQueuesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQueues page. @@ -214,7 +215,10 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeActivations.go b/service/ssm/api_op_DescribeActivations.go index 61de6b24c22..b59ac6a724f 100644 --- a/service/ssm/api_op_DescribeActivations.go +++ b/service/ssm/api_op_DescribeActivations.go @@ -170,12 +170,13 @@ func NewDescribeActivationsPaginator(client DescribeActivationsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeActivationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeActivations page. @@ -198,7 +199,10 @@ func (p *DescribeActivationsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeAssociationExecutionTargets.go b/service/ssm/api_op_DescribeAssociationExecutionTargets.go index 7f3131fac56..fe50d46f691 100644 --- a/service/ssm/api_op_DescribeAssociationExecutionTargets.go +++ b/service/ssm/api_op_DescribeAssociationExecutionTargets.go @@ -184,12 +184,13 @@ func NewDescribeAssociationExecutionTargetsPaginator(client DescribeAssociationE client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAssociationExecutionTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAssociationExecutionTargets page. @@ -212,7 +213,10 @@ func (p *DescribeAssociationExecutionTargetsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeAssociationExecutions.go b/service/ssm/api_op_DescribeAssociationExecutions.go index 623412064e8..a0088c8d24d 100644 --- a/service/ssm/api_op_DescribeAssociationExecutions.go +++ b/service/ssm/api_op_DescribeAssociationExecutions.go @@ -178,12 +178,13 @@ func NewDescribeAssociationExecutionsPaginator(client DescribeAssociationExecuti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAssociationExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAssociationExecutions page. @@ -206,7 +207,10 @@ func (p *DescribeAssociationExecutionsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeAutomationExecutions.go b/service/ssm/api_op_DescribeAutomationExecutions.go index 4e26f489b4a..b6f5d0390d9 100644 --- a/service/ssm/api_op_DescribeAutomationExecutions.go +++ b/service/ssm/api_op_DescribeAutomationExecutions.go @@ -174,12 +174,13 @@ func NewDescribeAutomationExecutionsPaginator(client DescribeAutomationExecution client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAutomationExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAutomationExecutions page. @@ -202,7 +203,10 @@ func (p *DescribeAutomationExecutionsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeAutomationStepExecutions.go b/service/ssm/api_op_DescribeAutomationStepExecutions.go index e8c389f4712..5bc9685d1d2 100644 --- a/service/ssm/api_op_DescribeAutomationStepExecutions.go +++ b/service/ssm/api_op_DescribeAutomationStepExecutions.go @@ -185,12 +185,13 @@ func NewDescribeAutomationStepExecutionsPaginator(client DescribeAutomationStepE client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAutomationStepExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAutomationStepExecutions page. @@ -213,7 +214,10 @@ func (p *DescribeAutomationStepExecutionsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeAvailablePatches.go b/service/ssm/api_op_DescribeAvailablePatches.go index 81c7846adaf..f325a451168 100644 --- a/service/ssm/api_op_DescribeAvailablePatches.go +++ b/service/ssm/api_op_DescribeAvailablePatches.go @@ -223,12 +223,13 @@ func NewDescribeAvailablePatchesPaginator(client DescribeAvailablePatchesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeAvailablePatchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeAvailablePatches page. @@ -251,7 +252,10 @@ func (p *DescribeAvailablePatchesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go b/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go index 28ef47cbfe3..e0dae360774 100644 --- a/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go +++ b/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go @@ -175,12 +175,13 @@ func NewDescribeEffectiveInstanceAssociationsPaginator(client DescribeEffectiveI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEffectiveInstanceAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEffectiveInstanceAssociations page. @@ -203,7 +204,10 @@ func (p *DescribeEffectiveInstanceAssociationsPaginator) NextPage(ctx context.Co prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go b/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go index 2faff35a8ea..5b95cca709b 100644 --- a/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go +++ b/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go @@ -174,12 +174,13 @@ func NewDescribeEffectivePatchesForPatchBaselinePaginator(client DescribeEffecti client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeEffectivePatchesForPatchBaselinePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeEffectivePatchesForPatchBaseline page. @@ -202,7 +203,10 @@ func (p *DescribeEffectivePatchesForPatchBaselinePaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeInstanceAssociationsStatus.go b/service/ssm/api_op_DescribeInstanceAssociationsStatus.go index 3e1be1fcc8e..b8ffb97d13b 100644 --- a/service/ssm/api_op_DescribeInstanceAssociationsStatus.go +++ b/service/ssm/api_op_DescribeInstanceAssociationsStatus.go @@ -175,12 +175,13 @@ func NewDescribeInstanceAssociationsStatusPaginator(client DescribeInstanceAssoc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceAssociationsStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceAssociationsStatus page. @@ -203,7 +204,10 @@ func (p *DescribeInstanceAssociationsStatusPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeInstanceInformation.go b/service/ssm/api_op_DescribeInstanceInformation.go index ac9c86c3462..087450f208f 100644 --- a/service/ssm/api_op_DescribeInstanceInformation.go +++ b/service/ssm/api_op_DescribeInstanceInformation.go @@ -189,12 +189,13 @@ func NewDescribeInstanceInformationPaginator(client DescribeInstanceInformationA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstanceInformationPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstanceInformation page. @@ -217,7 +218,10 @@ func (p *DescribeInstanceInformationPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeInstancePatchStates.go b/service/ssm/api_op_DescribeInstancePatchStates.go index 52bc967bbeb..a42e08aa045 100644 --- a/service/ssm/api_op_DescribeInstancePatchStates.go +++ b/service/ssm/api_op_DescribeInstancePatchStates.go @@ -174,12 +174,13 @@ func NewDescribeInstancePatchStatesPaginator(client DescribeInstancePatchStatesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstancePatchStatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstancePatchStates page. @@ -202,7 +203,10 @@ func (p *DescribeInstancePatchStatesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go b/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go index 7f25d654ee8..cd36eb32ba4 100644 --- a/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go +++ b/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go @@ -186,12 +186,13 @@ func NewDescribeInstancePatchStatesForPatchGroupPaginator(client DescribeInstanc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstancePatchStatesForPatchGroupPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstancePatchStatesForPatchGroup page. @@ -214,7 +215,10 @@ func (p *DescribeInstancePatchStatesForPatchGroupPaginator) NextPage(ctx context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeInstancePatches.go b/service/ssm/api_op_DescribeInstancePatches.go index 666e17e299c..09f0c5dfe53 100644 --- a/service/ssm/api_op_DescribeInstancePatches.go +++ b/service/ssm/api_op_DescribeInstancePatches.go @@ -204,12 +204,13 @@ func NewDescribeInstancePatchesPaginator(client DescribeInstancePatchesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInstancePatchesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInstancePatches page. @@ -232,7 +233,10 @@ func (p *DescribeInstancePatchesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeInventoryDeletions.go b/service/ssm/api_op_DescribeInventoryDeletions.go index fead6ebce55..1dcff6ae668 100644 --- a/service/ssm/api_op_DescribeInventoryDeletions.go +++ b/service/ssm/api_op_DescribeInventoryDeletions.go @@ -170,12 +170,13 @@ func NewDescribeInventoryDeletionsPaginator(client DescribeInventoryDeletionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeInventoryDeletionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeInventoryDeletions page. @@ -198,7 +199,10 @@ func (p *DescribeInventoryDeletionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go index 55918ec0d51..a72f12d866e 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go @@ -187,12 +187,13 @@ func NewDescribeMaintenanceWindowExecutionTaskInvocationsPaginator(client Descri client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowExecutionTaskInvocations @@ -216,7 +217,10 @@ func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) NextPage(ct prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go index e6f91e2b06f..3c2ee48007d 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go @@ -181,12 +181,13 @@ func NewDescribeMaintenanceWindowExecutionTasksPaginator(client DescribeMaintena client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowExecutionTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowExecutionTasks page. @@ -209,7 +210,10 @@ func (p *DescribeMaintenanceWindowExecutionTasksPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go index f2a7a0ca7ff..45a4e5dbed0 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go @@ -188,12 +188,13 @@ func NewDescribeMaintenanceWindowExecutionsPaginator(client DescribeMaintenanceW client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowExecutions page. @@ -216,7 +217,10 @@ func (p *DescribeMaintenanceWindowExecutionsPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go b/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go index 83a7081b728..63448e8978e 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go @@ -183,12 +183,13 @@ func NewDescribeMaintenanceWindowSchedulePaginator(client DescribeMaintenanceWin client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowSchedulePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowSchedule page. @@ -211,7 +212,10 @@ func (p *DescribeMaintenanceWindowSchedulePaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowTargets.go b/service/ssm/api_op_DescribeMaintenanceWindowTargets.go index c71768dc639..353f3b18fe3 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowTargets.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowTargets.go @@ -180,12 +180,13 @@ func NewDescribeMaintenanceWindowTargetsPaginator(client DescribeMaintenanceWind client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowTargetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowTargets page. @@ -208,7 +209,10 @@ func (p *DescribeMaintenanceWindowTargetsPaginator) NextPage(ctx context.Context prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowTasks.go b/service/ssm/api_op_DescribeMaintenanceWindowTasks.go index a2f42b39f00..56dd017c338 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowTasks.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowTasks.go @@ -183,12 +183,13 @@ func NewDescribeMaintenanceWindowTasksPaginator(client DescribeMaintenanceWindow client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowTasksPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowTasks page. @@ -211,7 +212,10 @@ func (p *DescribeMaintenanceWindowTasksPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindows.go b/service/ssm/api_op_DescribeMaintenanceWindows.go index 54d43d5421e..395a96bd4bb 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindows.go +++ b/service/ssm/api_op_DescribeMaintenanceWindows.go @@ -172,12 +172,13 @@ func NewDescribeMaintenanceWindowsPaginator(client DescribeMaintenanceWindowsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindows page. @@ -200,7 +201,10 @@ func (p *DescribeMaintenanceWindowsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go b/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go index 1d2ffb8ef2f..32a385fca6c 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go @@ -183,12 +183,13 @@ func NewDescribeMaintenanceWindowsForTargetPaginator(client DescribeMaintenanceW client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMaintenanceWindowsForTargetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMaintenanceWindowsForTarget page. @@ -211,7 +212,10 @@ func (p *DescribeMaintenanceWindowsForTargetPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeOpsItems.go b/service/ssm/api_op_DescribeOpsItems.go index b55108f651d..70de9f044ca 100644 --- a/service/ssm/api_op_DescribeOpsItems.go +++ b/service/ssm/api_op_DescribeOpsItems.go @@ -219,12 +219,13 @@ func NewDescribeOpsItemsPaginator(client DescribeOpsItemsAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeOpsItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeOpsItems page. @@ -251,7 +252,10 @@ func (p *DescribeOpsItemsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeParameters.go b/service/ssm/api_op_DescribeParameters.go index ee8eba94349..93d0ca2f86a 100644 --- a/service/ssm/api_op_DescribeParameters.go +++ b/service/ssm/api_op_DescribeParameters.go @@ -182,12 +182,13 @@ func NewDescribeParametersPaginator(client DescribeParametersAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeParametersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeParameters page. @@ -210,7 +211,10 @@ func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribePatchBaselines.go b/service/ssm/api_op_DescribePatchBaselines.go index 17ab7b1cff0..d90e287c4fb 100644 --- a/service/ssm/api_op_DescribePatchBaselines.go +++ b/service/ssm/api_op_DescribePatchBaselines.go @@ -175,12 +175,13 @@ func NewDescribePatchBaselinesPaginator(client DescribePatchBaselinesAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePatchBaselinesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePatchBaselines page. @@ -203,7 +204,10 @@ func (p *DescribePatchBaselinesPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribePatchGroups.go b/service/ssm/api_op_DescribePatchGroups.go index ea460fea548..5bad678dfb4 100644 --- a/service/ssm/api_op_DescribePatchGroups.go +++ b/service/ssm/api_op_DescribePatchGroups.go @@ -179,12 +179,13 @@ func NewDescribePatchGroupsPaginator(client DescribePatchGroupsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePatchGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePatchGroups page. @@ -207,7 +208,10 @@ func (p *DescribePatchGroupsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribePatchProperties.go b/service/ssm/api_op_DescribePatchProperties.go index 5ca3bbf611a..4df80a497ae 100644 --- a/service/ssm/api_op_DescribePatchProperties.go +++ b/service/ssm/api_op_DescribePatchProperties.go @@ -197,12 +197,13 @@ func NewDescribePatchPropertiesPaginator(client DescribePatchPropertiesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribePatchPropertiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribePatchProperties page. @@ -225,7 +226,10 @@ func (p *DescribePatchPropertiesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_DescribeSessions.go b/service/ssm/api_op_DescribeSessions.go index d8cb5afccd7..45eefd62ce1 100644 --- a/service/ssm/api_op_DescribeSessions.go +++ b/service/ssm/api_op_DescribeSessions.go @@ -176,12 +176,13 @@ func NewDescribeSessionsPaginator(client DescribeSessionsAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeSessions page. @@ -204,7 +205,10 @@ func (p *DescribeSessionsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_GetInventory.go b/service/ssm/api_op_GetInventory.go index ed6dbbd3459..d05865c2975 100644 --- a/service/ssm/api_op_GetInventory.go +++ b/service/ssm/api_op_GetInventory.go @@ -179,12 +179,13 @@ func NewGetInventoryPaginator(client GetInventoryAPIClient, params *GetInventory client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInventoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInventory page. @@ -207,7 +208,10 @@ func (p *GetInventoryPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_GetInventorySchema.go b/service/ssm/api_op_GetInventorySchema.go index 5cde9def3c7..f1c6e95bcbf 100644 --- a/service/ssm/api_op_GetInventorySchema.go +++ b/service/ssm/api_op_GetInventorySchema.go @@ -177,12 +177,13 @@ func NewGetInventorySchemaPaginator(client GetInventorySchemaAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInventorySchemaPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInventorySchema page. @@ -205,7 +206,10 @@ func (p *GetInventorySchemaPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_GetOpsSummary.go b/service/ssm/api_op_GetOpsSummary.go index a3c80222b8d..e28ffc08596 100644 --- a/service/ssm/api_op_GetOpsSummary.go +++ b/service/ssm/api_op_GetOpsSummary.go @@ -182,12 +182,13 @@ func NewGetOpsSummaryPaginator(client GetOpsSummaryAPIClient, params *GetOpsSumm client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetOpsSummaryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetOpsSummary page. @@ -210,7 +211,10 @@ func (p *GetOpsSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_GetParameterHistory.go b/service/ssm/api_op_GetParameterHistory.go index f1f40c1a9a7..0598f2afefb 100644 --- a/service/ssm/api_op_GetParameterHistory.go +++ b/service/ssm/api_op_GetParameterHistory.go @@ -180,12 +180,13 @@ func NewGetParameterHistoryPaginator(client GetParameterHistoryAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetParameterHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetParameterHistory page. @@ -208,7 +209,10 @@ func (p *GetParameterHistoryPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_GetParametersByPath.go b/service/ssm/api_op_GetParametersByPath.go index fd14a72cdd5..f2d4f19b5ad 100644 --- a/service/ssm/api_op_GetParametersByPath.go +++ b/service/ssm/api_op_GetParametersByPath.go @@ -198,12 +198,13 @@ func NewGetParametersByPathPaginator(client GetParametersByPathAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetParametersByPathPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetParametersByPath page. @@ -226,7 +227,10 @@ func (p *GetParametersByPathPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListAssociationVersions.go b/service/ssm/api_op_ListAssociationVersions.go index 10fbc90a8c1..16c0b7cdfac 100644 --- a/service/ssm/api_op_ListAssociationVersions.go +++ b/service/ssm/api_op_ListAssociationVersions.go @@ -174,12 +174,13 @@ func NewListAssociationVersionsPaginator(client ListAssociationVersionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociationVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociationVersions page. @@ -202,7 +203,10 @@ func (p *ListAssociationVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListAssociations.go b/service/ssm/api_op_ListAssociations.go index 588f2f0c6a5..745ba6cf5d6 100644 --- a/service/ssm/api_op_ListAssociations.go +++ b/service/ssm/api_op_ListAssociations.go @@ -177,12 +177,13 @@ func NewListAssociationsPaginator(client ListAssociationsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssociations page. @@ -205,7 +206,10 @@ func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListCommandInvocations.go b/service/ssm/api_op_ListCommandInvocations.go index cde59f2c150..d94b3828a4a 100644 --- a/service/ssm/api_op_ListCommandInvocations.go +++ b/service/ssm/api_op_ListCommandInvocations.go @@ -188,12 +188,13 @@ func NewListCommandInvocationsPaginator(client ListCommandInvocationsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCommandInvocationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCommandInvocations page. @@ -216,7 +217,10 @@ func (p *ListCommandInvocationsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListCommands.go b/service/ssm/api_op_ListCommands.go index 1f6697bac53..32b3b48bc2b 100644 --- a/service/ssm/api_op_ListCommands.go +++ b/service/ssm/api_op_ListCommands.go @@ -180,12 +180,13 @@ func NewListCommandsPaginator(client ListCommandsAPIClient, params *ListCommands client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCommandsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCommands page. @@ -208,7 +209,10 @@ func (p *ListCommandsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListComplianceItems.go b/service/ssm/api_op_ListComplianceItems.go index d6afcfdb44b..525589902e9 100644 --- a/service/ssm/api_op_ListComplianceItems.go +++ b/service/ssm/api_op_ListComplianceItems.go @@ -179,12 +179,13 @@ func NewListComplianceItemsPaginator(client ListComplianceItemsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComplianceItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComplianceItems page. @@ -207,7 +208,10 @@ func (p *ListComplianceItemsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListComplianceSummaries.go b/service/ssm/api_op_ListComplianceSummaries.go index 07ceb713809..ce7b8a67de0 100644 --- a/service/ssm/api_op_ListComplianceSummaries.go +++ b/service/ssm/api_op_ListComplianceSummaries.go @@ -176,12 +176,13 @@ func NewListComplianceSummariesPaginator(client ListComplianceSummariesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListComplianceSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListComplianceSummaries page. @@ -204,7 +205,10 @@ func (p *ListComplianceSummariesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListDocumentVersions.go b/service/ssm/api_op_ListDocumentVersions.go index 4c741d2e966..378240b849f 100644 --- a/service/ssm/api_op_ListDocumentVersions.go +++ b/service/ssm/api_op_ListDocumentVersions.go @@ -173,12 +173,13 @@ func NewListDocumentVersionsPaginator(client ListDocumentVersionsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDocumentVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDocumentVersions page. @@ -201,7 +202,10 @@ func (p *ListDocumentVersionsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListDocuments.go b/service/ssm/api_op_ListDocuments.go index 93bf6796045..806c15746d7 100644 --- a/service/ssm/api_op_ListDocuments.go +++ b/service/ssm/api_op_ListDocuments.go @@ -181,12 +181,13 @@ func NewListDocumentsPaginator(client ListDocumentsAPIClient, params *ListDocume client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDocumentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDocuments page. @@ -209,7 +210,10 @@ func (p *ListDocumentsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListOpsItemEvents.go b/service/ssm/api_op_ListOpsItemEvents.go index 96b799513da..5f95bbd7c29 100644 --- a/service/ssm/api_op_ListOpsItemEvents.go +++ b/service/ssm/api_op_ListOpsItemEvents.go @@ -172,12 +172,13 @@ func NewListOpsItemEventsPaginator(client ListOpsItemEventsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOpsItemEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOpsItemEvents page. @@ -204,7 +205,10 @@ func (p *ListOpsItemEventsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListOpsItemRelatedItems.go b/service/ssm/api_op_ListOpsItemRelatedItems.go index 7aab7a0f5c2..a9a825c94df 100644 --- a/service/ssm/api_op_ListOpsItemRelatedItems.go +++ b/service/ssm/api_op_ListOpsItemRelatedItems.go @@ -177,12 +177,13 @@ func NewListOpsItemRelatedItemsPaginator(client ListOpsItemRelatedItemsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOpsItemRelatedItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOpsItemRelatedItems page. @@ -209,7 +210,10 @@ func (p *ListOpsItemRelatedItemsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListOpsMetadata.go b/service/ssm/api_op_ListOpsMetadata.go index d65d54f16da..11283dd5ac3 100644 --- a/service/ssm/api_op_ListOpsMetadata.go +++ b/service/ssm/api_op_ListOpsMetadata.go @@ -171,12 +171,13 @@ func NewListOpsMetadataPaginator(client ListOpsMetadataAPIClient, params *ListOp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOpsMetadataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOpsMetadata page. @@ -199,7 +200,10 @@ func (p *ListOpsMetadataPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListResourceComplianceSummaries.go b/service/ssm/api_op_ListResourceComplianceSummaries.go index cc716dae9d8..11e522dfaaf 100644 --- a/service/ssm/api_op_ListResourceComplianceSummaries.go +++ b/service/ssm/api_op_ListResourceComplianceSummaries.go @@ -173,12 +173,13 @@ func NewListResourceComplianceSummariesPaginator(client ListResourceComplianceSu client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceComplianceSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceComplianceSummaries page. @@ -201,7 +202,10 @@ func (p *ListResourceComplianceSummariesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssm/api_op_ListResourceDataSync.go b/service/ssm/api_op_ListResourceDataSync.go index bf37d66e45b..9999f270bde 100644 --- a/service/ssm/api_op_ListResourceDataSync.go +++ b/service/ssm/api_op_ListResourceDataSync.go @@ -178,12 +178,13 @@ func NewListResourceDataSyncPaginator(client ListResourceDataSyncAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceDataSyncPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceDataSync page. @@ -206,7 +207,10 @@ func (p *ListResourceDataSyncPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmcontacts/api_op_ListContactChannels.go b/service/ssmcontacts/api_op_ListContactChannels.go index 45d4acf8865..16bb140b97c 100644 --- a/service/ssmcontacts/api_op_ListContactChannels.go +++ b/service/ssmcontacts/api_op_ListContactChannels.go @@ -171,12 +171,13 @@ func NewListContactChannelsPaginator(client ListContactChannelsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactChannelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContactChannels page. @@ -203,7 +204,10 @@ func (p *ListContactChannelsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmcontacts/api_op_ListContacts.go b/service/ssmcontacts/api_op_ListContacts.go index dbfcaeed013..be1118474c5 100644 --- a/service/ssmcontacts/api_op_ListContacts.go +++ b/service/ssmcontacts/api_op_ListContacts.go @@ -166,12 +166,13 @@ func NewListContactsPaginator(client ListContactsAPIClient, params *ListContacts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContactsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContacts page. @@ -198,7 +199,10 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmcontacts/api_op_ListEngagements.go b/service/ssmcontacts/api_op_ListEngagements.go index cbe9792cf99..cb25507baa5 100644 --- a/service/ssmcontacts/api_op_ListEngagements.go +++ b/service/ssmcontacts/api_op_ListEngagements.go @@ -169,12 +169,13 @@ func NewListEngagementsPaginator(client ListEngagementsAPIClient, params *ListEn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEngagementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEngagements page. @@ -201,7 +202,10 @@ func (p *ListEngagementsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmcontacts/api_op_ListPageReceipts.go b/service/ssmcontacts/api_op_ListPageReceipts.go index 89c6678b520..89009db686e 100644 --- a/service/ssmcontacts/api_op_ListPageReceipts.go +++ b/service/ssmcontacts/api_op_ListPageReceipts.go @@ -168,12 +168,13 @@ func NewListPageReceiptsPaginator(client ListPageReceiptsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPageReceiptsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPageReceipts page. @@ -200,7 +201,10 @@ func (p *ListPageReceiptsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmcontacts/api_op_ListPagesByContact.go b/service/ssmcontacts/api_op_ListPagesByContact.go index b3f12a0d549..c195bdb267e 100644 --- a/service/ssmcontacts/api_op_ListPagesByContact.go +++ b/service/ssmcontacts/api_op_ListPagesByContact.go @@ -174,12 +174,13 @@ func NewListPagesByContactPaginator(client ListPagesByContactAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPagesByContactPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPagesByContact page. @@ -206,7 +207,10 @@ func (p *ListPagesByContactPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmcontacts/api_op_ListPagesByEngagement.go b/service/ssmcontacts/api_op_ListPagesByEngagement.go index 43535e114b9..97b5e68decc 100644 --- a/service/ssmcontacts/api_op_ListPagesByEngagement.go +++ b/service/ssmcontacts/api_op_ListPagesByEngagement.go @@ -173,12 +173,13 @@ func NewListPagesByEngagementPaginator(client ListPagesByEngagementAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPagesByEngagementPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPagesByEngagement page. @@ -205,7 +206,10 @@ func (p *ListPagesByEngagementPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmincidents/api_op_GetResourcePolicies.go b/service/ssmincidents/api_op_GetResourcePolicies.go index f3b6ae850d9..e781aec3835 100644 --- a/service/ssmincidents/api_op_GetResourcePolicies.go +++ b/service/ssmincidents/api_op_GetResourcePolicies.go @@ -172,12 +172,13 @@ func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetResourcePoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetResourcePolicies page. @@ -204,7 +205,10 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmincidents/api_op_ListIncidentRecords.go b/service/ssmincidents/api_op_ListIncidentRecords.go index 95cd7535866..5e87a6e9b51 100644 --- a/service/ssmincidents/api_op_ListIncidentRecords.go +++ b/service/ssmincidents/api_op_ListIncidentRecords.go @@ -192,12 +192,13 @@ func NewListIncidentRecordsPaginator(client ListIncidentRecordsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIncidentRecordsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIncidentRecords page. @@ -224,7 +225,10 @@ func (p *ListIncidentRecordsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmincidents/api_op_ListRelatedItems.go b/service/ssmincidents/api_op_ListRelatedItems.go index 95d7565fe02..b3a07dca111 100644 --- a/service/ssmincidents/api_op_ListRelatedItems.go +++ b/service/ssmincidents/api_op_ListRelatedItems.go @@ -171,12 +171,13 @@ func NewListRelatedItemsPaginator(client ListRelatedItemsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRelatedItemsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRelatedItems page. @@ -203,7 +204,10 @@ func (p *ListRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmincidents/api_op_ListReplicationSets.go b/service/ssmincidents/api_op_ListReplicationSets.go index 2a2032356ce..4731a825172 100644 --- a/service/ssmincidents/api_op_ListReplicationSets.go +++ b/service/ssmincidents/api_op_ListReplicationSets.go @@ -162,12 +162,13 @@ func NewListReplicationSetsPaginator(client ListReplicationSetsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListReplicationSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListReplicationSets page. @@ -194,7 +195,10 @@ func (p *ListReplicationSetsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmincidents/api_op_ListResponsePlans.go b/service/ssmincidents/api_op_ListResponsePlans.go index 6572be76b45..c63a6d0d303 100644 --- a/service/ssmincidents/api_op_ListResponsePlans.go +++ b/service/ssmincidents/api_op_ListResponsePlans.go @@ -162,12 +162,13 @@ func NewListResponsePlansPaginator(client ListResponsePlansAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResponsePlansPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResponsePlans page. @@ -194,7 +195,10 @@ func (p *ListResponsePlansPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssmincidents/api_op_ListTimelineEvents.go b/service/ssmincidents/api_op_ListTimelineEvents.go index a4315a661d0..78aac74002e 100644 --- a/service/ssmincidents/api_op_ListTimelineEvents.go +++ b/service/ssmincidents/api_op_ListTimelineEvents.go @@ -198,12 +198,13 @@ func NewListTimelineEventsPaginator(client ListTimelineEventsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTimelineEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTimelineEvents page. @@ -230,7 +231,10 @@ func (p *ListTimelineEventsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sso/api_op_ListAccountRoles.go b/service/sso/api_op_ListAccountRoles.go index 3d0787745f2..1923c4a9d6b 100644 --- a/service/sso/api_op_ListAccountRoles.go +++ b/service/sso/api_op_ListAccountRoles.go @@ -171,12 +171,13 @@ func NewListAccountRolesPaginator(client ListAccountRolesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountRolesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountRoles page. @@ -203,7 +204,10 @@ func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/sso/api_op_ListAccounts.go b/service/sso/api_op_ListAccounts.go index 0b32de25aab..c76f6ca38d1 100644 --- a/service/sso/api_op_ListAccounts.go +++ b/service/sso/api_op_ListAccounts.go @@ -168,12 +168,13 @@ func NewListAccountsPaginator(client ListAccountsAPIClient, params *ListAccounts client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccounts page. @@ -200,7 +201,10 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go b/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go index b81570e7ff0..6cda246d265 100644 --- a/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go +++ b/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go @@ -179,12 +179,13 @@ func NewListAccountAssignmentCreationStatusPaginator(client ListAccountAssignmen client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountAssignmentCreationStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountAssignmentCreationStatus page. @@ -211,7 +212,10 @@ func (p *ListAccountAssignmentCreationStatusPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go b/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go index d85464be04f..743f5529a72 100644 --- a/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go +++ b/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go @@ -179,12 +179,13 @@ func NewListAccountAssignmentDeletionStatusPaginator(client ListAccountAssignmen client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountAssignmentDeletionStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountAssignmentDeletionStatus page. @@ -211,7 +212,10 @@ func (p *ListAccountAssignmentDeletionStatusPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListAccountAssignments.go b/service/ssoadmin/api_op_ListAccountAssignments.go index 3219bd88958..8722e2c6ea6 100644 --- a/service/ssoadmin/api_op_ListAccountAssignments.go +++ b/service/ssoadmin/api_op_ListAccountAssignments.go @@ -186,12 +186,13 @@ func NewListAccountAssignmentsPaginator(client ListAccountAssignmentsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountAssignmentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountAssignments page. @@ -218,7 +219,10 @@ func (p *ListAccountAssignmentsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go b/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go index 3b287050fa1..e4c3edffb49 100644 --- a/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go +++ b/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go @@ -185,12 +185,13 @@ func NewListAccountsForProvisionedPermissionSetPaginator(client ListAccountsForP client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccountsForProvisionedPermissionSetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccountsForProvisionedPermissionSet page. @@ -217,7 +218,10 @@ func (p *ListAccountsForProvisionedPermissionSetPaginator) NextPage(ctx context. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListInstances.go b/service/ssoadmin/api_op_ListInstances.go index 79fc9ee1daf..7d7dc038b10 100644 --- a/service/ssoadmin/api_op_ListInstances.go +++ b/service/ssoadmin/api_op_ListInstances.go @@ -161,12 +161,13 @@ func NewListInstancesPaginator(client ListInstancesAPIClient, params *ListInstan client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListInstancesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListInstances page. @@ -193,7 +194,10 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go b/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go index e5158fadae6..ba531bdc96b 100644 --- a/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go +++ b/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go @@ -180,12 +180,13 @@ func NewListManagedPoliciesInPermissionSetPaginator(client ListManagedPoliciesIn client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListManagedPoliciesInPermissionSetPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListManagedPoliciesInPermissionSet page. @@ -212,7 +213,10 @@ func (p *ListManagedPoliciesInPermissionSetPaginator) NextPage(ctx context.Conte prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go b/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go index 4172e0ccdd1..ace2f591843 100644 --- a/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go +++ b/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go @@ -179,12 +179,13 @@ func NewListPermissionSetProvisioningStatusPaginator(client ListPermissionSetPro client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionSetProvisioningStatusPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissionSetProvisioningStatus page. @@ -211,7 +212,10 @@ func (p *ListPermissionSetProvisioningStatusPaginator) NextPage(ctx context.Cont prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListPermissionSets.go b/service/ssoadmin/api_op_ListPermissionSets.go index 44a3dbcdf20..10ff104c1a6 100644 --- a/service/ssoadmin/api_op_ListPermissionSets.go +++ b/service/ssoadmin/api_op_ListPermissionSets.go @@ -172,12 +172,13 @@ func NewListPermissionSetsPaginator(client ListPermissionSetsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionSetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissionSets page. @@ -204,7 +205,10 @@ func (p *ListPermissionSetsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go b/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go index 53a2f6e4b95..1ea9925ce79 100644 --- a/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go +++ b/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go @@ -185,12 +185,13 @@ func NewListPermissionSetsProvisionedToAccountPaginator(client ListPermissionSet client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPermissionSetsProvisionedToAccountPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPermissionSetsProvisionedToAccount page. @@ -217,7 +218,10 @@ func (p *ListPermissionSetsProvisionedToAccountPaginator) NextPage(ctx context.C prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/ssoadmin/api_op_ListTagsForResource.go b/service/ssoadmin/api_op_ListTagsForResource.go index 99590854337..4fe75ffe743 100644 --- a/service/ssoadmin/api_op_ListTagsForResource.go +++ b/service/ssoadmin/api_op_ListTagsForResource.go @@ -169,12 +169,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -195,7 +196,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_DescribeTapeArchives.go b/service/storagegateway/api_op_DescribeTapeArchives.go index 69a39d32c8c..5238d4550f1 100644 --- a/service/storagegateway/api_op_DescribeTapeArchives.go +++ b/service/storagegateway/api_op_DescribeTapeArchives.go @@ -181,12 +181,13 @@ func NewDescribeTapeArchivesPaginator(client DescribeTapeArchivesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTapeArchivesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTapeArchives page. @@ -213,7 +214,10 @@ func (p *DescribeTapeArchivesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go b/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go index cad4f73e0a1..c9b032440ff 100644 --- a/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go +++ b/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go @@ -189,12 +189,13 @@ func NewDescribeTapeRecoveryPointsPaginator(client DescribeTapeRecoveryPointsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTapeRecoveryPointsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTapeRecoveryPoints page. @@ -221,7 +222,10 @@ func (p *DescribeTapeRecoveryPointsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_DescribeTapes.go b/service/storagegateway/api_op_DescribeTapes.go index 42c5798c2ca..a36de24469c 100644 --- a/service/storagegateway/api_op_DescribeTapes.go +++ b/service/storagegateway/api_op_DescribeTapes.go @@ -185,12 +185,13 @@ func NewDescribeTapesPaginator(client DescribeTapesAPIClient, params *DescribeTa client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeTapesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeTapes page. @@ -217,7 +218,10 @@ func (p *DescribeTapesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_DescribeVTLDevices.go b/service/storagegateway/api_op_DescribeVTLDevices.go index 4a9fc97dc20..5023331be99 100644 --- a/service/storagegateway/api_op_DescribeVTLDevices.go +++ b/service/storagegateway/api_op_DescribeVTLDevices.go @@ -191,12 +191,13 @@ func NewDescribeVTLDevicesPaginator(client DescribeVTLDevicesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeVTLDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeVTLDevices page. @@ -223,7 +224,10 @@ func (p *DescribeVTLDevicesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListFileShares.go b/service/storagegateway/api_op_ListFileShares.go index 8ab3d536d40..256437df4c4 100644 --- a/service/storagegateway/api_op_ListFileShares.go +++ b/service/storagegateway/api_op_ListFileShares.go @@ -178,12 +178,13 @@ func NewListFileSharesPaginator(client ListFileSharesAPIClient, params *ListFile client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFileSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFileShares page. @@ -210,7 +211,10 @@ func (p *ListFileSharesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListFileSystemAssociations.go b/service/storagegateway/api_op_ListFileSystemAssociations.go index 9006b8fb85e..ffd86796e3a 100644 --- a/service/storagegateway/api_op_ListFileSystemAssociations.go +++ b/service/storagegateway/api_op_ListFileSystemAssociations.go @@ -178,12 +178,13 @@ func NewListFileSystemAssociationsPaginator(client ListFileSystemAssociationsAPI client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFileSystemAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFileSystemAssociations page. @@ -210,7 +211,10 @@ func (p *ListFileSystemAssociationsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextMarker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListGateways.go b/service/storagegateway/api_op_ListGateways.go index 7b78b36b9b4..25993325bfe 100644 --- a/service/storagegateway/api_op_ListGateways.go +++ b/service/storagegateway/api_op_ListGateways.go @@ -177,12 +177,13 @@ func NewListGatewaysPaginator(client ListGatewaysAPIClient, params *ListGateways client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGatewaysPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGateways page. @@ -209,7 +210,10 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListTagsForResource.go b/service/storagegateway/api_op_ListTagsForResource.go index d5e00604837..fcbf19fa052 100644 --- a/service/storagegateway/api_op_ListTagsForResource.go +++ b/service/storagegateway/api_op_ListTagsForResource.go @@ -179,12 +179,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -211,7 +212,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListTapePools.go b/service/storagegateway/api_op_ListTapePools.go index 7e7740bd602..22637fbefa5 100644 --- a/service/storagegateway/api_op_ListTapePools.go +++ b/service/storagegateway/api_op_ListTapePools.go @@ -176,12 +176,13 @@ func NewListTapePoolsPaginator(client ListTapePoolsAPIClient, params *ListTapePo client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTapePoolsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTapePools page. @@ -208,7 +209,10 @@ func (p *ListTapePoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListTapes.go b/service/storagegateway/api_op_ListTapes.go index ea680408952..e265b7f425d 100644 --- a/service/storagegateway/api_op_ListTapes.go +++ b/service/storagegateway/api_op_ListTapes.go @@ -192,12 +192,13 @@ func NewListTapesPaginator(client ListTapesAPIClient, params *ListTapesInput, op client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTapesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTapes page. @@ -224,7 +225,10 @@ func (p *ListTapesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/storagegateway/api_op_ListVolumes.go b/service/storagegateway/api_op_ListVolumes.go index f4efb7b4535..67430b4ba10 100644 --- a/service/storagegateway/api_op_ListVolumes.go +++ b/service/storagegateway/api_op_ListVolumes.go @@ -195,12 +195,13 @@ func NewListVolumesPaginator(client ListVolumesAPIClient, params *ListVolumesInp client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVolumesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVolumes page. @@ -227,7 +228,10 @@ func (p *ListVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/support/api_op_DescribeCases.go b/service/support/api_op_DescribeCases.go index 1d6abeb7c41..f3bc4e5fb16 100644 --- a/service/support/api_op_DescribeCases.go +++ b/service/support/api_op_DescribeCases.go @@ -214,12 +214,13 @@ func NewDescribeCasesPaginator(client DescribeCasesAPIClient, params *DescribeCa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCases page. @@ -246,7 +247,10 @@ func (p *DescribeCasesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/support/api_op_DescribeCommunications.go b/service/support/api_op_DescribeCommunications.go index 898a57331e9..8b28014fdc2 100644 --- a/service/support/api_op_DescribeCommunications.go +++ b/service/support/api_op_DescribeCommunications.go @@ -196,12 +196,13 @@ func NewDescribeCommunicationsPaginator(client DescribeCommunicationsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCommunicationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCommunications page. @@ -228,7 +229,10 @@ func (p *DescribeCommunicationsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_GetWorkflowExecutionHistory.go b/service/swf/api_op_GetWorkflowExecutionHistory.go index b551207aacd..2407c1cfde0 100644 --- a/service/swf/api_op_GetWorkflowExecutionHistory.go +++ b/service/swf/api_op_GetWorkflowExecutionHistory.go @@ -219,12 +219,13 @@ func NewGetWorkflowExecutionHistoryPaginator(client GetWorkflowExecutionHistoryA client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetWorkflowExecutionHistoryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetWorkflowExecutionHistory page. @@ -247,7 +248,10 @@ func (p *GetWorkflowExecutionHistoryPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_ListActivityTypes.go b/service/swf/api_op_ListActivityTypes.go index 3fd7789d56d..9b9bb74c52e 100644 --- a/service/swf/api_op_ListActivityTypes.go +++ b/service/swf/api_op_ListActivityTypes.go @@ -218,12 +218,13 @@ func NewListActivityTypesPaginator(client ListActivityTypesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListActivityTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListActivityTypes page. @@ -246,7 +247,10 @@ func (p *ListActivityTypesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_ListClosedWorkflowExecutions.go b/service/swf/api_op_ListClosedWorkflowExecutions.go index b071dce13e4..6526db0b25e 100644 --- a/service/swf/api_op_ListClosedWorkflowExecutions.go +++ b/service/swf/api_op_ListClosedWorkflowExecutions.go @@ -260,12 +260,13 @@ func NewListClosedWorkflowExecutionsPaginator(client ListClosedWorkflowExecution client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListClosedWorkflowExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListClosedWorkflowExecutions page. @@ -288,7 +289,10 @@ func (p *ListClosedWorkflowExecutionsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_ListDomains.go b/service/swf/api_op_ListDomains.go index 22a578e3568..4a1506a41a4 100644 --- a/service/swf/api_op_ListDomains.go +++ b/service/swf/api_op_ListDomains.go @@ -210,12 +210,13 @@ func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInp client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomains page. @@ -238,7 +239,10 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_ListOpenWorkflowExecutions.go b/service/swf/api_op_ListOpenWorkflowExecutions.go index a7ba71ffa55..a02f5d282a0 100644 --- a/service/swf/api_op_ListOpenWorkflowExecutions.go +++ b/service/swf/api_op_ListOpenWorkflowExecutions.go @@ -243,12 +243,13 @@ func NewListOpenWorkflowExecutionsPaginator(client ListOpenWorkflowExecutionsAPI client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOpenWorkflowExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOpenWorkflowExecutions page. @@ -271,7 +272,10 @@ func (p *ListOpenWorkflowExecutionsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_ListWorkflowTypes.go b/service/swf/api_op_ListWorkflowTypes.go index 382026f3e6a..f9a657a5525 100644 --- a/service/swf/api_op_ListWorkflowTypes.go +++ b/service/swf/api_op_ListWorkflowTypes.go @@ -215,12 +215,13 @@ func NewListWorkflowTypesPaginator(client ListWorkflowTypesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkflowTypesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkflowTypes page. @@ -243,7 +244,10 @@ func (p *ListWorkflowTypesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/swf/api_op_PollForDecisionTask.go b/service/swf/api_op_PollForDecisionTask.go index 40d192a6785..c5a03430526 100644 --- a/service/swf/api_op_PollForDecisionTask.go +++ b/service/swf/api_op_PollForDecisionTask.go @@ -272,12 +272,13 @@ func NewPollForDecisionTaskPaginator(client PollForDecisionTaskAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextPageToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *PollForDecisionTaskPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next PollForDecisionTask page. @@ -300,7 +301,10 @@ func (p *PollForDecisionTaskPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextPageToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/synthetics/api_op_DescribeCanaries.go b/service/synthetics/api_op_DescribeCanaries.go index 0c903d8dcfd..5d59fb7c56c 100644 --- a/service/synthetics/api_op_DescribeCanaries.go +++ b/service/synthetics/api_op_DescribeCanaries.go @@ -171,12 +171,13 @@ func NewDescribeCanariesPaginator(client DescribeCanariesAPIClient, params *Desc client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCanariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCanaries page. @@ -203,7 +204,10 @@ func (p *DescribeCanariesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/synthetics/api_op_DescribeCanariesLastRun.go b/service/synthetics/api_op_DescribeCanariesLastRun.go index 3a3483debcc..e1ff7f918a0 100644 --- a/service/synthetics/api_op_DescribeCanariesLastRun.go +++ b/service/synthetics/api_op_DescribeCanariesLastRun.go @@ -170,12 +170,13 @@ func NewDescribeCanariesLastRunPaginator(client DescribeCanariesLastRunAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeCanariesLastRunPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeCanariesLastRun page. @@ -202,7 +203,10 @@ func (p *DescribeCanariesLastRunPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/synthetics/api_op_DescribeRuntimeVersions.go b/service/synthetics/api_op_DescribeRuntimeVersions.go index 9208f2e18b6..7d7c203c9ce 100644 --- a/service/synthetics/api_op_DescribeRuntimeVersions.go +++ b/service/synthetics/api_op_DescribeRuntimeVersions.go @@ -173,12 +173,13 @@ func NewDescribeRuntimeVersionsPaginator(client DescribeRuntimeVersionsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeRuntimeVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeRuntimeVersions page. @@ -205,7 +206,10 @@ func (p *DescribeRuntimeVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/synthetics/api_op_GetCanaryRuns.go b/service/synthetics/api_op_GetCanaryRuns.go index e11aa2620c8..55278ec7d91 100644 --- a/service/synthetics/api_op_GetCanaryRuns.go +++ b/service/synthetics/api_op_GetCanaryRuns.go @@ -172,12 +172,13 @@ func NewGetCanaryRunsPaginator(client GetCanaryRunsAPIClient, params *GetCanaryR client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetCanaryRunsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetCanaryRuns page. @@ -204,7 +205,10 @@ func (p *GetCanaryRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/timestreamquery/api_op_ListScheduledQueries.go b/service/timestreamquery/api_op_ListScheduledQueries.go index aa0cdf44cd1..97aaa014f53 100644 --- a/service/timestreamquery/api_op_ListScheduledQueries.go +++ b/service/timestreamquery/api_op_ListScheduledQueries.go @@ -224,12 +224,13 @@ func NewListScheduledQueriesPaginator(client ListScheduledQueriesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListScheduledQueriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListScheduledQueries page. @@ -256,7 +257,10 @@ func (p *ListScheduledQueriesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/timestreamquery/api_op_ListTagsForResource.go b/service/timestreamquery/api_op_ListTagsForResource.go index 5c4d17886c0..861810cba1a 100644 --- a/service/timestreamquery/api_op_ListTagsForResource.go +++ b/service/timestreamquery/api_op_ListTagsForResource.go @@ -226,12 +226,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -258,7 +259,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/timestreamquery/api_op_Query.go b/service/timestreamquery/api_op_Query.go index e77466db15a..cb00ba10c39 100644 --- a/service/timestreamquery/api_op_Query.go +++ b/service/timestreamquery/api_op_Query.go @@ -342,12 +342,13 @@ func NewQueryPaginator(client QueryAPIClient, params *QueryInput, optFns ...func client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *QueryPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next Query page. @@ -374,7 +375,10 @@ func (p *QueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/timestreamwrite/api_op_ListDatabases.go b/service/timestreamwrite/api_op_ListDatabases.go index f619b5aaaf3..060b3a5032b 100644 --- a/service/timestreamwrite/api_op_ListDatabases.go +++ b/service/timestreamwrite/api_op_ListDatabases.go @@ -223,12 +223,13 @@ func NewListDatabasesPaginator(client ListDatabasesAPIClient, params *ListDataba client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDatabasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDatabases page. @@ -255,7 +256,10 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/timestreamwrite/api_op_ListTables.go b/service/timestreamwrite/api_op_ListTables.go index 66b813238f8..a8b0c1bf7c5 100644 --- a/service/timestreamwrite/api_op_ListTables.go +++ b/service/timestreamwrite/api_op_ListTables.go @@ -226,12 +226,13 @@ func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTablesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTables page. @@ -258,7 +259,10 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListCallAnalyticsCategories.go b/service/transcribe/api_op_ListCallAnalyticsCategories.go index e10c28cfb30..6448d06d18e 100644 --- a/service/transcribe/api_op_ListCallAnalyticsCategories.go +++ b/service/transcribe/api_op_ListCallAnalyticsCategories.go @@ -174,12 +174,13 @@ func NewListCallAnalyticsCategoriesPaginator(client ListCallAnalyticsCategoriesA client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCallAnalyticsCategoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCallAnalyticsCategories page. @@ -206,7 +207,10 @@ func (p *ListCallAnalyticsCategoriesPaginator) NextPage(ctx context.Context, opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListCallAnalyticsJobs.go b/service/transcribe/api_op_ListCallAnalyticsJobs.go index bc4ffc2f030..2e3b6205b9c 100644 --- a/service/transcribe/api_op_ListCallAnalyticsJobs.go +++ b/service/transcribe/api_op_ListCallAnalyticsJobs.go @@ -186,12 +186,13 @@ func NewListCallAnalyticsJobsPaginator(client ListCallAnalyticsJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListCallAnalyticsJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListCallAnalyticsJobs page. @@ -218,7 +219,10 @@ func (p *ListCallAnalyticsJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListLanguageModels.go b/service/transcribe/api_op_ListLanguageModels.go index 138a91c298a..181aed237a6 100644 --- a/service/transcribe/api_op_ListLanguageModels.go +++ b/service/transcribe/api_op_ListLanguageModels.go @@ -182,12 +182,13 @@ func NewListLanguageModelsPaginator(client ListLanguageModelsAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLanguageModelsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLanguageModels page. @@ -214,7 +215,10 @@ func (p *ListLanguageModelsPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListMedicalTranscriptionJobs.go b/service/transcribe/api_op_ListMedicalTranscriptionJobs.go index fc7382b5a17..c256743e41c 100644 --- a/service/transcribe/api_op_ListMedicalTranscriptionJobs.go +++ b/service/transcribe/api_op_ListMedicalTranscriptionJobs.go @@ -186,12 +186,13 @@ func NewListMedicalTranscriptionJobsPaginator(client ListMedicalTranscriptionJob client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMedicalTranscriptionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMedicalTranscriptionJobs page. @@ -218,7 +219,10 @@ func (p *ListMedicalTranscriptionJobsPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListMedicalVocabularies.go b/service/transcribe/api_op_ListMedicalVocabularies.go index 67890f1ecc8..f0ed3194c1c 100644 --- a/service/transcribe/api_op_ListMedicalVocabularies.go +++ b/service/transcribe/api_op_ListMedicalVocabularies.go @@ -188,12 +188,13 @@ func NewListMedicalVocabulariesPaginator(client ListMedicalVocabulariesAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMedicalVocabulariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMedicalVocabularies page. @@ -220,7 +221,10 @@ func (p *ListMedicalVocabulariesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListTranscriptionJobs.go b/service/transcribe/api_op_ListTranscriptionJobs.go index 8e87e924c06..db6bcb72556 100644 --- a/service/transcribe/api_op_ListTranscriptionJobs.go +++ b/service/transcribe/api_op_ListTranscriptionJobs.go @@ -183,12 +183,13 @@ func NewListTranscriptionJobsPaginator(client ListTranscriptionJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTranscriptionJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTranscriptionJobs page. @@ -215,7 +216,10 @@ func (p *ListTranscriptionJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListVocabularies.go b/service/transcribe/api_op_ListVocabularies.go index 34d22c872ef..de0ba289359 100644 --- a/service/transcribe/api_op_ListVocabularies.go +++ b/service/transcribe/api_op_ListVocabularies.go @@ -184,12 +184,13 @@ func NewListVocabulariesPaginator(client ListVocabulariesAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVocabulariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVocabularies page. @@ -216,7 +217,10 @@ func (p *ListVocabulariesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transcribe/api_op_ListVocabularyFilters.go b/service/transcribe/api_op_ListVocabularyFilters.go index 6caf323300a..bcd86560469 100644 --- a/service/transcribe/api_op_ListVocabularyFilters.go +++ b/service/transcribe/api_op_ListVocabularyFilters.go @@ -177,12 +177,13 @@ func NewListVocabularyFiltersPaginator(client ListVocabularyFiltersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListVocabularyFiltersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListVocabularyFilters page. @@ -209,7 +210,10 @@ func (p *ListVocabularyFiltersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListAccesses.go b/service/transfer/api_op_ListAccesses.go index 5b983c3bfdd..cfef5a075e4 100644 --- a/service/transfer/api_op_ListAccesses.go +++ b/service/transfer/api_op_ListAccesses.go @@ -179,12 +179,13 @@ func NewListAccessesPaginator(client ListAccessesAPIClient, params *ListAccesses client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccesses page. @@ -211,7 +212,10 @@ func (p *ListAccessesPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListExecutions.go b/service/transfer/api_op_ListExecutions.go index 5cd171911b9..e859de1318b 100644 --- a/service/transfer/api_op_ListExecutions.go +++ b/service/transfer/api_op_ListExecutions.go @@ -200,12 +200,13 @@ func NewListExecutionsPaginator(client ListExecutionsAPIClient, params *ListExec client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExecutionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExecutions page. @@ -232,7 +233,10 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListSecurityPolicies.go b/service/transfer/api_op_ListSecurityPolicies.go index e0ad3757c7b..a98461226be 100644 --- a/service/transfer/api_op_ListSecurityPolicies.go +++ b/service/transfer/api_op_ListSecurityPolicies.go @@ -170,12 +170,13 @@ func NewListSecurityPoliciesPaginator(client ListSecurityPoliciesAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSecurityPoliciesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSecurityPolicies page. @@ -202,7 +203,10 @@ func (p *ListSecurityPoliciesPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListServers.go b/service/transfer/api_op_ListServers.go index db5c3cece79..c60ed42b79f 100644 --- a/service/transfer/api_op_ListServers.go +++ b/service/transfer/api_op_ListServers.go @@ -168,12 +168,13 @@ func NewListServersPaginator(client ListServersAPIClient, params *ListServersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListServersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListServers page. @@ -200,7 +201,10 @@ func (p *ListServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListTagsForResource.go b/service/transfer/api_op_ListTagsForResource.go index a54c381adfb..acff29050a8 100644 --- a/service/transfer/api_op_ListTagsForResource.go +++ b/service/transfer/api_op_ListTagsForResource.go @@ -182,12 +182,13 @@ func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. @@ -214,7 +215,10 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListUsers.go b/service/transfer/api_op_ListUsers.go index 3bc428194f5..c9b5b4502ab 100644 --- a/service/transfer/api_op_ListUsers.go +++ b/service/transfer/api_op_ListUsers.go @@ -180,12 +180,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -212,7 +213,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/transfer/api_op_ListWorkflows.go b/service/transfer/api_op_ListWorkflows.go index 9bad52fba93..73433f42713 100644 --- a/service/transfer/api_op_ListWorkflows.go +++ b/service/transfer/api_op_ListWorkflows.go @@ -165,12 +165,13 @@ func NewListWorkflowsPaginator(client ListWorkflowsAPIClient, params *ListWorkfl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkflowsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkflows page. @@ -197,7 +198,10 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/translate/api_op_ListParallelData.go b/service/translate/api_op_ListParallelData.go index 93964fc5536..9c1c41ff599 100644 --- a/service/translate/api_op_ListParallelData.go +++ b/service/translate/api_op_ListParallelData.go @@ -162,12 +162,13 @@ func NewListParallelDataPaginator(client ListParallelDataAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListParallelDataPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListParallelData page. @@ -194,7 +195,10 @@ func (p *ListParallelDataPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/translate/api_op_ListTerminologies.go b/service/translate/api_op_ListTerminologies.go index 92dd27fd9e2..2968ea9b847 100644 --- a/service/translate/api_op_ListTerminologies.go +++ b/service/translate/api_op_ListTerminologies.go @@ -162,12 +162,13 @@ func NewListTerminologiesPaginator(client ListTerminologiesAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTerminologiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTerminologies page. @@ -194,7 +195,10 @@ func (p *ListTerminologiesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/translate/api_op_ListTextTranslationJobs.go b/service/translate/api_op_ListTextTranslationJobs.go index 549f184dfcb..37b4d497011 100644 --- a/service/translate/api_op_ListTextTranslationJobs.go +++ b/service/translate/api_op_ListTextTranslationJobs.go @@ -168,12 +168,13 @@ func NewListTextTranslationJobsPaginator(client ListTextTranslationJobsAPIClient client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTextTranslationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTextTranslationJobs page. @@ -200,7 +201,10 @@ func (p *ListTextTranslationJobsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/voiceid/api_op_ListDomains.go b/service/voiceid/api_op_ListDomains.go index 7308478d32e..82893967905 100644 --- a/service/voiceid/api_op_ListDomains.go +++ b/service/voiceid/api_op_ListDomains.go @@ -169,12 +169,13 @@ func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomains page. @@ -201,7 +202,10 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/voiceid/api_op_ListFraudsterRegistrationJobs.go b/service/voiceid/api_op_ListFraudsterRegistrationJobs.go index 925df544ed8..802fd6c603e 100644 --- a/service/voiceid/api_op_ListFraudsterRegistrationJobs.go +++ b/service/voiceid/api_op_ListFraudsterRegistrationJobs.go @@ -186,12 +186,13 @@ func NewListFraudsterRegistrationJobsPaginator(client ListFraudsterRegistrationJ client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFraudsterRegistrationJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFraudsterRegistrationJobs page. @@ -218,7 +219,10 @@ func (p *ListFraudsterRegistrationJobsPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go b/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go index fda41383b28..6f58a5a1625 100644 --- a/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go +++ b/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go @@ -185,12 +185,13 @@ func NewListSpeakerEnrollmentJobsPaginator(client ListSpeakerEnrollmentJobsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSpeakerEnrollmentJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSpeakerEnrollmentJobs page. @@ -217,7 +218,10 @@ func (p *ListSpeakerEnrollmentJobsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/voiceid/api_op_ListSpeakers.go b/service/voiceid/api_op_ListSpeakers.go index 81bf83baa3a..f750bdc1375 100644 --- a/service/voiceid/api_op_ListSpeakers.go +++ b/service/voiceid/api_op_ListSpeakers.go @@ -177,12 +177,13 @@ func NewListSpeakersPaginator(client ListSpeakersAPIClient, params *ListSpeakers client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSpeakersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSpeakers page. @@ -209,7 +210,10 @@ func (p *ListSpeakersPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListAnswers.go b/service/wellarchitected/api_op_ListAnswers.go index be2d128e4f7..66cc4e33688 100644 --- a/service/wellarchitected/api_op_ListAnswers.go +++ b/service/wellarchitected/api_op_ListAnswers.go @@ -197,12 +197,13 @@ func NewListAnswersPaginator(client ListAnswersAPIClient, params *ListAnswersInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAnswersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAnswers page. @@ -225,7 +226,10 @@ func (p *ListAnswersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListLensReviewImprovements.go b/service/wellarchitected/api_op_ListLensReviewImprovements.go index bccbab2ce7e..563f39c7aa9 100644 --- a/service/wellarchitected/api_op_ListLensReviewImprovements.go +++ b/service/wellarchitected/api_op_ListLensReviewImprovements.go @@ -201,12 +201,13 @@ func NewListLensReviewImprovementsPaginator(client ListLensReviewImprovementsAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLensReviewImprovementsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLensReviewImprovements page. @@ -229,7 +230,10 @@ func (p *ListLensReviewImprovementsPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListLensReviews.go b/service/wellarchitected/api_op_ListLensReviews.go index 4a1594dee61..5df0426cd35 100644 --- a/service/wellarchitected/api_op_ListLensReviews.go +++ b/service/wellarchitected/api_op_ListLensReviews.go @@ -181,12 +181,13 @@ func NewListLensReviewsPaginator(client ListLensReviewsAPIClient, params *ListLe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLensReviewsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLensReviews page. @@ -209,7 +210,10 @@ func (p *ListLensReviewsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListLensShares.go b/service/wellarchitected/api_op_ListLensShares.go index cef24ebbf6b..211564f0233 100644 --- a/service/wellarchitected/api_op_ListLensShares.go +++ b/service/wellarchitected/api_op_ListLensShares.go @@ -172,12 +172,13 @@ func NewListLensSharesPaginator(client ListLensSharesAPIClient, params *ListLens client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLensSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLensShares page. @@ -200,7 +201,10 @@ func (p *ListLensSharesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListLenses.go b/service/wellarchitected/api_op_ListLenses.go index 96eefc1cd76..92989141bd3 100644 --- a/service/wellarchitected/api_op_ListLenses.go +++ b/service/wellarchitected/api_op_ListLenses.go @@ -170,12 +170,13 @@ func NewListLensesPaginator(client ListLensesAPIClient, params *ListLensesInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListLensesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListLenses page. @@ -198,7 +199,10 @@ func (p *ListLensesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListMilestones.go b/service/wellarchitected/api_op_ListMilestones.go index 0d418c2c9bb..e814e3dabf3 100644 --- a/service/wellarchitected/api_op_ListMilestones.go +++ b/service/wellarchitected/api_op_ListMilestones.go @@ -175,12 +175,13 @@ func NewListMilestonesPaginator(client ListMilestonesAPIClient, params *ListMile client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMilestonesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMilestones page. @@ -203,7 +204,10 @@ func (p *ListMilestonesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListNotifications.go b/service/wellarchitected/api_op_ListNotifications.go index c9f19fb135f..29dec0abf79 100644 --- a/service/wellarchitected/api_op_ListNotifications.go +++ b/service/wellarchitected/api_op_ListNotifications.go @@ -164,12 +164,13 @@ func NewListNotificationsPaginator(client ListNotificationsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNotificationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNotifications page. @@ -192,7 +193,10 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListShareInvitations.go b/service/wellarchitected/api_op_ListShareInvitations.go index af850715666..dc21d264249 100644 --- a/service/wellarchitected/api_op_ListShareInvitations.go +++ b/service/wellarchitected/api_op_ListShareInvitations.go @@ -174,12 +174,13 @@ func NewListShareInvitationsPaginator(client ListShareInvitationsAPIClient, para client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListShareInvitationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListShareInvitations page. @@ -202,7 +203,10 @@ func (p *ListShareInvitationsPaginator) NextPage(ctx context.Context, optFns ... prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListWorkloadShares.go b/service/wellarchitected/api_op_ListWorkloadShares.go index a701560e902..7e0aa170c77 100644 --- a/service/wellarchitected/api_op_ListWorkloadShares.go +++ b/service/wellarchitected/api_op_ListWorkloadShares.go @@ -180,12 +180,13 @@ func NewListWorkloadSharesPaginator(client ListWorkloadSharesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkloadSharesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkloadShares page. @@ -208,7 +209,10 @@ func (p *ListWorkloadSharesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wellarchitected/api_op_ListWorkloads.go b/service/wellarchitected/api_op_ListWorkloads.go index ea87a592bce..8e3eca870f1 100644 --- a/service/wellarchitected/api_op_ListWorkloads.go +++ b/service/wellarchitected/api_op_ListWorkloads.go @@ -165,12 +165,13 @@ func NewListWorkloadsPaginator(client ListWorkloadsAPIClient, params *ListWorklo client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWorkloadsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWorkloads page. @@ -193,7 +194,10 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_ListAssistantAssociations.go b/service/wisdom/api_op_ListAssistantAssociations.go index 3e0c996234f..78eec710d6d 100644 --- a/service/wisdom/api_op_ListAssistantAssociations.go +++ b/service/wisdom/api_op_ListAssistantAssociations.go @@ -174,12 +174,13 @@ func NewListAssistantAssociationsPaginator(client ListAssistantAssociationsAPICl client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssistantAssociationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssistantAssociations page. @@ -206,7 +207,10 @@ func (p *ListAssistantAssociationsPaginator) NextPage(ctx context.Context, optFn prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_ListAssistants.go b/service/wisdom/api_op_ListAssistants.go index d4230ce22ed..15eb616354e 100644 --- a/service/wisdom/api_op_ListAssistants.go +++ b/service/wisdom/api_op_ListAssistants.go @@ -163,12 +163,13 @@ func NewListAssistantsPaginator(client ListAssistantsAPIClient, params *ListAssi client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAssistantsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAssistants page. @@ -195,7 +196,10 @@ func (p *ListAssistantsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_ListContents.go b/service/wisdom/api_op_ListContents.go index 16d15d4bb7b..422c9a127f1 100644 --- a/service/wisdom/api_op_ListContents.go +++ b/service/wisdom/api_op_ListContents.go @@ -171,12 +171,13 @@ func NewListContentsPaginator(client ListContentsAPIClient, params *ListContents client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListContentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListContents page. @@ -203,7 +204,10 @@ func (p *ListContentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_ListKnowledgeBases.go b/service/wisdom/api_op_ListKnowledgeBases.go index 502f4b6a299..ba85ee94971 100644 --- a/service/wisdom/api_op_ListKnowledgeBases.go +++ b/service/wisdom/api_op_ListKnowledgeBases.go @@ -164,12 +164,13 @@ func NewListKnowledgeBasesPaginator(client ListKnowledgeBasesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKnowledgeBasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKnowledgeBases page. @@ -196,7 +197,10 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_QueryAssistant.go b/service/wisdom/api_op_QueryAssistant.go index 8978b47cf9c..7dc1a564b90 100644 --- a/service/wisdom/api_op_QueryAssistant.go +++ b/service/wisdom/api_op_QueryAssistant.go @@ -179,12 +179,13 @@ func NewQueryAssistantPaginator(client QueryAssistantAPIClient, params *QueryAss client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *QueryAssistantPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next QueryAssistant page. @@ -211,7 +212,10 @@ func (p *QueryAssistantPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_SearchContent.go b/service/wisdom/api_op_SearchContent.go index 7c7ff306285..490610f1acc 100644 --- a/service/wisdom/api_op_SearchContent.go +++ b/service/wisdom/api_op_SearchContent.go @@ -177,12 +177,13 @@ func NewSearchContentPaginator(client SearchContentAPIClient, params *SearchCont client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchContentPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchContent page. @@ -209,7 +210,10 @@ func (p *SearchContentPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/wisdom/api_op_SearchSessions.go b/service/wisdom/api_op_SearchSessions.go index 43c97e0de75..d78558f73a4 100644 --- a/service/wisdom/api_op_SearchSessions.go +++ b/service/wisdom/api_op_SearchSessions.go @@ -177,12 +177,13 @@ func NewSearchSessionsPaginator(client SearchSessionsAPIClient, params *SearchSe client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *SearchSessionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next SearchSessions page. @@ -209,7 +210,10 @@ func (p *SearchSessionsPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workdocs/api_op_DescribeDocumentVersions.go b/service/workdocs/api_op_DescribeDocumentVersions.go index 950d39c5779..7e5cfcf6fe5 100644 --- a/service/workdocs/api_op_DescribeDocumentVersions.go +++ b/service/workdocs/api_op_DescribeDocumentVersions.go @@ -185,12 +185,13 @@ func NewDescribeDocumentVersionsPaginator(client DescribeDocumentVersionsAPIClie client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeDocumentVersionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeDocumentVersions page. @@ -217,7 +218,10 @@ func (p *DescribeDocumentVersionsPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workdocs/api_op_DescribeFolderContents.go b/service/workdocs/api_op_DescribeFolderContents.go index 10aed2ee3f3..6bf29cb21b5 100644 --- a/service/workdocs/api_op_DescribeFolderContents.go +++ b/service/workdocs/api_op_DescribeFolderContents.go @@ -194,12 +194,13 @@ func NewDescribeFolderContentsPaginator(client DescribeFolderContentsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeFolderContentsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeFolderContents page. @@ -226,7 +227,10 @@ func (p *DescribeFolderContentsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workdocs/api_op_DescribeUsers.go b/service/workdocs/api_op_DescribeUsers.go index 925cfc2df89..74000760c1a 100644 --- a/service/workdocs/api_op_DescribeUsers.go +++ b/service/workdocs/api_op_DescribeUsers.go @@ -195,12 +195,13 @@ func NewDescribeUsersPaginator(client DescribeUsersAPIClient, params *DescribeUs client: client, params: params, firstPage: true, + nextToken: params.Marker, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeUsers page. @@ -227,7 +228,10 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.Marker - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/worklink/api_op_ListDevices.go b/service/worklink/api_op_ListDevices.go index 3a0e07f6a96..49b889fe730 100644 --- a/service/worklink/api_op_ListDevices.go +++ b/service/worklink/api_op_ListDevices.go @@ -169,12 +169,13 @@ func NewListDevicesPaginator(client ListDevicesAPIClient, params *ListDevicesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDevicesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDevices page. @@ -201,7 +202,10 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/worklink/api_op_ListDomains.go b/service/worklink/api_op_ListDomains.go index 11745fe5f2c..f8159c4e456 100644 --- a/service/worklink/api_op_ListDomains.go +++ b/service/worklink/api_op_ListDomains.go @@ -169,12 +169,13 @@ func NewListDomainsPaginator(client ListDomainsAPIClient, params *ListDomainsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDomains page. @@ -201,7 +202,10 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/worklink/api_op_ListFleets.go b/service/worklink/api_op_ListFleets.go index 85aea80b2ae..9084c19f75c 100644 --- a/service/worklink/api_op_ListFleets.go +++ b/service/worklink/api_op_ListFleets.go @@ -161,12 +161,13 @@ func NewListFleetsPaginator(client ListFleetsAPIClient, params *ListFleetsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFleetsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFleets page. @@ -193,7 +194,10 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/worklink/api_op_ListWebsiteAuthorizationProviders.go b/service/worklink/api_op_ListWebsiteAuthorizationProviders.go index 4c96d3e14b8..f130448b675 100644 --- a/service/worklink/api_op_ListWebsiteAuthorizationProviders.go +++ b/service/worklink/api_op_ListWebsiteAuthorizationProviders.go @@ -174,12 +174,13 @@ func NewListWebsiteAuthorizationProvidersPaginator(client ListWebsiteAuthorizati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWebsiteAuthorizationProvidersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWebsiteAuthorizationProviders page. @@ -206,7 +207,10 @@ func (p *ListWebsiteAuthorizationProvidersPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/worklink/api_op_ListWebsiteCertificateAuthorities.go b/service/worklink/api_op_ListWebsiteCertificateAuthorities.go index d3853d3639d..151c9ff5d81 100644 --- a/service/worklink/api_op_ListWebsiteCertificateAuthorities.go +++ b/service/worklink/api_op_ListWebsiteCertificateAuthorities.go @@ -174,12 +174,13 @@ func NewListWebsiteCertificateAuthoritiesPaginator(client ListWebsiteCertificate client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListWebsiteCertificateAuthoritiesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListWebsiteCertificateAuthorities page. @@ -206,7 +207,10 @@ func (p *ListWebsiteCertificateAuthoritiesPaginator) NextPage(ctx context.Contex prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListAliases.go b/service/workmail/api_op_ListAliases.go index e2910553dae..9fa09d135ac 100644 --- a/service/workmail/api_op_ListAliases.go +++ b/service/workmail/api_op_ListAliases.go @@ -173,12 +173,13 @@ func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAliasesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAliases page. @@ -205,7 +206,10 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListGroupMembers.go b/service/workmail/api_op_ListGroupMembers.go index 2794e49c5d2..914b4bf7244 100644 --- a/service/workmail/api_op_ListGroupMembers.go +++ b/service/workmail/api_op_ListGroupMembers.go @@ -177,12 +177,13 @@ func NewListGroupMembersPaginator(client ListGroupMembersAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupMembersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupMembers page. @@ -209,7 +210,10 @@ func (p *ListGroupMembersPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListGroups.go b/service/workmail/api_op_ListGroups.go index 0ec6ae94c15..ffbc3cd54b3 100644 --- a/service/workmail/api_op_ListGroups.go +++ b/service/workmail/api_op_ListGroups.go @@ -169,12 +169,13 @@ func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroups page. @@ -201,7 +202,10 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListMailDomains.go b/service/workmail/api_op_ListMailDomains.go index c25d6414937..6e82eebfa81 100644 --- a/service/workmail/api_op_ListMailDomains.go +++ b/service/workmail/api_op_ListMailDomains.go @@ -172,12 +172,13 @@ func NewListMailDomainsPaginator(client ListMailDomainsAPIClient, params *ListMa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMailDomainsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMailDomains page. @@ -204,7 +205,10 @@ func (p *ListMailDomainsPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListMailboxExportJobs.go b/service/workmail/api_op_ListMailboxExportJobs.go index 3c9956ce9c2..ef86a1ef480 100644 --- a/service/workmail/api_op_ListMailboxExportJobs.go +++ b/service/workmail/api_op_ListMailboxExportJobs.go @@ -170,12 +170,13 @@ func NewListMailboxExportJobsPaginator(client ListMailboxExportJobsAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMailboxExportJobsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMailboxExportJobs page. @@ -202,7 +203,10 @@ func (p *ListMailboxExportJobsPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListMailboxPermissions.go b/service/workmail/api_op_ListMailboxPermissions.go index 9b690699642..aa08a45380e 100644 --- a/service/workmail/api_op_ListMailboxPermissions.go +++ b/service/workmail/api_op_ListMailboxPermissions.go @@ -179,12 +179,13 @@ func NewListMailboxPermissionsPaginator(client ListMailboxPermissionsAPIClient, client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMailboxPermissionsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMailboxPermissions page. @@ -211,7 +212,10 @@ func (p *ListMailboxPermissionsPaginator) NextPage(ctx context.Context, optFns . prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListMobileDeviceAccessOverrides.go b/service/workmail/api_op_ListMobileDeviceAccessOverrides.go index f7272119a55..f2c27ad04c7 100644 --- a/service/workmail/api_op_ListMobileDeviceAccessOverrides.go +++ b/service/workmail/api_op_ListMobileDeviceAccessOverrides.go @@ -192,12 +192,13 @@ func NewListMobileDeviceAccessOverridesPaginator(client ListMobileDeviceAccessOv client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListMobileDeviceAccessOverridesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListMobileDeviceAccessOverrides page. @@ -224,7 +225,10 @@ func (p *ListMobileDeviceAccessOverridesPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListOrganizations.go b/service/workmail/api_op_ListOrganizations.go index 49cab59de48..9a3448702b6 100644 --- a/service/workmail/api_op_ListOrganizations.go +++ b/service/workmail/api_op_ListOrganizations.go @@ -163,12 +163,13 @@ func NewListOrganizationsPaginator(client ListOrganizationsAPIClient, params *Li client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListOrganizationsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListOrganizations page. @@ -195,7 +196,10 @@ func (p *ListOrganizationsPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListResourceDelegates.go b/service/workmail/api_op_ListResourceDelegates.go index 2cc835c2006..ae51165d845 100644 --- a/service/workmail/api_op_ListResourceDelegates.go +++ b/service/workmail/api_op_ListResourceDelegates.go @@ -178,12 +178,13 @@ func NewListResourceDelegatesPaginator(client ListResourceDelegatesAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourceDelegatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResourceDelegates page. @@ -210,7 +211,10 @@ func (p *ListResourceDelegatesPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListResources.go b/service/workmail/api_op_ListResources.go index cbb4d5e2dc3..f6835789d06 100644 --- a/service/workmail/api_op_ListResources.go +++ b/service/workmail/api_op_ListResources.go @@ -170,12 +170,13 @@ func NewListResourcesPaginator(client ListResourcesAPIClient, params *ListResour client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListResourcesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListResources page. @@ -202,7 +203,10 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workmail/api_op_ListUsers.go b/service/workmail/api_op_ListUsers.go index 97706ae475b..fd0a9049d94 100644 --- a/service/workmail/api_op_ListUsers.go +++ b/service/workmail/api_op_ListUsers.go @@ -169,12 +169,13 @@ func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUsersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUsers page. @@ -201,7 +202,10 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspaces/api_op_DescribeWorkspaceBundles.go b/service/workspaces/api_op_DescribeWorkspaceBundles.go index 81f87b9b66a..1929c962d22 100644 --- a/service/workspaces/api_op_DescribeWorkspaceBundles.go +++ b/service/workspaces/api_op_DescribeWorkspaceBundles.go @@ -166,12 +166,13 @@ func NewDescribeWorkspaceBundlesPaginator(client DescribeWorkspaceBundlesAPIClie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeWorkspaceBundlesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeWorkspaceBundles page. @@ -192,7 +193,10 @@ func (p *DescribeWorkspaceBundlesPaginator) NextPage(ctx context.Context, optFns prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspaces/api_op_DescribeWorkspaceDirectories.go b/service/workspaces/api_op_DescribeWorkspaceDirectories.go index b747e7260dc..6eade24464a 100644 --- a/service/workspaces/api_op_DescribeWorkspaceDirectories.go +++ b/service/workspaces/api_op_DescribeWorkspaceDirectories.go @@ -163,12 +163,13 @@ func NewDescribeWorkspaceDirectoriesPaginator(client DescribeWorkspaceDirectorie client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeWorkspaceDirectoriesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeWorkspaceDirectories page. @@ -189,7 +190,10 @@ func (p *DescribeWorkspaceDirectoriesPaginator) NextPage(ctx context.Context, op prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspaces/api_op_DescribeWorkspaces.go b/service/workspaces/api_op_DescribeWorkspaces.go index cffdd7a59ec..f18c4939fce 100644 --- a/service/workspaces/api_op_DescribeWorkspaces.go +++ b/service/workspaces/api_op_DescribeWorkspaces.go @@ -185,12 +185,13 @@ func NewDescribeWorkspacesPaginator(client DescribeWorkspacesAPIClient, params * client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeWorkspacesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeWorkspaces page. @@ -217,7 +218,10 @@ func (p *DescribeWorkspacesPaginator) NextPage(ctx context.Context, optFns ...fu prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListBrowserSettings.go b/service/workspacesweb/api_op_ListBrowserSettings.go index b79eed826a8..b2d03be0c28 100644 --- a/service/workspacesweb/api_op_ListBrowserSettings.go +++ b/service/workspacesweb/api_op_ListBrowserSettings.go @@ -163,12 +163,13 @@ func NewListBrowserSettingsPaginator(client ListBrowserSettingsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListBrowserSettingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListBrowserSettings page. @@ -195,7 +196,10 @@ func (p *ListBrowserSettingsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListIdentityProviders.go b/service/workspacesweb/api_op_ListIdentityProviders.go index f61c80cfdb6..c6779e9d451 100644 --- a/service/workspacesweb/api_op_ListIdentityProviders.go +++ b/service/workspacesweb/api_op_ListIdentityProviders.go @@ -171,12 +171,13 @@ func NewListIdentityProvidersPaginator(client ListIdentityProvidersAPIClient, pa client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIdentityProvidersPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIdentityProviders page. @@ -203,7 +204,10 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListNetworkSettings.go b/service/workspacesweb/api_op_ListNetworkSettings.go index 8b350bad202..d017db33f1d 100644 --- a/service/workspacesweb/api_op_ListNetworkSettings.go +++ b/service/workspacesweb/api_op_ListNetworkSettings.go @@ -163,12 +163,13 @@ func NewListNetworkSettingsPaginator(client ListNetworkSettingsAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListNetworkSettingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListNetworkSettings page. @@ -195,7 +196,10 @@ func (p *ListNetworkSettingsPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListPortals.go b/service/workspacesweb/api_op_ListPortals.go index 418ddad2293..d2a2c4e3207 100644 --- a/service/workspacesweb/api_op_ListPortals.go +++ b/service/workspacesweb/api_op_ListPortals.go @@ -161,12 +161,13 @@ func NewListPortalsPaginator(client ListPortalsAPIClient, params *ListPortalsInp client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListPortalsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListPortals page. @@ -193,7 +194,10 @@ func (p *ListPortalsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListTrustStoreCertificates.go b/service/workspacesweb/api_op_ListTrustStoreCertificates.go index f64a01da2cf..e981e7431b5 100644 --- a/service/workspacesweb/api_op_ListTrustStoreCertificates.go +++ b/service/workspacesweb/api_op_ListTrustStoreCertificates.go @@ -176,12 +176,13 @@ func NewListTrustStoreCertificatesPaginator(client ListTrustStoreCertificatesAPI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrustStoreCertificatesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrustStoreCertificates page. @@ -208,7 +209,10 @@ func (p *ListTrustStoreCertificatesPaginator) NextPage(ctx context.Context, optF prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListTrustStores.go b/service/workspacesweb/api_op_ListTrustStores.go index 177560ca1bc..001c0d813cf 100644 --- a/service/workspacesweb/api_op_ListTrustStores.go +++ b/service/workspacesweb/api_op_ListTrustStores.go @@ -162,12 +162,13 @@ func NewListTrustStoresPaginator(client ListTrustStoresAPIClient, params *ListTr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTrustStoresPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTrustStores page. @@ -194,7 +195,10 @@ func (p *ListTrustStoresPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/workspacesweb/api_op_ListUserSettings.go b/service/workspacesweb/api_op_ListUserSettings.go index 5ee76a047d6..efee8c4010b 100644 --- a/service/workspacesweb/api_op_ListUserSettings.go +++ b/service/workspacesweb/api_op_ListUserSettings.go @@ -162,12 +162,13 @@ func NewListUserSettingsPaginator(client ListUserSettingsAPIClient, params *List client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListUserSettingsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListUserSettings page. @@ -194,7 +195,10 @@ func (p *ListUserSettingsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_BatchGetTraces.go b/service/xray/api_op_BatchGetTraces.go index b46f685d883..27f5f55fe18 100644 --- a/service/xray/api_op_BatchGetTraces.go +++ b/service/xray/api_op_BatchGetTraces.go @@ -164,12 +164,13 @@ func NewBatchGetTracesPaginator(client BatchGetTracesAPIClient, params *BatchGet client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *BatchGetTracesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next BatchGetTraces page. @@ -190,7 +191,10 @@ func (p *BatchGetTracesPaginator) NextPage(ctx context.Context, optFns ...func(* prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetGroups.go b/service/xray/api_op_GetGroups.go index f74f26205a4..1b83f420f02 100644 --- a/service/xray/api_op_GetGroups.go +++ b/service/xray/api_op_GetGroups.go @@ -150,12 +150,13 @@ func NewGetGroupsPaginator(client GetGroupsAPIClient, params *GetGroupsInput, op client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetGroupsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetGroups page. @@ -176,7 +177,10 @@ func (p *GetGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetInsightEvents.go b/service/xray/api_op_GetInsightEvents.go index 42e5018d6ee..089dea3c7de 100644 --- a/service/xray/api_op_GetInsightEvents.go +++ b/service/xray/api_op_GetInsightEvents.go @@ -174,12 +174,13 @@ func NewGetInsightEventsPaginator(client GetInsightEventsAPIClient, params *GetI client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInsightEventsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInsightEvents page. @@ -206,7 +207,10 @@ func (p *GetInsightEventsPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetInsightSummaries.go b/service/xray/api_op_GetInsightSummaries.go index e38fd976bb0..28953f5614a 100644 --- a/service/xray/api_op_GetInsightSummaries.go +++ b/service/xray/api_op_GetInsightSummaries.go @@ -191,12 +191,13 @@ func NewGetInsightSummariesPaginator(client GetInsightSummariesAPIClient, params client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetInsightSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetInsightSummaries page. @@ -223,7 +224,10 @@ func (p *GetInsightSummariesPaginator) NextPage(ctx context.Context, optFns ...f prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetSamplingRules.go b/service/xray/api_op_GetSamplingRules.go index f97efb74410..206749c5c71 100644 --- a/service/xray/api_op_GetSamplingRules.go +++ b/service/xray/api_op_GetSamplingRules.go @@ -151,12 +151,13 @@ func NewGetSamplingRulesPaginator(client GetSamplingRulesAPIClient, params *GetS client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSamplingRulesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSamplingRules page. @@ -177,7 +178,10 @@ func (p *GetSamplingRulesPaginator) NextPage(ctx context.Context, optFns ...func prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetSamplingStatisticSummaries.go b/service/xray/api_op_GetSamplingStatisticSummaries.go index e41b7d50990..d1036c37f40 100644 --- a/service/xray/api_op_GetSamplingStatisticSummaries.go +++ b/service/xray/api_op_GetSamplingStatisticSummaries.go @@ -154,12 +154,13 @@ func NewGetSamplingStatisticSummariesPaginator(client GetSamplingStatisticSummar client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSamplingStatisticSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSamplingStatisticSummaries page. @@ -180,7 +181,10 @@ func (p *GetSamplingStatisticSummariesPaginator) NextPage(ctx context.Context, o prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetServiceGraph.go b/service/xray/api_op_GetServiceGraph.go index d7e1c35fb75..ce0344d5124 100644 --- a/service/xray/api_op_GetServiceGraph.go +++ b/service/xray/api_op_GetServiceGraph.go @@ -189,12 +189,13 @@ func NewGetServiceGraphPaginator(client GetServiceGraphAPIClient, params *GetSer client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetServiceGraphPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetServiceGraph page. @@ -215,7 +216,10 @@ func (p *GetServiceGraphPaginator) NextPage(ctx context.Context, optFns ...func( prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetTimeSeriesServiceStatistics.go b/service/xray/api_op_GetTimeSeriesServiceStatistics.go index ab1f6e97764..3f86bd70216 100644 --- a/service/xray/api_op_GetTimeSeriesServiceStatistics.go +++ b/service/xray/api_op_GetTimeSeriesServiceStatistics.go @@ -191,12 +191,13 @@ func NewGetTimeSeriesServiceStatisticsPaginator(client GetTimeSeriesServiceStati client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTimeSeriesServiceStatisticsPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTimeSeriesServiceStatistics page. @@ -217,7 +218,10 @@ func (p *GetTimeSeriesServiceStatisticsPaginator) NextPage(ctx context.Context, prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetTraceGraph.go b/service/xray/api_op_GetTraceGraph.go index 60f5194280c..7be663bd011 100644 --- a/service/xray/api_op_GetTraceGraph.go +++ b/service/xray/api_op_GetTraceGraph.go @@ -158,12 +158,13 @@ func NewGetTraceGraphPaginator(client GetTraceGraphAPIClient, params *GetTraceGr client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTraceGraphPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTraceGraph page. @@ -184,7 +185,10 @@ func (p *GetTraceGraphPaginator) NextPage(ctx context.Context, optFns ...func(*O prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil } diff --git a/service/xray/api_op_GetTraceSummaries.go b/service/xray/api_op_GetTraceSummaries.go index 8259f7de7f5..2e2d05965c2 100644 --- a/service/xray/api_op_GetTraceSummaries.go +++ b/service/xray/api_op_GetTraceSummaries.go @@ -201,12 +201,13 @@ func NewGetTraceSummariesPaginator(client GetTraceSummariesAPIClient, params *Ge client: client, params: params, firstPage: true, + nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetTraceSummariesPaginator) HasMorePages() bool { - return p.firstPage || p.nextToken != nil + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetTraceSummaries page. @@ -227,7 +228,10 @@ func (p *GetTraceSummariesPaginator) NextPage(ctx context.Context, optFns ...fun prevToken := p.nextToken p.nextToken = result.NextToken - if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { p.nextToken = nil }