@@ -19,10 +19,7 @@ class CelestFunctions {
1919}
2020
2121class CelestFunctionsGreeting {
22- Never _throwError ({
23- int ? code,
24- required Map <String , Object ?> body,
25- }) {
22+ Never _throwError ({int ? code, required Map <String , Object ?> body}) {
2623 final status = body['@status' ] as Map <String , Object ?>? ;
2724 final message = status? ['message' ] as String ? ;
2825 final details = status? ['details' ] as _$celest.JsonList ? ;
@@ -32,27 +29,28 @@ class CelestFunctionsGreeting {
3229 final errorDetails as Map <String , Object ?>,
3330 {
3431 '@type' : 'dart.core.StackTrace' ,
35- 'value' : final stackTraceValue as String
32+ 'value' : final stackTraceValue as String ,
3633 },
37- ...
34+ ...,
3835 ] =>
3936 (
4037 errorDetails['@type' ],
4138 errorDetails['value' ],
4239 StackTrace .fromString (stackTraceValue),
4340 ),
4441 [final errorDetails as Map <String , Object ?>, ...] => (
45- errorDetails['@type' ],
46- errorDetails['value' ],
47- StackTrace .empty,
48- ),
42+ errorDetails['@type' ],
43+ errorDetails['value' ],
44+ StackTrace .empty,
45+ ),
4946 };
5047
5148 switch (errorType) {
5249 case 'celest.core.v1.CloudException' :
5350 Error .throwWithStackTrace (
54- _$celest.Serializers .instance
55- .deserialize< _$celest.CloudException > (errorValue),
51+ _$celest.Serializers .instance.deserialize< _$celest.CloudException > (
52+ errorValue,
53+ ),
5654 stackTrace,
5755 );
5856 case 'celest.core.v1.CancelledException' :
@@ -63,8 +61,9 @@ class CelestFunctionsGreeting {
6361 );
6462 case 'celest.core.v1.UnknownError' :
6563 Error .throwWithStackTrace (
66- _$celest.Serializers .instance
67- .deserialize< _$celest.UnknownError > (errorValue),
64+ _$celest.Serializers .instance.deserialize< _$celest.UnknownError > (
65+ errorValue,
66+ ),
6867 stackTrace,
6968 );
7069 case 'celest.core.v1.BadRequestException' :
@@ -81,8 +80,9 @@ class CelestFunctionsGreeting {
8180 );
8281 case 'celest.core.v1.NotFoundException' :
8382 Error .throwWithStackTrace (
84- _$celest.Serializers .instance
85- .deserialize< _$celest.NotFoundException > (errorValue),
83+ _$celest.Serializers .instance.deserialize< _$celest.NotFoundException > (
84+ errorValue,
85+ ),
8686 stackTrace,
8787 );
8888 case 'celest.core.v1.AlreadyExistsException' :
@@ -111,8 +111,9 @@ class CelestFunctionsGreeting {
111111 );
112112 case 'celest.core.v1.AbortedException' :
113113 Error .throwWithStackTrace (
114- _$celest.Serializers .instance
115- .deserialize< _$celest.AbortedException > (errorValue),
114+ _$celest.Serializers .instance.deserialize< _$celest.AbortedException > (
115+ errorValue,
116+ ),
116117 stackTrace,
117118 );
118119 case 'celest.core.v1.OutOfRangeException' :
@@ -135,14 +136,16 @@ class CelestFunctionsGreeting {
135136 );
136137 case 'celest.core.v1.UnavailableError' :
137138 Error .throwWithStackTrace (
138- _$celest.Serializers .instance
139- .deserialize< _$celest.UnavailableError > (errorValue),
139+ _$celest.Serializers .instance.deserialize< _$celest.UnavailableError > (
140+ errorValue,
141+ ),
140142 stackTrace,
141143 );
142144 case 'celest.core.v1.DataLossError' :
143145 Error .throwWithStackTrace (
144- _$celest.Serializers .instance
145- .deserialize< _$celest.DataLossError > (errorValue),
146+ _$celest.Serializers .instance.deserialize< _$celest.DataLossError > (
147+ errorValue,
148+ ),
146149 stackTrace,
147150 );
148151 case 'celest.core.v1.DeadlineExceededError' :
@@ -189,14 +192,16 @@ class CelestFunctionsGreeting {
189192 );
190193 case 'dart.core.UnsupportedError' :
191194 Error .throwWithStackTrace (
192- _$celest.Serializers .instance
193- .deserialize <UnsupportedError >(errorValue),
195+ _$celest.Serializers .instance.deserialize <UnsupportedError >(
196+ errorValue,
197+ ),
194198 stackTrace,
195199 );
196200 case 'dart.core.UnimplementedError' :
197201 Error .throwWithStackTrace (
198- _$celest.Serializers .instance
199- .deserialize <UnimplementedError >(errorValue),
202+ _$celest.Serializers .instance.deserialize <UnimplementedError >(
203+ errorValue,
204+ ),
200205 stackTrace,
201206 );
202207 case 'dart.core.StateError' :
@@ -212,14 +217,16 @@ class CelestFunctionsGreeting {
212217 );
213218 case 'dart.core.OutOfMemoryError' :
214219 Error .throwWithStackTrace (
215- _$celest.Serializers .instance
216- .deserialize <OutOfMemoryError >(errorValue),
220+ _$celest.Serializers .instance.deserialize <OutOfMemoryError >(
221+ errorValue,
222+ ),
217223 stackTrace,
218224 );
219225 case 'dart.core.StackOverflowError' :
220226 Error .throwWithStackTrace (
221- _$celest.Serializers .instance
222- .deserialize <StackOverflowError >(errorValue),
227+ _$celest.Serializers .instance.deserialize <StackOverflowError >(
228+ errorValue,
229+ ),
223230 stackTrace,
224231 );
225232 case 'dart.core.Exception' :
@@ -229,8 +236,9 @@ class CelestFunctionsGreeting {
229236 );
230237 case 'dart.core.FormatException' :
231238 Error .throwWithStackTrace (
232- _$celest.Serializers .instance
233- .deserialize <FormatException >(errorValue),
239+ _$celest.Serializers .instance.deserialize <FormatException >(
240+ errorValue,
241+ ),
234242 stackTrace,
235243 );
236244 case 'dart.core.IntegerDivisionByZeroException' :
@@ -246,14 +254,16 @@ class CelestFunctionsGreeting {
246254 );
247255 case 'dart.async.TimeoutException' :
248256 Error .throwWithStackTrace (
249- _$celest.Serializers .instance
250- .deserialize <TimeoutException >(errorValue),
257+ _$celest.Serializers .instance.deserialize <TimeoutException >(
258+ errorValue,
259+ ),
251260 stackTrace,
252261 );
253262 case 'dart.convert.JsonUnsupportedObjectError' :
254263 Error .throwWithStackTrace (
255- _$celest.Serializers .instance
256- .deserialize <JsonUnsupportedObjectError >(errorValue),
264+ _$celest.Serializers .instance.deserialize <JsonUnsupportedObjectError >(
265+ errorValue,
266+ ),
257267 stackTrace,
258268 );
259269 default :
@@ -269,10 +279,7 @@ class CelestFunctionsGreeting {
269279 }
270280
271281 /// Says hello to the authenticated [user] .
272- @_$celest.CloudFunction (
273- api: 'greeting' ,
274- function: 'sayHello' ,
275- )
282+ @_$celest.CloudFunction (api: 'greeting' , function: 'sayHello' )
276283 Future <String > sayHello () async {
277284 final $response = await celest.httpClient.post (
278285 celest.baseUri.resolve ('/greeting/say-hello' ),
0 commit comments