1616
1717/// Describes the services, dependencies and trivia from an IDL file,
1818/// and the IDL itself through its specific serializer and deserializer.
19+ @available ( gRPCSwift 2 . 0 , * )
1920public struct CodeGenerationRequest {
2021 /// The name of the source file containing the IDL, including the extension if applicable.
2122 public var fileName : String
@@ -81,6 +82,7 @@ public struct CodeGenerationRequest {
8182 }
8283}
8384
85+ @available ( gRPCSwift 2 . 0 , * )
8486extension CodeGenerationRequest {
8587 @available ( * , deprecated, renamed: " makeSerializerSnippet " )
8688 public var lookupSerializer : ( _ messageType: String ) -> String {
@@ -120,6 +122,7 @@ extension CodeGenerationRequest {
120122}
121123
122124/// Represents an import: a module or a specific item from a module.
125+ @available ( gRPCSwift 2 . 0 , * )
123126public struct Dependency : Equatable {
124127 /// If the dependency is an item, the property's value is the item representation.
125128 /// If the dependency is a module, this property is nil.
@@ -261,6 +264,7 @@ public struct Dependency: Equatable {
261264}
262265
263266/// Represents a service described in an IDL file.
267+ @available ( gRPCSwift 2 . 0 , * )
264268public struct ServiceDescriptor : Hashable {
265269 /// Documentation from comments above the IDL service description.
266270 /// It is already formatted, meaning it contains "///" and new lines.
@@ -285,6 +289,7 @@ public struct ServiceDescriptor: Hashable {
285289 }
286290}
287291
292+ @available ( gRPCSwift 2 . 0 , * )
288293extension ServiceDescriptor {
289294 @available ( * , deprecated, renamed: " init(documentation:name:methods:) " )
290295 public init (
@@ -317,6 +322,7 @@ extension ServiceDescriptor {
317322}
318323
319324/// Represents a method described in an IDL file.
325+ @available ( gRPCSwift 2 . 0 , * )
320326public struct MethodDescriptor : Hashable {
321327 /// Documentation from comments above the IDL method description.
322328 /// It is already formatted, meaning it contains "///" and new lines.
@@ -357,6 +363,7 @@ public struct MethodDescriptor: Hashable {
357363 }
358364}
359365
366+ @available ( gRPCSwift 2 . 0 , * )
360367extension MethodDescriptor {
361368 @available ( * , deprecated, message: " Use MethodName instead of Name " )
362369 public init (
@@ -380,6 +387,7 @@ extension MethodDescriptor {
380387 }
381388}
382389
390+ @available ( gRPCSwift 2 . 0 , * )
383391public struct ServiceName : Hashable {
384392 /// The identifying name as used in the service/method descriptors including any namespace.
385393 ///
@@ -414,6 +422,7 @@ public struct ServiceName: Hashable {
414422 }
415423}
416424
425+ @available ( gRPCSwift 2 . 0 , * )
417426public struct MethodName : Hashable {
418427 /// The identifying name as used in the service/method descriptors.
419428 ///
@@ -445,6 +454,7 @@ public struct MethodName: Hashable {
445454
446455/// Represents the name associated with a namespace, service or a method, in three different formats.
447456@available ( * , deprecated, message: " Use ServiceName/MethodName instead. " )
457+ @available ( gRPCSwift 2 . 0 , * )
448458public struct Name : Hashable {
449459 /// The base name is the name used for the namespace/service/method in the IDL file, so it should follow
450460 /// the specific casing of the IDL.
@@ -473,6 +483,7 @@ public struct Name: Hashable {
473483}
474484
475485@available ( * , deprecated, message: " Use ServiceName/MethodName instead. " )
486+ @available ( gRPCSwift 2 . 0 , * )
476487extension Name {
477488 /// The base name replacing occurrences of "." with "_".
478489 ///
0 commit comments