text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.RecognizeCelebritiesCommand = void 0;
  const models_0_1 = require("../models/models_0");
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
  const middleware_serde_1 = require("@aws-sdk/middleware-serde");
  const smithy_client_1 = require("@aws-sdk/smithy-client");
  /**
   * <p>Returns an array of celebrities recognized in the input image.  For more information, see Recognizing Celebrities
   *     in the Amazon Rekognition Developer Guide. </p>
   *          <p>
   *             <code>RecognizeCelebrities</code> returns the 64 largest faces in the image. It lists
   *       recognized celebrities in the <code>CelebrityFaces</code> array and unrecognized faces in the
   *         <code>UnrecognizedFaces</code> array. <code>RecognizeCelebrities</code> doesn't return
   *       celebrities whose faces aren't among the largest 64 faces in the image.</p>
   *
   *          <p>For each celebrity recognized, <code>RecognizeCelebrities</code> returns a
   *         <code>Celebrity</code> object. The <code>Celebrity</code> object contains the celebrity
   *       name, ID, URL links to additional information, match confidence, and a
   *         <code>ComparedFace</code> object that you can use to locate the celebrity's face on the
   *       image.</p>
   *          <p>Amazon Rekognition doesn't retain information about which images a celebrity has been recognized
   *       in. Your application must store this information and use the <code>Celebrity</code> ID
   *       property as a unique identifier for the celebrity. If you don't store the celebrity name or
   *       additional information URLs returned by <code>RecognizeCelebrities</code>, you will need the
   *       ID to identify the celebrity in a call to the <a>GetCelebrityInfo</a>
   *       operation.</p>
   *          <p>You pass the input image either as base64-encoded image bytes or as a reference to an
   *       image in an Amazon S3 bucket. If you use the
   *       AWS
   *       CLI to call Amazon Rekognition operations, passing image bytes is not
   *       supported. The image must be either a PNG or JPEG formatted file. </p>
   *
   *
   *
   *
   *          <p>For an example, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.</p>
   *          <p>This operation requires permissions to perform the
   *         <code>rekognition:RecognizeCelebrities</code> operation.</p>
   */
  class RecognizeCelebritiesCommand extends smithy_client_1.Command {
      // Start section: command_properties
      // End section: command_properties
      constructor(input) {
          // Start section: command_constructor
          super();
          this.input = input;
          // End section: command_constructor
      }
      /**
       * @internal
       */
      resolveMiddleware(clientStack, configuration, options) {
          this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
          const stack = clientStack.concat(this.middlewareStack);
          const { logger } = configuration;
          const clientName = "RekognitionClient";
          const commandName = "RecognizeCelebritiesCommand";
          const handlerExecutionContext = {
              logger,
              clientName,
              commandName,
              inputFilterSensitiveLog: models_0_1.RecognizeCelebritiesRequest.filterSensitiveLog,
              outputFilterSensitiveLog: models_0_1.RecognizeCelebritiesResponse.filterSensitiveLog,
          };
          const { requestHandler } = configuration;
          return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
      }
      serialize(input, context) {
          return Aws_json1_1_1.serializeAws_json1_1RecognizeCelebritiesCommand(input, context);
      }
      deserialize(output, context) {
          return Aws_json1_1_1.deserializeAws_json1_1RecognizeCelebritiesCommand(output, context);
      }
  }
  exports.RecognizeCelebritiesCommand = RecognizeCelebritiesCommand;
  //# sourceMappingURL=RecognizeCelebritiesCommand.js.map