16
16
17
17
/// Describes the services, dependencies and trivia from an IDL file,
18
18
/// and the IDL itself through its specific serializer and deserializer.
19
+ @available ( gRPCSwift 2 . 0 , * )
19
20
public struct CodeGenerationRequest {
20
21
/// The name of the source file containing the IDL, including the extension if applicable.
21
22
public var fileName : String
@@ -81,6 +82,7 @@ public struct CodeGenerationRequest {
81
82
}
82
83
}
83
84
85
+ @available ( gRPCSwift 2 . 0 , * )
84
86
extension CodeGenerationRequest {
85
87
@available ( * , deprecated, renamed: " makeSerializerSnippet " )
86
88
public var lookupSerializer : ( _ messageType: String ) -> String {
@@ -120,6 +122,7 @@ extension CodeGenerationRequest {
120
122
}
121
123
122
124
/// Represents an import: a module or a specific item from a module.
125
+ @available ( gRPCSwift 2 . 0 , * )
123
126
public struct Dependency : Equatable {
124
127
/// If the dependency is an item, the property's value is the item representation.
125
128
/// If the dependency is a module, this property is nil.
@@ -261,6 +264,7 @@ public struct Dependency: Equatable {
261
264
}
262
265
263
266
/// Represents a service described in an IDL file.
267
+ @available ( gRPCSwift 2 . 0 , * )
264
268
public struct ServiceDescriptor : Hashable {
265
269
/// Documentation from comments above the IDL service description.
266
270
/// It is already formatted, meaning it contains "///" and new lines.
@@ -285,6 +289,7 @@ public struct ServiceDescriptor: Hashable {
285
289
}
286
290
}
287
291
292
+ @available ( gRPCSwift 2 . 0 , * )
288
293
extension ServiceDescriptor {
289
294
@available ( * , deprecated, renamed: " init(documentation:name:methods:) " )
290
295
public init (
@@ -317,6 +322,7 @@ extension ServiceDescriptor {
317
322
}
318
323
319
324
/// Represents a method described in an IDL file.
325
+ @available ( gRPCSwift 2 . 0 , * )
320
326
public struct MethodDescriptor : Hashable {
321
327
/// Documentation from comments above the IDL method description.
322
328
/// It is already formatted, meaning it contains "///" and new lines.
@@ -357,6 +363,7 @@ public struct MethodDescriptor: Hashable {
357
363
}
358
364
}
359
365
366
+ @available ( gRPCSwift 2 . 0 , * )
360
367
extension MethodDescriptor {
361
368
@available ( * , deprecated, message: " Use MethodName instead of Name " )
362
369
public init (
@@ -380,6 +387,7 @@ extension MethodDescriptor {
380
387
}
381
388
}
382
389
390
+ @available ( gRPCSwift 2 . 0 , * )
383
391
public struct ServiceName : Hashable {
384
392
/// The identifying name as used in the service/method descriptors including any namespace.
385
393
///
@@ -414,6 +422,7 @@ public struct ServiceName: Hashable {
414
422
}
415
423
}
416
424
425
+ @available ( gRPCSwift 2 . 0 , * )
417
426
public struct MethodName : Hashable {
418
427
/// The identifying name as used in the service/method descriptors.
419
428
///
@@ -445,6 +454,7 @@ public struct MethodName: Hashable {
445
454
446
455
/// Represents the name associated with a namespace, service or a method, in three different formats.
447
456
@available ( * , deprecated, message: " Use ServiceName/MethodName instead. " )
457
+ @available ( gRPCSwift 2 . 0 , * )
448
458
public struct Name : Hashable {
449
459
/// The base name is the name used for the namespace/service/method in the IDL file, so it should follow
450
460
/// the specific casing of the IDL.
@@ -473,6 +483,7 @@ public struct Name: Hashable {
473
483
}
474
484
475
485
@available ( * , deprecated, message: " Use ServiceName/MethodName instead. " )
486
+ @available ( gRPCSwift 2 . 0 , * )
476
487
extension Name {
477
488
/// The base name replacing occurrences of "." with "_".
478
489
///
0 commit comments