@@ -105,7 +105,7 @@ struct ClientCodeTranslator: SpecializedTranslator {
105
105
106
106
extension ClientCodeTranslator {
107
107
private func makeClientProtocol(
108
- for service: CodeGenerationRequest . ServiceDescriptor ,
108
+ for service: ServiceDescriptor ,
109
109
in codeGenerationRequest: CodeGenerationRequest
110
110
) -> Declaration {
111
111
let methods = service. methods. map {
@@ -130,7 +130,7 @@ extension ClientCodeTranslator {
130
130
}
131
131
132
132
private func makeDefaultImplementation(
133
- for service: CodeGenerationRequest . ServiceDescriptor ,
133
+ for service: ServiceDescriptor ,
134
134
in codeGenerationRequest: CodeGenerationRequest
135
135
) -> Declaration {
136
136
let methods = service. methods. map {
@@ -156,7 +156,7 @@ extension ClientCodeTranslator {
156
156
}
157
157
158
158
private func makeSugaredAPI(
159
- forService service: CodeGenerationRequest . ServiceDescriptor ,
159
+ forService service: ServiceDescriptor ,
160
160
request: CodeGenerationRequest
161
161
) -> Declaration {
162
162
let sugaredAPIExtension = Declaration . extension (
@@ -175,7 +175,7 @@ extension ClientCodeTranslator {
175
175
}
176
176
177
177
private func makeSugaredMethodDeclaration(
178
- method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
178
+ method: MethodDescriptor ,
179
179
accessModifier: AccessModifier ?
180
180
) -> Declaration {
181
181
let signature = FunctionSignatureDescription (
@@ -205,7 +205,7 @@ extension ClientCodeTranslator {
205
205
}
206
206
207
207
private func makeParametersForSugaredMethodDeclaration(
208
- method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor
208
+ method: MethodDescriptor
209
209
) -> [ ParameterDescription ] {
210
210
var parameters = [ ParameterDescription] ( )
211
211
@@ -295,7 +295,7 @@ extension ClientCodeTranslator {
295
295
}
296
296
297
297
private func makeFunctionBodyForSugaredMethodDeclaration(
298
- method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor
298
+ method: MethodDescriptor
299
299
) -> [ CodeBlock ] {
300
300
// Produces the following:
301
301
//
@@ -375,8 +375,8 @@ extension ClientCodeTranslator {
375
375
}
376
376
377
377
private func makeClientProtocolMethod(
378
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
379
- in service: CodeGenerationRequest . ServiceDescriptor ,
378
+ for method: MethodDescriptor ,
379
+ in service: ServiceDescriptor ,
380
380
from codeGenerationRequest: CodeGenerationRequest ,
381
381
includeBody: Bool ,
382
382
accessModifier: AccessModifier ? = nil ,
@@ -421,8 +421,8 @@ extension ClientCodeTranslator {
421
421
}
422
422
423
423
private func makeClientProtocolMethodCall(
424
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
425
- in service: CodeGenerationRequest . ServiceDescriptor ,
424
+ for method: MethodDescriptor ,
425
+ in service: ServiceDescriptor ,
426
426
from codeGenerationRequest: CodeGenerationRequest
427
427
) -> [ CodeBlock ] {
428
428
let functionCall = Expression . functionCall (
@@ -455,8 +455,8 @@ extension ClientCodeTranslator {
455
455
}
456
456
457
457
private func makeParameters(
458
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
459
- in service: CodeGenerationRequest . ServiceDescriptor ,
458
+ for method: MethodDescriptor ,
459
+ in service: ServiceDescriptor ,
460
460
from codeGenerationRequest: CodeGenerationRequest ,
461
461
includeSerializationParameters: Bool ,
462
462
includeDefaultCallOptions: Bool ,
@@ -487,8 +487,8 @@ extension ClientCodeTranslator {
487
487
return parameters
488
488
}
489
489
private func clientRequestParameter(
490
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
491
- in service: CodeGenerationRequest . ServiceDescriptor
490
+ for method: MethodDescriptor ,
491
+ in service: ServiceDescriptor
492
492
) -> ParameterDescription {
493
493
let requestType = method. isInputStreaming ? " Streaming " : " "
494
494
let clientRequestType = ExistingTypeDescription . member ( [
@@ -505,8 +505,8 @@ extension ClientCodeTranslator {
505
505
}
506
506
507
507
private func serializerParameter(
508
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
509
- in service: CodeGenerationRequest . ServiceDescriptor
508
+ for method: MethodDescriptor ,
509
+ in service: ServiceDescriptor
510
510
) -> ParameterDescription {
511
511
return ParameterDescription (
512
512
label: " serializer " ,
@@ -520,8 +520,8 @@ extension ClientCodeTranslator {
520
520
}
521
521
522
522
private func deserializerParameter(
523
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
524
- in service: CodeGenerationRequest . ServiceDescriptor
523
+ for method: MethodDescriptor ,
524
+ in service: ServiceDescriptor
525
525
) -> ParameterDescription {
526
526
return ParameterDescription (
527
527
label: " deserializer " ,
@@ -535,8 +535,8 @@ extension ClientCodeTranslator {
535
535
}
536
536
537
537
private func bodyParameter(
538
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
539
- in service: CodeGenerationRequest . ServiceDescriptor ,
538
+ for method: MethodDescriptor ,
539
+ in service: ServiceDescriptor ,
540
540
includeDefaultResponseHandler: Bool
541
541
) -> ParameterDescription {
542
542
let clientStreaming = method. isOutputStreaming ? " Streaming " : " "
@@ -571,7 +571,7 @@ extension ClientCodeTranslator {
571
571
}
572
572
573
573
private func makeClientStruct(
574
- for service: CodeGenerationRequest . ServiceDescriptor ,
574
+ for service: ServiceDescriptor ,
575
575
in codeGenerationRequest: CodeGenerationRequest
576
576
) -> Declaration {
577
577
let clientProperty = Declaration . variable (
@@ -637,8 +637,8 @@ extension ClientCodeTranslator {
637
637
}
638
638
639
639
private func makeClientMethod(
640
- for method: CodeGenerationRequest . ServiceDescriptor . MethodDescriptor ,
641
- in service: CodeGenerationRequest . ServiceDescriptor ,
640
+ for method: MethodDescriptor ,
641
+ in service: ServiceDescriptor ,
642
642
from codeGenerationRequest: CodeGenerationRequest
643
643
) -> Declaration {
644
644
let parameters = self . makeParameters (
0 commit comments