|
35 | 35 | import com.google.cloud.language.v1beta2.AnalyzeSyntaxResponse; |
36 | 36 | import com.google.cloud.language.v1beta2.AnnotateTextRequest; |
37 | 37 | import com.google.cloud.language.v1beta2.AnnotateTextResponse; |
38 | | -import com.google.cloud.language.v1beta2.LanguageServiceGrpc; |
39 | 38 | import com.google.common.collect.ImmutableList; |
40 | 39 | import com.google.common.collect.ImmutableMap; |
41 | 40 | import com.google.common.collect.ImmutableSet; |
@@ -88,6 +87,46 @@ public class LanguageServiceSettings extends ClientSettings { |
88 | 87 |
|
89 | 88 | private static String gapicVersion; |
90 | 89 |
|
| 90 | + private static final io.grpc.MethodDescriptor<AnalyzeSentimentRequest, AnalyzeSentimentResponse> |
| 91 | + METHOD_ANALYZE_SENTIMENT = |
| 92 | + io.grpc.MethodDescriptor.create( |
| 93 | + io.grpc.MethodDescriptor.MethodType.UNARY, |
| 94 | + "google.cloud.language.v1beta2.LanguageService/AnalyzeSentiment", |
| 95 | + io.grpc.protobuf.ProtoUtils.marshaller(AnalyzeSentimentRequest.getDefaultInstance()), |
| 96 | + io.grpc.protobuf.ProtoUtils.marshaller( |
| 97 | + AnalyzeSentimentResponse.getDefaultInstance())); |
| 98 | + private static final io.grpc.MethodDescriptor<AnalyzeEntitiesRequest, AnalyzeEntitiesResponse> |
| 99 | + METHOD_ANALYZE_ENTITIES = |
| 100 | + io.grpc.MethodDescriptor.create( |
| 101 | + io.grpc.MethodDescriptor.MethodType.UNARY, |
| 102 | + "google.cloud.language.v1beta2.LanguageService/AnalyzeEntities", |
| 103 | + io.grpc.protobuf.ProtoUtils.marshaller(AnalyzeEntitiesRequest.getDefaultInstance()), |
| 104 | + io.grpc.protobuf.ProtoUtils.marshaller(AnalyzeEntitiesResponse.getDefaultInstance())); |
| 105 | + private static final io.grpc.MethodDescriptor< |
| 106 | + AnalyzeEntitySentimentRequest, AnalyzeEntitySentimentResponse> |
| 107 | + METHOD_ANALYZE_ENTITY_SENTIMENT = |
| 108 | + io.grpc.MethodDescriptor.create( |
| 109 | + io.grpc.MethodDescriptor.MethodType.UNARY, |
| 110 | + "google.cloud.language.v1beta2.LanguageService/AnalyzeEntitySentiment", |
| 111 | + io.grpc.protobuf.ProtoUtils.marshaller( |
| 112 | + AnalyzeEntitySentimentRequest.getDefaultInstance()), |
| 113 | + io.grpc.protobuf.ProtoUtils.marshaller( |
| 114 | + AnalyzeEntitySentimentResponse.getDefaultInstance())); |
| 115 | + private static final io.grpc.MethodDescriptor<AnalyzeSyntaxRequest, AnalyzeSyntaxResponse> |
| 116 | + METHOD_ANALYZE_SYNTAX = |
| 117 | + io.grpc.MethodDescriptor.create( |
| 118 | + io.grpc.MethodDescriptor.MethodType.UNARY, |
| 119 | + "google.cloud.language.v1beta2.LanguageService/AnalyzeSyntax", |
| 120 | + io.grpc.protobuf.ProtoUtils.marshaller(AnalyzeSyntaxRequest.getDefaultInstance()), |
| 121 | + io.grpc.protobuf.ProtoUtils.marshaller(AnalyzeSyntaxResponse.getDefaultInstance())); |
| 122 | + private static final io.grpc.MethodDescriptor<AnnotateTextRequest, AnnotateTextResponse> |
| 123 | + METHOD_ANNOTATE_TEXT = |
| 124 | + io.grpc.MethodDescriptor.create( |
| 125 | + io.grpc.MethodDescriptor.MethodType.UNARY, |
| 126 | + "google.cloud.language.v1beta2.LanguageService/AnnotateText", |
| 127 | + io.grpc.protobuf.ProtoUtils.marshaller(AnnotateTextRequest.getDefaultInstance()), |
| 128 | + io.grpc.protobuf.ProtoUtils.marshaller(AnnotateTextResponse.getDefaultInstance())); |
| 129 | + |
91 | 130 | private final SimpleCallSettings<AnalyzeSentimentRequest, AnalyzeSentimentResponse> |
92 | 131 | analyzeSentimentSettings; |
93 | 132 | private final SimpleCallSettings<AnalyzeEntitiesRequest, AnalyzeEntitiesResponse> |
@@ -241,20 +280,16 @@ public static class Builder extends ClientSettings.Builder { |
241 | 280 | private Builder() { |
242 | 281 | super(defaultChannelProviderBuilder().build()); |
243 | 282 |
|
244 | | - analyzeSentimentSettings = |
245 | | - SimpleCallSettings.newBuilder(LanguageServiceGrpc.METHOD_ANALYZE_SENTIMENT); |
| 283 | + analyzeSentimentSettings = SimpleCallSettings.newBuilder(METHOD_ANALYZE_SENTIMENT); |
246 | 284 |
|
247 | | - analyzeEntitiesSettings = |
248 | | - SimpleCallSettings.newBuilder(LanguageServiceGrpc.METHOD_ANALYZE_ENTITIES); |
| 285 | + analyzeEntitiesSettings = SimpleCallSettings.newBuilder(METHOD_ANALYZE_ENTITIES); |
249 | 286 |
|
250 | 287 | analyzeEntitySentimentSettings = |
251 | | - SimpleCallSettings.newBuilder(LanguageServiceGrpc.METHOD_ANALYZE_ENTITY_SENTIMENT); |
| 288 | + SimpleCallSettings.newBuilder(METHOD_ANALYZE_ENTITY_SENTIMENT); |
252 | 289 |
|
253 | | - analyzeSyntaxSettings = |
254 | | - SimpleCallSettings.newBuilder(LanguageServiceGrpc.METHOD_ANALYZE_SYNTAX); |
| 290 | + analyzeSyntaxSettings = SimpleCallSettings.newBuilder(METHOD_ANALYZE_SYNTAX); |
255 | 291 |
|
256 | | - annotateTextSettings = |
257 | | - SimpleCallSettings.newBuilder(LanguageServiceGrpc.METHOD_ANNOTATE_TEXT); |
| 292 | + annotateTextSettings = SimpleCallSettings.newBuilder(METHOD_ANNOTATE_TEXT); |
258 | 293 |
|
259 | 294 | unaryMethodSettingsBuilders = |
260 | 295 | ImmutableList.<UnaryCallSettings.Builder>of( |
|
0 commit comments