1- use async_graphql:: SimpleObject ;
2- use models:: data_collection_file_attachment;
1+ use async_graphql:: { Enum , SimpleObject } ;
2+ use models:: {
3+ auto_proc, auto_proc_integration, auto_proc_program, auto_proc_scaling,
4+ auto_proc_scaling_statistics, data_collection_file_attachment, processing_job,
5+ sea_orm_active_enums:: ScalingStatisticsType ,
6+ } ;
37
48/// Represents processed image file stored in s3 bucket
59#[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
@@ -13,10 +17,214 @@ pub struct DataProcessing {
1317}
1418
1519impl From < data_collection_file_attachment:: Model > for DataProcessing {
16- fn from ( values : data_collection_file_attachment:: Model ) -> Self {
20+ fn from ( value : data_collection_file_attachment:: Model ) -> Self {
1721 Self {
18- id : values. data_collection_file_attachment_id ,
19- file_full_path : values. file_full_path ,
22+ id : value. data_collection_file_attachment_id ,
23+ file_full_path : value. file_full_path ,
24+ }
25+ }
26+ }
27+
28+ /// Represents a processing job
29+ #[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
30+ #[ graphql( name = "ProcessingJob" , unresolvable) ]
31+ pub struct ProcessingJob {
32+ /// An opaque unique identifier for the processing job
33+ pub processing_job_id : u32 ,
34+ /// An opaque unique identifier for the data collection
35+ pub data_collection_id : Option < u32 > ,
36+ /// Processing job display name
37+ pub display_name : Option < String > ,
38+ /// Represents if the job is automatic or downstream
39+ pub automatic : Option < i8 > ,
40+ }
41+
42+ impl From < processing_job:: Model > for ProcessingJob {
43+ fn from ( value : processing_job:: Model ) -> Self {
44+ Self {
45+ processing_job_id : value. processing_job_id ,
46+ data_collection_id : value. data_collection_id ,
47+ display_name : value. display_name ,
48+ automatic : value. automatic ,
49+ }
50+ }
51+ }
52+
53+ /// Represents an auto processed job
54+ #[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
55+ #[ graphql( name = "AutoProc" , unresolvable) ]
56+ pub struct AutoProc {
57+ /// An opaque unique identifier for the auto processing
58+ pub auto_proc_id : u32 ,
59+ /// An opaque unique identifier for the auto processing program
60+ pub auto_proc_program_id : Option < u32 > ,
61+ /// Space group of the processing job
62+ pub space_group : Option < String > ,
63+ /// Refined cell a in the auto processing job
64+ pub refined_cell_a : Option < f32 > ,
65+ /// Refined cell b in the auto processing job
66+ pub refined_cell_b : Option < f32 > ,
67+ /// Refined cell c in the auto processing job
68+ pub refined_cell_c : Option < f32 > ,
69+ /// Refined cell alpha in the auto processing job
70+ pub refined_cell_alpha : Option < f32 > ,
71+ /// Refined cell beta in the auto processing job
72+ pub refined_cell_beta : Option < f32 > ,
73+ /// Refined cell gamma in the auto processing job
74+ pub refined_cell_gamma : Option < f32 > ,
75+ }
76+
77+ impl From < auto_proc:: Model > for AutoProc {
78+ fn from ( value : auto_proc:: Model ) -> Self {
79+ Self {
80+ auto_proc_id : value. auto_proc_id ,
81+ auto_proc_program_id : value. auto_proc_program_id ,
82+ space_group : value. space_group ,
83+ refined_cell_a : value. refined_cell_a ,
84+ refined_cell_b : value. refined_cell_b ,
85+ refined_cell_c : value. refined_cell_c ,
86+ refined_cell_alpha : value. refined_cell_alpha ,
87+ refined_cell_beta : value. refined_cell_beta ,
88+ refined_cell_gamma : value. refined_cell_gamma ,
89+ }
90+ }
91+ }
92+
93+ /// Represents an auto processed program
94+ #[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
95+ #[ graphql( name = "AutoProcProgram" , unresolvable) ]
96+ pub struct AutoProcProgram {
97+ /// An opaque unique identifier for the auto processing program
98+ pub auto_proc_program_id : u32 ,
99+ /// Name of the processing programs
100+ pub processing_programs : Option < String > ,
101+ /// Processing program status
102+ pub processing_status : Option < i8 > ,
103+ /// Processing program message
104+ pub processing_message : Option < String > ,
105+ /// An opaque unique identifier for the processing processing job
106+ pub processing_job_id : Option < u32 > ,
107+ }
108+
109+ impl From < auto_proc_program:: Model > for AutoProcProgram {
110+ fn from ( value : auto_proc_program:: Model ) -> Self {
111+ Self {
112+ auto_proc_program_id : value. auto_proc_program_id ,
113+ processing_programs : value. processing_programs ,
114+ processing_status : value. processing_status ,
115+ processing_message : value. processing_message ,
116+ processing_job_id : value. processing_job_id ,
117+ }
118+ }
119+ }
120+
121+ /// Represents an auto processing integration
122+ #[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
123+ #[ graphql( name = "AutoProcIntegration" , unresolvable) ]
124+ pub struct AutoProcIntegration {
125+ /// An opaque unique identifier for the auto processing integration
126+ pub auto_proc_integration_id : u32 ,
127+ /// An opaque unique identifier for the data collection
128+ pub data_collection_id : u32 ,
129+ /// An opaque unique identifier for the auto processing program
130+ pub auto_proc_program_id : Option < u32 > ,
131+ /// Refined X position of the beam
132+ pub refined_x_beam : Option < f32 > ,
133+ /// Refined Y position of the beam
134+ pub refined_y_beam : Option < f32 > ,
135+ }
136+
137+ impl From < auto_proc_integration:: Model > for AutoProcIntegration {
138+ fn from ( value : auto_proc_integration:: Model ) -> Self {
139+ Self {
140+ auto_proc_integration_id : value. auto_proc_integration_id ,
141+ data_collection_id : value. data_collection_id ,
142+ auto_proc_program_id : value. auto_proc_program_id ,
143+ refined_x_beam : value. refined_x_beam ,
144+ refined_y_beam : value. refined_y_beam ,
145+ }
146+ }
147+ }
148+
149+ /// Represents and auto processing scaling
150+ #[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
151+ #[ graphql( name = "AutoProcScaling" , unresolvable) ]
152+ pub struct AutoProcScaling {
153+ /// An opaque unique identifier for the auto processing scaling
154+ pub auto_proc_scaling_id : u32 ,
155+ /// An opaque unique identifier for the auto processing
156+ pub auto_proc_id : Option < u32 > ,
157+ }
158+
159+ impl From < auto_proc_scaling:: Model > for AutoProcScaling {
160+ fn from ( value : auto_proc_scaling:: Model ) -> Self {
161+ Self {
162+ auto_proc_scaling_id : value. auto_proc_scaling_id ,
163+ auto_proc_id : value. auto_proc_id ,
164+ }
165+ }
166+ }
167+
168+ #[ derive( Enum , Copy , Clone , Debug , PartialEq , Eq ) ]
169+ #[ allow( clippy:: missing_docs_in_private_items) ]
170+ pub enum StatisticsType {
171+ Overall ,
172+ InnerShell ,
173+ OuterShell ,
174+ }
175+
176+ /// Represents auto processing scaling statics
177+ #[ derive( Clone , Debug , PartialEq , SimpleObject ) ]
178+ #[ graphql( name = "AutoProcScalingStatics" , unresolvable) ]
179+ #[ allow( clippy:: missing_docs_in_private_items) ]
180+ pub struct AutoProcScalingStatics {
181+ pub auto_proc_scaling_statistics_id : u32 ,
182+ pub auto_proc_scaling_id : Option < u32 > ,
183+ pub scaling_statistics_type : StatisticsType ,
184+ pub resolution_limit_low : Option < f32 > ,
185+ pub resolution_limit_high : Option < f32 > ,
186+ pub r_merge : Option < f32 > ,
187+ pub r_meas_all_i_plus_i_minus : Option < f32 > ,
188+ pub n_total_observations : Option < i32 > ,
189+ pub n_total_unique_observations : Option < i32 > ,
190+ pub mean_i_over_sig_i : Option < f32 > ,
191+ pub completeness : Option < f32 > ,
192+ pub multiplicity : Option < f32 > ,
193+ pub anomalous_completeness : Option < f32 > ,
194+ pub anomalous_multiplicity : Option < f32 > ,
195+ pub cc_half : Option < f32 > ,
196+ pub cc_anomalous : Option < f32 > ,
197+ }
198+
199+ impl From < ScalingStatisticsType > for StatisticsType {
200+ fn from ( value : ScalingStatisticsType ) -> Self {
201+ match value {
202+ ScalingStatisticsType :: Overall => StatisticsType :: Overall ,
203+ ScalingStatisticsType :: InnerShell => StatisticsType :: InnerShell ,
204+ ScalingStatisticsType :: OuterShell => StatisticsType :: OuterShell ,
205+ }
206+ }
207+ }
208+
209+ impl From < auto_proc_scaling_statistics:: Model > for AutoProcScalingStatics {
210+ fn from ( value : auto_proc_scaling_statistics:: Model ) -> Self {
211+ Self {
212+ auto_proc_scaling_id : value. auto_proc_scaling_id ,
213+ auto_proc_scaling_statistics_id : value. auto_proc_scaling_statistics_id ,
214+ resolution_limit_low : value. resolution_limit_low ,
215+ resolution_limit_high : value. resolution_limit_high ,
216+ r_merge : value. r_merge ,
217+ r_meas_all_i_plus_i_minus : value. r_meas_all_i_plus_i_minus ,
218+ n_total_observations : value. n_total_observations ,
219+ n_total_unique_observations : value. n_total_unique_observations ,
220+ mean_i_over_sig_i : value. mean_i_over_sig_i ,
221+ completeness : value. completeness ,
222+ multiplicity : value. multiplicity ,
223+ anomalous_completeness : value. anomalous_completeness ,
224+ anomalous_multiplicity : value. anomalous_multiplicity ,
225+ cc_half : value. cc_half ,
226+ cc_anomalous : value. cc_anomalous ,
227+ scaling_statistics_type : StatisticsType :: from ( value. scaling_statistics_type ) ,
20228 }
21229 }
22230}
0 commit comments