allow specifying conversion resolution, drop explicit dpi
This commit is contained in:
@@ -137,6 +137,65 @@ func (ConversionPhase) EnumDescriptor() ([]byte, []int) {
|
||||
return file_officeconvertapi_v1_conversion_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// ConversionResolution represents preset output quality targets.
|
||||
type ConversionResolution int32
|
||||
|
||||
const (
|
||||
ConversionResolution_CONVERSION_RESOLUTION_UNSPECIFIED ConversionResolution = 0
|
||||
ConversionResolution_CONVERSION_RESOLUTION_SD ConversionResolution = 1
|
||||
ConversionResolution_CONVERSION_RESOLUTION_HD ConversionResolution = 2
|
||||
ConversionResolution_CONVERSION_RESOLUTION_FHD ConversionResolution = 3
|
||||
ConversionResolution_CONVERSION_RESOLUTION_QHD ConversionResolution = 4
|
||||
ConversionResolution_CONVERSION_RESOLUTION_UHD ConversionResolution = 5
|
||||
)
|
||||
|
||||
// Enum value maps for ConversionResolution.
|
||||
var (
|
||||
ConversionResolution_name = map[int32]string{
|
||||
0: "CONVERSION_RESOLUTION_UNSPECIFIED",
|
||||
1: "CONVERSION_RESOLUTION_SD",
|
||||
2: "CONVERSION_RESOLUTION_HD",
|
||||
3: "CONVERSION_RESOLUTION_FHD",
|
||||
4: "CONVERSION_RESOLUTION_QHD",
|
||||
5: "CONVERSION_RESOLUTION_UHD",
|
||||
}
|
||||
ConversionResolution_value = map[string]int32{
|
||||
"CONVERSION_RESOLUTION_UNSPECIFIED": 0,
|
||||
"CONVERSION_RESOLUTION_SD": 1,
|
||||
"CONVERSION_RESOLUTION_HD": 2,
|
||||
"CONVERSION_RESOLUTION_FHD": 3,
|
||||
"CONVERSION_RESOLUTION_QHD": 4,
|
||||
"CONVERSION_RESOLUTION_UHD": 5,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ConversionResolution) Enum() *ConversionResolution {
|
||||
p := new(ConversionResolution)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ConversionResolution) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ConversionResolution) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_officeconvertapi_v1_conversion_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (ConversionResolution) Type() protoreflect.EnumType {
|
||||
return &file_officeconvertapi_v1_conversion_proto_enumTypes[2]
|
||||
}
|
||||
|
||||
func (x ConversionResolution) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ConversionResolution.Descriptor instead.
|
||||
func (ConversionResolution) EnumDescriptor() ([]byte, []int) {
|
||||
return file_officeconvertapi_v1_conversion_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
// Slide contains extracted notes and the rendered image URL for one slide.
|
||||
type Slide struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@@ -205,6 +264,8 @@ type SlideDeck struct {
|
||||
SourceFilename string `protobuf:"bytes,2,opt,name=source_filename,json=sourceFilename,proto3" json:"source_filename,omitempty"`
|
||||
Slides []*Slide `protobuf:"bytes,3,rep,name=slides,proto3" json:"slides,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
Width int32 `protobuf:"varint,5,opt,name=width,proto3" json:"width,omitempty"`
|
||||
Height int32 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -267,10 +328,25 @@ func (x *SlideDeck) GetCreatedAt() *timestamppb.Timestamp {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SlideDeck) GetWidth() int32 {
|
||||
if x != nil {
|
||||
return x.Width
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SlideDeck) GetHeight() int32 {
|
||||
if x != nil {
|
||||
return x.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// CreateConversionRequest starts a conversion session.
|
||||
type CreateConversionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
SourceFilename string `protobuf:"bytes,1,opt,name=source_filename,json=sourceFilename,proto3" json:"source_filename,omitempty"`
|
||||
Resolution ConversionResolution `protobuf:"varint,2,opt,name=resolution,proto3,enum=officeconvertapi.v1.ConversionResolution" json:"resolution,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -312,6 +388,13 @@ func (x *CreateConversionRequest) GetSourceFilename() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateConversionRequest) GetResolution() ConversionResolution {
|
||||
if x != nil {
|
||||
return x.Resolution
|
||||
}
|
||||
return ConversionResolution_CONVERSION_RESOLUTION_UNSPECIFIED
|
||||
}
|
||||
|
||||
// CreateConversionResponse returns upload details for the session.
|
||||
type CreateConversionResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@@ -822,15 +905,20 @@ const file_officeconvertapi_v1_conversion_proto_rawDesc = "" +
|
||||
"\x05index\x18\x01 \x01(\x05R\x05index\x12\x1f\n" +
|
||||
"\vnotes_plain\x18\x02 \x01(\tR\n" +
|
||||
"notesPlain\x12\x1b\n" +
|
||||
"\timage_url\x18\x03 \x01(\tR\bimageUrl\"\xc8\x01\n" +
|
||||
"\timage_url\x18\x03 \x01(\tR\bimageUrl\"\xf6\x01\n" +
|
||||
"\tSlideDeck\x12#\n" +
|
||||
"\rconversion_id\x18\x01 \x01(\tR\fconversionId\x12'\n" +
|
||||
"\x0fsource_filename\x18\x02 \x01(\tR\x0esourceFilename\x122\n" +
|
||||
"\x06slides\x18\x03 \x03(\v2\x1a.officeconvertapi.v1.SlideR\x06slides\x129\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"B\n" +
|
||||
"created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x14\n" +
|
||||
"\x05width\x18\x05 \x01(\x05R\x05width\x12\x16\n" +
|
||||
"\x06height\x18\x06 \x01(\x05R\x06height\"\x8d\x01\n" +
|
||||
"\x17CreateConversionRequest\x12'\n" +
|
||||
"\x0fsource_filename\x18\x01 \x01(\tR\x0esourceFilename\"\xea\x01\n" +
|
||||
"\x0fsource_filename\x18\x01 \x01(\tR\x0esourceFilename\x12I\n" +
|
||||
"\n" +
|
||||
"resolution\x18\x02 \x01(\x0e2).officeconvertapi.v1.ConversionResolutionR\n" +
|
||||
"resolution\"\xea\x01\n" +
|
||||
"\x18CreateConversionResponse\x12#\n" +
|
||||
"\rconversion_id\x18\x01 \x01(\tR\fconversionId\x12#\n" +
|
||||
"\rupload_bucket\x18\x02 \x01(\tR\fuploadBucket\x12*\n" +
|
||||
@@ -877,7 +965,14 @@ const file_officeconvertapi_v1_conversion_proto_rawDesc = "" +
|
||||
"!CONVERSION_PHASE_EXTRACTING_NOTES\x10\x02\x12 \n" +
|
||||
"\x1cCONVERSION_PHASE_PPTX_TO_PDF\x10\x03\x12\"\n" +
|
||||
"\x1eCONVERSION_PHASE_PDF_TO_IMAGES\x10\x04\x12&\n" +
|
||||
"\"CONVERSION_PHASE_UPLOADING_RESULTS\x10\x052\xcc\x04\n" +
|
||||
"\"CONVERSION_PHASE_UPLOADING_RESULTS\x10\x05*\xd6\x01\n" +
|
||||
"\x14ConversionResolution\x12%\n" +
|
||||
"!CONVERSION_RESOLUTION_UNSPECIFIED\x10\x00\x12\x1c\n" +
|
||||
"\x18CONVERSION_RESOLUTION_SD\x10\x01\x12\x1c\n" +
|
||||
"\x18CONVERSION_RESOLUTION_HD\x10\x02\x12\x1d\n" +
|
||||
"\x19CONVERSION_RESOLUTION_FHD\x10\x03\x12\x1d\n" +
|
||||
"\x19CONVERSION_RESOLUTION_QHD\x10\x04\x12\x1d\n" +
|
||||
"\x19CONVERSION_RESOLUTION_UHD\x10\x052\xcc\x04\n" +
|
||||
"\x11ConversionService\x12q\n" +
|
||||
"\x10CreateConversion\x12,.officeconvertapi.v1.CreateConversionRequest\x1a-.officeconvertapi.v1.CreateConversionResponse\"\x00\x12n\n" +
|
||||
"\x0fStartConversion\x12+.officeconvertapi.v1.StartConversionRequest\x1a,.officeconvertapi.v1.StartConversionResponse\"\x00\x12z\n" +
|
||||
@@ -897,49 +992,51 @@ func file_officeconvertapi_v1_conversion_proto_rawDescGZIP() []byte {
|
||||
return file_officeconvertapi_v1_conversion_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_officeconvertapi_v1_conversion_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_officeconvertapi_v1_conversion_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||
var file_officeconvertapi_v1_conversion_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_officeconvertapi_v1_conversion_proto_goTypes = []any{
|
||||
(ConversionStatus)(0), // 0: officeconvertapi.v1.ConversionStatus
|
||||
(ConversionPhase)(0), // 1: officeconvertapi.v1.ConversionPhase
|
||||
(*Slide)(nil), // 2: officeconvertapi.v1.Slide
|
||||
(*SlideDeck)(nil), // 3: officeconvertapi.v1.SlideDeck
|
||||
(*CreateConversionRequest)(nil), // 4: officeconvertapi.v1.CreateConversionRequest
|
||||
(*CreateConversionResponse)(nil), // 5: officeconvertapi.v1.CreateConversionResponse
|
||||
(*StartConversionRequest)(nil), // 6: officeconvertapi.v1.StartConversionRequest
|
||||
(*StartConversionResponse)(nil), // 7: officeconvertapi.v1.StartConversionResponse
|
||||
(*GetConversionStatusRequest)(nil), // 8: officeconvertapi.v1.GetConversionStatusRequest
|
||||
(*GetConversionStatusResponse)(nil), // 9: officeconvertapi.v1.GetConversionStatusResponse
|
||||
(*GetSlideDeckRequest)(nil), // 10: officeconvertapi.v1.GetSlideDeckRequest
|
||||
(*GetSlideDeckResponse)(nil), // 11: officeconvertapi.v1.GetSlideDeckResponse
|
||||
(*DeleteConversionRequest)(nil), // 12: officeconvertapi.v1.DeleteConversionRequest
|
||||
(*DeleteConversionResponse)(nil), // 13: officeconvertapi.v1.DeleteConversionResponse
|
||||
(*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp
|
||||
(ConversionResolution)(0), // 2: officeconvertapi.v1.ConversionResolution
|
||||
(*Slide)(nil), // 3: officeconvertapi.v1.Slide
|
||||
(*SlideDeck)(nil), // 4: officeconvertapi.v1.SlideDeck
|
||||
(*CreateConversionRequest)(nil), // 5: officeconvertapi.v1.CreateConversionRequest
|
||||
(*CreateConversionResponse)(nil), // 6: officeconvertapi.v1.CreateConversionResponse
|
||||
(*StartConversionRequest)(nil), // 7: officeconvertapi.v1.StartConversionRequest
|
||||
(*StartConversionResponse)(nil), // 8: officeconvertapi.v1.StartConversionResponse
|
||||
(*GetConversionStatusRequest)(nil), // 9: officeconvertapi.v1.GetConversionStatusRequest
|
||||
(*GetConversionStatusResponse)(nil), // 10: officeconvertapi.v1.GetConversionStatusResponse
|
||||
(*GetSlideDeckRequest)(nil), // 11: officeconvertapi.v1.GetSlideDeckRequest
|
||||
(*GetSlideDeckResponse)(nil), // 12: officeconvertapi.v1.GetSlideDeckResponse
|
||||
(*DeleteConversionRequest)(nil), // 13: officeconvertapi.v1.DeleteConversionRequest
|
||||
(*DeleteConversionResponse)(nil), // 14: officeconvertapi.v1.DeleteConversionResponse
|
||||
(*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp
|
||||
}
|
||||
var file_officeconvertapi_v1_conversion_proto_depIdxs = []int32{
|
||||
2, // 0: officeconvertapi.v1.SlideDeck.slides:type_name -> officeconvertapi.v1.Slide
|
||||
14, // 1: officeconvertapi.v1.SlideDeck.created_at:type_name -> google.protobuf.Timestamp
|
||||
14, // 2: officeconvertapi.v1.CreateConversionResponse.expires_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 3: officeconvertapi.v1.StartConversionResponse.status:type_name -> officeconvertapi.v1.ConversionStatus
|
||||
0, // 4: officeconvertapi.v1.GetConversionStatusResponse.status:type_name -> officeconvertapi.v1.ConversionStatus
|
||||
14, // 5: officeconvertapi.v1.GetConversionStatusResponse.updated_at:type_name -> google.protobuf.Timestamp
|
||||
1, // 6: officeconvertapi.v1.GetConversionStatusResponse.phase:type_name -> officeconvertapi.v1.ConversionPhase
|
||||
3, // 7: officeconvertapi.v1.GetSlideDeckResponse.slide_deck:type_name -> officeconvertapi.v1.SlideDeck
|
||||
4, // 8: officeconvertapi.v1.ConversionService.CreateConversion:input_type -> officeconvertapi.v1.CreateConversionRequest
|
||||
6, // 9: officeconvertapi.v1.ConversionService.StartConversion:input_type -> officeconvertapi.v1.StartConversionRequest
|
||||
8, // 10: officeconvertapi.v1.ConversionService.GetConversionStatus:input_type -> officeconvertapi.v1.GetConversionStatusRequest
|
||||
10, // 11: officeconvertapi.v1.ConversionService.GetSlideDeck:input_type -> officeconvertapi.v1.GetSlideDeckRequest
|
||||
12, // 12: officeconvertapi.v1.ConversionService.DeleteConversion:input_type -> officeconvertapi.v1.DeleteConversionRequest
|
||||
5, // 13: officeconvertapi.v1.ConversionService.CreateConversion:output_type -> officeconvertapi.v1.CreateConversionResponse
|
||||
7, // 14: officeconvertapi.v1.ConversionService.StartConversion:output_type -> officeconvertapi.v1.StartConversionResponse
|
||||
9, // 15: officeconvertapi.v1.ConversionService.GetConversionStatus:output_type -> officeconvertapi.v1.GetConversionStatusResponse
|
||||
11, // 16: officeconvertapi.v1.ConversionService.GetSlideDeck:output_type -> officeconvertapi.v1.GetSlideDeckResponse
|
||||
13, // 17: officeconvertapi.v1.ConversionService.DeleteConversion:output_type -> officeconvertapi.v1.DeleteConversionResponse
|
||||
13, // [13:18] is the sub-list for method output_type
|
||||
8, // [8:13] is the sub-list for method input_type
|
||||
8, // [8:8] is the sub-list for extension type_name
|
||||
8, // [8:8] is the sub-list for extension extendee
|
||||
0, // [0:8] is the sub-list for field type_name
|
||||
3, // 0: officeconvertapi.v1.SlideDeck.slides:type_name -> officeconvertapi.v1.Slide
|
||||
15, // 1: officeconvertapi.v1.SlideDeck.created_at:type_name -> google.protobuf.Timestamp
|
||||
2, // 2: officeconvertapi.v1.CreateConversionRequest.resolution:type_name -> officeconvertapi.v1.ConversionResolution
|
||||
15, // 3: officeconvertapi.v1.CreateConversionResponse.expires_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 4: officeconvertapi.v1.StartConversionResponse.status:type_name -> officeconvertapi.v1.ConversionStatus
|
||||
0, // 5: officeconvertapi.v1.GetConversionStatusResponse.status:type_name -> officeconvertapi.v1.ConversionStatus
|
||||
15, // 6: officeconvertapi.v1.GetConversionStatusResponse.updated_at:type_name -> google.protobuf.Timestamp
|
||||
1, // 7: officeconvertapi.v1.GetConversionStatusResponse.phase:type_name -> officeconvertapi.v1.ConversionPhase
|
||||
4, // 8: officeconvertapi.v1.GetSlideDeckResponse.slide_deck:type_name -> officeconvertapi.v1.SlideDeck
|
||||
5, // 9: officeconvertapi.v1.ConversionService.CreateConversion:input_type -> officeconvertapi.v1.CreateConversionRequest
|
||||
7, // 10: officeconvertapi.v1.ConversionService.StartConversion:input_type -> officeconvertapi.v1.StartConversionRequest
|
||||
9, // 11: officeconvertapi.v1.ConversionService.GetConversionStatus:input_type -> officeconvertapi.v1.GetConversionStatusRequest
|
||||
11, // 12: officeconvertapi.v1.ConversionService.GetSlideDeck:input_type -> officeconvertapi.v1.GetSlideDeckRequest
|
||||
13, // 13: officeconvertapi.v1.ConversionService.DeleteConversion:input_type -> officeconvertapi.v1.DeleteConversionRequest
|
||||
6, // 14: officeconvertapi.v1.ConversionService.CreateConversion:output_type -> officeconvertapi.v1.CreateConversionResponse
|
||||
8, // 15: officeconvertapi.v1.ConversionService.StartConversion:output_type -> officeconvertapi.v1.StartConversionResponse
|
||||
10, // 16: officeconvertapi.v1.ConversionService.GetConversionStatus:output_type -> officeconvertapi.v1.GetConversionStatusResponse
|
||||
12, // 17: officeconvertapi.v1.ConversionService.GetSlideDeck:output_type -> officeconvertapi.v1.GetSlideDeckResponse
|
||||
14, // 18: officeconvertapi.v1.ConversionService.DeleteConversion:output_type -> officeconvertapi.v1.DeleteConversionResponse
|
||||
14, // [14:19] is the sub-list for method output_type
|
||||
9, // [9:14] is the sub-list for method input_type
|
||||
9, // [9:9] is the sub-list for extension type_name
|
||||
9, // [9:9] is the sub-list for extension extendee
|
||||
0, // [0:9] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_officeconvertapi_v1_conversion_proto_init() }
|
||||
@@ -952,7 +1049,7 @@ func file_officeconvertapi_v1_conversion_proto_init() {
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_officeconvertapi_v1_conversion_proto_rawDesc), len(file_officeconvertapi_v1_conversion_proto_rawDesc)),
|
||||
NumEnums: 2,
|
||||
NumEnums: 3,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
|
||||
Reference in New Issue
Block a user