unit Azure.CognitiveServices.FindFaces.Types;

interface

uses
  System.Generics.Collections,
  System.SysUtils,
  System.Types;

type

{ TAcsFindFacesRequest }

  TAcsFindFacesRequest = record
    CacheImage: Boolean;
    ImageData: TBytes;
    ImageType: string;
    ImageUrl: string;
  end;

{ TAcsFindFacesItem }

  TAcsFindFacesItem = record
    Bottom: Integer;
    Left: Integer;
    Right: Integer;
    Top: Integer;
    function GetAsRect: TRect;
  end;

{ TAcsFindFacesResponse }

  TAcsFindFacesResponse = record
    TrackingId: string;
    CacheId: string;
    Result: Boolean;
    Count: Integer;
    Faces: TArray<TAcsFindFacesItem>;
  end;

implementation

{ TAcsFindFacesItem }

function TAcsFindFacesItem.GetAsRect: TRect;
begin
  Result := Rect(Left, Top, Right, Bottom);
end;

end.
