syntax = "proto3";
package ironpdfengineproto;
import "basic.proto";

option java_package = "com.ironsoftware.ironpdf.internal.proto";
option java_multiple_files = true;


message PdfiumGetAnnotationCountRequestP {
  PdfDocumentP document = 1;
  int32 page_index = 2;
}

message PdfiumAnnotationSubTypesP {
  int32 enum_value = 1;
}

message PdfiumPdfAnnotationP {
  PdfiumAnnotationSubTypesP subtype = 2;
  Rectangle rectangle = 3;
  optional string contents = 4;
  optional string name = 5;
  optional string color_code = 6;
  optional bool Hidden = 7;
}

message PdfiumPdfTextAnnotationP {
  PdfiumPdfAnnotationP annotation = 1;
  optional string state = 2;
}

message PdfiumPdfFreeTextAnnotationP {
  PdfiumPdfAnnotationP annotation = 1;
  optional string appearance = 2;  
}

message PdfiumPdfLinkAnnotationP {
  PdfiumPdfAnnotationP annotation = 1;
  optional string dest = 2;    
}

message PdfiumWrappedPdfAnnotationP {
  oneof annotations {
    PdfiumPdfTextAnnotationP text = 2;
    PdfiumPdfFreeTextAnnotationP freetext = 3;
    PdfiumPdfLinkAnnotationP link = 4;  
  }  
}

message PdfiumPdfAnnotationCollectionP {
  repeated PdfiumWrappedPdfAnnotationP annotations = 1;
}

message PdfiumGetAnnotationsResultP {
  oneof result_or_exception {
    PdfiumPdfAnnotationCollectionP result = 1;
    RemoteExceptionP exception = 2;
  }
}

message PdfiumGetAnnotationsRequestP {
  PdfDocumentP document = 1;
  int32 page_index = 2;
}

message PdfiumAnnotationIconP {
  int32 enum_value = 1;
}

message PdfiumTextAnnotationP {
  optional int32 page_index = 2;
  optional int32 annot_index = 3;
  optional string color_code = 4;
  optional string contents = 5;
  optional bool hidden = 6;
  optional double opacity = 7;
  optional bool open_by_default = 8;
  optional bool printable = 9;
  optional bool read_only = 10;
  optional bool rotatable = 11;
  optional string subject = 12;
  optional string title = 13;
  optional PdfiumAnnotationIconP icon = 14;
  optional Rectangle rectangle = 15;
}

message PdfiumAddTextAnnotationRequestP {
  PdfDocumentP document = 1;
  PdfiumTextAnnotationP annotation = 2;
}
message PdfiumEditTextAnnotationRequestP {
  PdfDocumentP document = 1;
  PdfiumTextAnnotationP annotation = 2;
}
message PdfiumRemoveAnnotationRequestP {
  PdfDocumentP document = 1;
  int32 page_index = 2;
  int32 annot_index = 3;
}
message PdfiumGetTextAnnotationResultP {
  oneof result_or_exception {
    PdfiumTextAnnotationP result = 1;
    RemoteExceptionP exception = 2;
  }
}
message PdfiumGetAnnotationRequestP {
  PdfDocumentP document = 1;
  int32 page_index = 2;
  int32 annot_index = 3;
}

message PdfiumAddLinkAnnotationRequestP {
  PdfDocumentP document = 1;
  string name = 2;
  string url = 3;
  int32 page_index = 4;
  Rectangle rectangle = 5;
  optional string color_code = 6;
  optional bool Hidden = 7;
}