public static Builder newBuilder() { return new AutoValue_StaticLangSettingsView.Builder() .transportProtocol(TransportProtocol.GRPC) .useDefaultServicePortInEndpoint(true); }
public static StaticLangApiMessageView.Builder newBuilder() { return new AutoValue_StaticLangApiMessageView.Builder() .hasRequiredProperties(false) .hasFieldMask(false) .isSerializable(true); }
private ImportFileView createImport(String moduleName, String attributeName, String localName) { ImportTypeView typeImport = ImportTypeView.newBuilder().fullName(attributeName).nickname(localName).build(); return ImportFileView.newBuilder() .moduleName(moduleName) .types(ImmutableList.of(typeImport)) .build(); }
@Override public ImportSectionView generateImportSection(TransformationContext context, String className) { InterfaceContext interfaceContext = (InterfaceContext) context; return ImportSectionView.newBuilder() .standardImports(generateFileHeaderStandardImports(interfaceContext)) .externalImports(generateFileHeaderExternalImports(interfaceContext)) .appImports(generateMainAppImports(interfaceContext)) .build(); }
public static Builder newBuilder() { return new AutoValue_StaticLangApiView.Builder() .apiHasUnaryMethod(false) .apiHasServerStreamingMethod(false) .apiHasClientStreamingMethod(false) .apiHasBidiStreamingMethod(false); }
public default PrintArgView generatePrintArg( MethodContext context, OutputView.VariableView variableView) { return PrintArgView.newBuilder() .segments( ImmutableList.<PrintArgView.ArgSegmentView>of( PrintArgView.VariableSegmentView.of(variableView))) .build(); } }
/** ApiCalls that send exactly one request. This includes unary and server streaming apis. */ public List<ApiCallSettingsView> singleRequestRpcCallSettings() { ArrayList<ApiCallSettingsView> retryableCallSettings = new ArrayList<>(); for (ApiCallSettingsView settingsView : callSettings()) { if (settingsView.type().serviceMethodType() == ServiceMethodType.UnaryMethod || settingsView.type().serviceMethodType() == ServiceMethodType.GrpcServerStreamingMethod) { retryableCallSettings.add(settingsView); } } return retryableCallSettings; }
public List<ApiCallSettingsView> unaryCallSettings() { ArrayList<ApiCallSettingsView> unaryCallSettings = new ArrayList<>(); for (ApiCallSettingsView settingsView : callSettings()) { if (settingsView.type().serviceMethodType() == ServiceMethodType.UnaryMethod) { unaryCallSettings.add(settingsView); } } return unaryCallSettings; }
public static Builder newBuilder() { return new AutoValue_StaticLangStubSettingsView.Builder() .transportProtocol(TransportProtocol.GRPC) .useDefaultServicePortInEndpoint(true); }
public static VariableSegmentView of(OutputView.VariableView variable) { return newBuilder().variable(variable).build(); }
public static TextSegmentView of(String text) { return newBuilder().text(text).build(); }
@Override public ImportSectionView generateImportSection(TransformationContext context, String className) { ImportSectionView.Builder importSection = ImportSectionView.newBuilder(); importSection.externalImports(generateExternalImports((GapicInterfaceContext) context)); return importSection.build(); }
public boolean isGrpcStreamingMethod() { return grpcStreamingType() == GrpcStreamingType.BidiStreaming || grpcStreamingType() == GrpcStreamingType.ClientStreaming || grpcStreamingType() == GrpcStreamingType.ServerStreaming; }
private ImportFileView createImport(String localName, String moduleName) { return ImportFileView.newBuilder() .types( Collections.singletonList( ImportTypeView.newBuilder().nickname(localName).fullName("").build())) .moduleName(moduleName) .build(); } }
public ImportSectionView generateTestImportSection(GapicInterfaceContext context) { return ImportSectionView.newBuilder() .standardImports(generateTestStandardImports()) .externalImports(generateTestExternalImports(context)) .appImports(generateTestAppImports(context)) .build(); }
public List<ApiCallSettingsView> unaryCallSettings() { ArrayList<ApiCallSettingsView> unaryCallSettings = new ArrayList<>(); for (ApiCallSettingsView settingsView : callSettings()) { if (settingsView.type().serviceMethodType() == ServiceMethodType.UnaryMethod) { unaryCallSettings.add(settingsView); } } return unaryCallSettings; }
public List<ApiCallSettingsView> longRunningCallSettings() { ArrayList<ApiCallSettingsView> unaryCallSettings = new ArrayList<>(); for (ApiCallSettingsView settingsView : callSettings()) { if (settingsView.type().serviceMethodType() == ServiceMethodType.LongRunningMethod) { unaryCallSettings.add(settingsView); } } return unaryCallSettings; }
private ImportFileView createImport(String moduleName, String attributeName) { ImportTypeView typeImport = ImportTypeView.newBuilder().fullName(attributeName).nickname("").build(); return ImportFileView.newBuilder() .moduleName(moduleName) .types(ImmutableList.of(typeImport)) .build(); }
public List<ApiCallSettingsView> longRunningCallSettings() { ArrayList<ApiCallSettingsView> unaryCallSettings = new ArrayList<>(); for (ApiCallSettingsView settingsView : callSettings()) { if (settingsView.type().serviceMethodType() == ServiceMethodType.LongRunningMethod) { unaryCallSettings.add(settingsView); } } return unaryCallSettings; }