1// Copyright 2021 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Code generated by protoc-gen-go. DO NOT EDIT. 16// versions: 17// protoc-gen-go v1.26.0 18// protoc v3.12.2 19// source: google/cloud/documentai/v1beta3/geometry.proto 20 21package documentai 22 23import ( 24 reflect "reflect" 25 sync "sync" 26 27 _ "google.golang.org/genproto/googleapis/api/annotations" 28 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 29 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 30) 31 32const ( 33 // Verify that this generated code is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 35 // Verify that runtime/protoimpl is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 37) 38 39// A vertex represents a 2D point in the image. 40// NOTE: the vertex coordinates are in the same scale as the original image. 41type Vertex struct { 42 state protoimpl.MessageState 43 sizeCache protoimpl.SizeCache 44 unknownFields protoimpl.UnknownFields 45 46 // X coordinate. 47 X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` 48 // Y coordinate (starts from the top of the image). 49 Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` 50} 51 52func (x *Vertex) Reset() { 53 *x = Vertex{} 54 if protoimpl.UnsafeEnabled { 55 mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0] 56 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 57 ms.StoreMessageInfo(mi) 58 } 59} 60 61func (x *Vertex) String() string { 62 return protoimpl.X.MessageStringOf(x) 63} 64 65func (*Vertex) ProtoMessage() {} 66 67func (x *Vertex) ProtoReflect() protoreflect.Message { 68 mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0] 69 if protoimpl.UnsafeEnabled && x != nil { 70 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 71 if ms.LoadMessageInfo() == nil { 72 ms.StoreMessageInfo(mi) 73 } 74 return ms 75 } 76 return mi.MessageOf(x) 77} 78 79// Deprecated: Use Vertex.ProtoReflect.Descriptor instead. 80func (*Vertex) Descriptor() ([]byte, []int) { 81 return file_google_cloud_documentai_v1beta3_geometry_proto_rawDescGZIP(), []int{0} 82} 83 84func (x *Vertex) GetX() int32 { 85 if x != nil { 86 return x.X 87 } 88 return 0 89} 90 91func (x *Vertex) GetY() int32 { 92 if x != nil { 93 return x.Y 94 } 95 return 0 96} 97 98// A vertex represents a 2D point in the image. 99// NOTE: the normalized vertex coordinates are relative to the original image 100// and range from 0 to 1. 101type NormalizedVertex struct { 102 state protoimpl.MessageState 103 sizeCache protoimpl.SizeCache 104 unknownFields protoimpl.UnknownFields 105 106 // X coordinate. 107 X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"` 108 // Y coordinate (starts from the top of the image). 109 Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"` 110} 111 112func (x *NormalizedVertex) Reset() { 113 *x = NormalizedVertex{} 114 if protoimpl.UnsafeEnabled { 115 mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1] 116 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 117 ms.StoreMessageInfo(mi) 118 } 119} 120 121func (x *NormalizedVertex) String() string { 122 return protoimpl.X.MessageStringOf(x) 123} 124 125func (*NormalizedVertex) ProtoMessage() {} 126 127func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { 128 mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1] 129 if protoimpl.UnsafeEnabled && x != nil { 130 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 131 if ms.LoadMessageInfo() == nil { 132 ms.StoreMessageInfo(mi) 133 } 134 return ms 135 } 136 return mi.MessageOf(x) 137} 138 139// Deprecated: Use NormalizedVertex.ProtoReflect.Descriptor instead. 140func (*NormalizedVertex) Descriptor() ([]byte, []int) { 141 return file_google_cloud_documentai_v1beta3_geometry_proto_rawDescGZIP(), []int{1} 142} 143 144func (x *NormalizedVertex) GetX() float32 { 145 if x != nil { 146 return x.X 147 } 148 return 0 149} 150 151func (x *NormalizedVertex) GetY() float32 { 152 if x != nil { 153 return x.Y 154 } 155 return 0 156} 157 158// A bounding polygon for the detected image annotation. 159type BoundingPoly struct { 160 state protoimpl.MessageState 161 sizeCache protoimpl.SizeCache 162 unknownFields protoimpl.UnknownFields 163 164 // The bounding polygon vertices. 165 Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"` 166 // The bounding polygon normalized vertices. 167 NormalizedVertices []*NormalizedVertex `protobuf:"bytes,2,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"` 168} 169 170func (x *BoundingPoly) Reset() { 171 *x = BoundingPoly{} 172 if protoimpl.UnsafeEnabled { 173 mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2] 174 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 175 ms.StoreMessageInfo(mi) 176 } 177} 178 179func (x *BoundingPoly) String() string { 180 return protoimpl.X.MessageStringOf(x) 181} 182 183func (*BoundingPoly) ProtoMessage() {} 184 185func (x *BoundingPoly) ProtoReflect() protoreflect.Message { 186 mi := &file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2] 187 if protoimpl.UnsafeEnabled && x != nil { 188 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 189 if ms.LoadMessageInfo() == nil { 190 ms.StoreMessageInfo(mi) 191 } 192 return ms 193 } 194 return mi.MessageOf(x) 195} 196 197// Deprecated: Use BoundingPoly.ProtoReflect.Descriptor instead. 198func (*BoundingPoly) Descriptor() ([]byte, []int) { 199 return file_google_cloud_documentai_v1beta3_geometry_proto_rawDescGZIP(), []int{2} 200} 201 202func (x *BoundingPoly) GetVertices() []*Vertex { 203 if x != nil { 204 return x.Vertices 205 } 206 return nil 207} 208 209func (x *BoundingPoly) GetNormalizedVertices() []*NormalizedVertex { 210 if x != nil { 211 return x.NormalizedVertices 212 } 213 return nil 214} 215 216var File_google_cloud_documentai_v1beta3_geometry_proto protoreflect.FileDescriptor 217 218var file_google_cloud_documentai_v1beta3_geometry_proto_rawDesc = []byte{ 219 0x0a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 220 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 221 0x33, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 222 0x12, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 223 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 224 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 225 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 226 0x24, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 227 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 228 0x28, 0x05, 0x52, 0x01, 0x79, 0x22, 0x2e, 0x0a, 0x10, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 229 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 230 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 231 0x28, 0x02, 0x52, 0x01, 0x79, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 232 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x43, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 233 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 234 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 235 0x61, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 236 0x78, 0x52, 0x08, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x13, 0x6e, 237 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 238 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 239 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 240 0x61, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 241 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x12, 0x6e, 0x6f, 0x72, 242 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x42, 243 0xea, 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 244 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x69, 0x2e, 245 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0d, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 246 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 247 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 248 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 249 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x69, 250 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 251 0x74, 0x61, 0x69, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 252 0x75, 0x64, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x49, 0x2e, 0x56, 0x31, 253 0x42, 0x65, 0x74, 0x61, 0x33, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 254 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x49, 0x5c, 255 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0xea, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 256 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 257 0x74, 0x41, 0x49, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, 0x72, 258 0x6f, 0x74, 0x6f, 0x33, 259} 260 261var ( 262 file_google_cloud_documentai_v1beta3_geometry_proto_rawDescOnce sync.Once 263 file_google_cloud_documentai_v1beta3_geometry_proto_rawDescData = file_google_cloud_documentai_v1beta3_geometry_proto_rawDesc 264) 265 266func file_google_cloud_documentai_v1beta3_geometry_proto_rawDescGZIP() []byte { 267 file_google_cloud_documentai_v1beta3_geometry_proto_rawDescOnce.Do(func() { 268 file_google_cloud_documentai_v1beta3_geometry_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_documentai_v1beta3_geometry_proto_rawDescData) 269 }) 270 return file_google_cloud_documentai_v1beta3_geometry_proto_rawDescData 271} 272 273var file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 274var file_google_cloud_documentai_v1beta3_geometry_proto_goTypes = []interface{}{ 275 (*Vertex)(nil), // 0: google.cloud.documentai.v1beta3.Vertex 276 (*NormalizedVertex)(nil), // 1: google.cloud.documentai.v1beta3.NormalizedVertex 277 (*BoundingPoly)(nil), // 2: google.cloud.documentai.v1beta3.BoundingPoly 278} 279var file_google_cloud_documentai_v1beta3_geometry_proto_depIdxs = []int32{ 280 0, // 0: google.cloud.documentai.v1beta3.BoundingPoly.vertices:type_name -> google.cloud.documentai.v1beta3.Vertex 281 1, // 1: google.cloud.documentai.v1beta3.BoundingPoly.normalized_vertices:type_name -> google.cloud.documentai.v1beta3.NormalizedVertex 282 2, // [2:2] is the sub-list for method output_type 283 2, // [2:2] is the sub-list for method input_type 284 2, // [2:2] is the sub-list for extension type_name 285 2, // [2:2] is the sub-list for extension extendee 286 0, // [0:2] is the sub-list for field type_name 287} 288 289func init() { file_google_cloud_documentai_v1beta3_geometry_proto_init() } 290func file_google_cloud_documentai_v1beta3_geometry_proto_init() { 291 if File_google_cloud_documentai_v1beta3_geometry_proto != nil { 292 return 293 } 294 if !protoimpl.UnsafeEnabled { 295 file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 296 switch v := v.(*Vertex); i { 297 case 0: 298 return &v.state 299 case 1: 300 return &v.sizeCache 301 case 2: 302 return &v.unknownFields 303 default: 304 return nil 305 } 306 } 307 file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 308 switch v := v.(*NormalizedVertex); i { 309 case 0: 310 return &v.state 311 case 1: 312 return &v.sizeCache 313 case 2: 314 return &v.unknownFields 315 default: 316 return nil 317 } 318 } 319 file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 320 switch v := v.(*BoundingPoly); i { 321 case 0: 322 return &v.state 323 case 1: 324 return &v.sizeCache 325 case 2: 326 return &v.unknownFields 327 default: 328 return nil 329 } 330 } 331 } 332 type x struct{} 333 out := protoimpl.TypeBuilder{ 334 File: protoimpl.DescBuilder{ 335 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 336 RawDescriptor: file_google_cloud_documentai_v1beta3_geometry_proto_rawDesc, 337 NumEnums: 0, 338 NumMessages: 3, 339 NumExtensions: 0, 340 NumServices: 0, 341 }, 342 GoTypes: file_google_cloud_documentai_v1beta3_geometry_proto_goTypes, 343 DependencyIndexes: file_google_cloud_documentai_v1beta3_geometry_proto_depIdxs, 344 MessageInfos: file_google_cloud_documentai_v1beta3_geometry_proto_msgTypes, 345 }.Build() 346 File_google_cloud_documentai_v1beta3_geometry_proto = out.File 347 file_google_cloud_documentai_v1beta3_geometry_proto_rawDesc = nil 348 file_google_cloud_documentai_v1beta3_geometry_proto_goTypes = nil 349 file_google_cloud_documentai_v1beta3_geometry_proto_depIdxs = nil 350} 351