text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.listStreamProcessorsPaginate = void 0;
  const tslib_1 = require("tslib");
  const Rekognition_1 = require("../Rekognition");
  const RekognitionClient_1 = require("../RekognitionClient");
  const ListStreamProcessorsCommand_1 = require("../commands/ListStreamProcessorsCommand");
  const makePagedClientRequest = async (client, input, ...args) => {
      // @ts-ignore
      return await client.send(new ListStreamProcessorsCommand_1.ListStreamProcessorsCommand(input, ...args));
  };
  const makePagedRequest = async (client, input, ...args) => {
      // @ts-ignore
      return await client.listStreamProcessors(input, ...args);
  };
  function listStreamProcessorsPaginate(config, input, ...additionalArguments) {
      return tslib_1.__asyncGenerator(this, arguments, function* listStreamProcessorsPaginate_1() {
          let token = config.startingToken || "";
          let hasNext = true;
          let page;
          while (hasNext) {
              input["NextToken"] = token;
              input["MaxResults"] = config.pageSize;
              if (config.client instanceof Rekognition_1.Rekognition) {
                  page = yield tslib_1.__await(makePagedRequest(config.client, input, ...additionalArguments));
              }
              else if (config.client instanceof RekognitionClient_1.RekognitionClient) {
                  page = yield tslib_1.__await(makePagedClientRequest(config.client, input, ...additionalArguments));
              }
              else {
                  throw new Error("Invalid client, expected Rekognition | RekognitionClient");
              }
              yield yield tslib_1.__await(page);
              token = page["NextToken"];
              hasNext = !!token;
          }
          // @ts-ignore
          return yield tslib_1.__await(undefined);
      });
  }
  exports.listStreamProcessorsPaginate = listStreamProcessorsPaginate;
  //# sourceMappingURL=ListStreamProcessorsPaginator.js.map