-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathreports.py
More file actions
121 lines (92 loc) · 2.45 KB
/
Copy pathreports.py
File metadata and controls
121 lines (92 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
"""
Classes for representing Vuforia reports.
"""
import datetime
from dataclasses import dataclass
from enum import Enum, unique
from beartype import BeartypeConf, beartype
@beartype
@dataclass(frozen=True)
class DatabaseSummaryReport:
"""A database summary report.
See
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report.
"""
active_images: int
current_month_recos: int
failed_images: int
inactive_images: int
name: str
previous_month_recos: int
processing_images: int
reco_threshold: int
request_quota: int
request_usage: int
target_quota: int
total_recos: int
@beartype
@unique
class TargetStatuses(Enum):
"""Constants representing VWS target statuses.
See the 'status' field in
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record
"""
PROCESSING = "processing"
SUCCESS = "success"
FAILED = "failed"
@beartype
@dataclass(frozen=True)
class TargetSummaryReport:
"""A target summary report.
See
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report.
"""
status: TargetStatuses
database_name: str
target_name: str
upload_date: datetime.date
active_flag: bool
tracking_rating: int
total_recos: int
current_month_recos: int
previous_month_recos: int
@beartype(conf=BeartypeConf(is_pep484_tower=True))
@dataclass(frozen=True)
class TargetRecord:
"""A target record.
See
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record.
"""
target_id: str
active_flag: bool
name: str
width: float
tracking_rating: int
reco_rating: str
@beartype
@dataclass(frozen=True)
class TargetData:
"""
The target data optionally included with a query match.
"""
name: str
application_metadata: str | None
target_timestamp: datetime.datetime
@beartype
@dataclass(frozen=True)
class QueryResult:
"""One query match result.
See
https://developer.vuforia.com/library/web-api/vuforia-query-web-api.
"""
target_id: str
target_data: TargetData | None
@beartype
@dataclass(frozen=True)
class TargetStatusAndRecord:
"""The target status and a target record.
See
https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record.
"""
status: TargetStatuses
target_record: TargetRecord