@Override public DiscoveryField getOutputField(String fieldName) { if (outputType.isEmptyType() || outputType.isPrimitive()) { return null; } return ((DiscoveryField) outputType).getField(fieldName); }
/** Returns the grpc streaming configuration of the method. */ public GrpcStreamingType getGrpcStreamingType() { if (isGrpcStreaming()) { return getGrpcStreaming().getType(); } else { return GrpcStreamingType.NonStreaming; } }
@Override public boolean hasBatchingMethods() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isBatching()) { return true; } } return false; }
@Override public List<String> getAuthScopes(GapicProductConfig gapicProductConfig) { return getAuthScopes(gapicProductConfig.getProtoParser(), getInterfaces()); }
@Override public ProtoInterfaceModel getTargetInterface() { return new ProtoInterfaceModel( GapicInterfaceConfig.getTargetInterface( getInterface(), getMethodConfig().getRerouteToGrpcInterface())); }
/** Returns the GapicMethodConfig for the given method. */ @Override public GapicMethodConfig getMethodConfig(MethodModel method) { return getMethodConfig(method.getSimpleName()); }
@Override public String getServicePhraseName(InterfaceConfig interfaceConfig) { return interfaceConfig.getInterfaceModel().getParentFullName() + " " + interfaceConfig.getInterfaceModel().getSimpleName() + " API"; }
public ResourceNameType getResourceNameType() { if (getResourceNameConfig() == null) { return null; } return getResourceNameConfig().getResourceNameType(); }
@Override public boolean hasGrpcStreamingMethods(GrpcStreamingConfig.GrpcStreamingType streamingType) { for (GapicMethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isGrpcStreaming() && methodConfig.getGrpcStreamingType() == streamingType) { return true; } } return false; }
@Override public boolean hasGrpcStreamingMethods() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isGrpcStreaming()) { return true; } } return false; }
@Override public boolean hasGrpcStreamingMethods() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isGrpcStreaming()) { return true; } } return false; }
@Override public boolean hasLongRunningOperations() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isLongRunningOperation()) { return true; } } return false; }
/** Return the list of "one of" instances associated with the fields. */ @Override public ImmutableList<ImmutableList<String>> getOneofNames(SurfaceNamer namer) { return ProtoField.getOneofFieldsNames(getOptionalFields(), namer); } }
@Override public boolean hasBatchingMethods() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isBatching()) { return true; } } return false; }
@Override public boolean hasLongRunningOperations() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isLongRunningOperation()) { return true; } } return false; }
/** * Merges release levels from a PackageMetadataConfig and a GapicProductConfig. The * GapicProductConfig always overrides the PackageMetadataConfig if its release level is set. */ public ReleaseLevel getMergedReleaseLevel( PackageMetadataConfig packageConfig, GapicProductConfig productConfig) { return productConfig.getReleaseLevel() == ReleaseLevel.UNSET_RELEASE_LEVEL ? packageConfig.releaseLevel() : productConfig.getReleaseLevel(); }
@Override public boolean hasPageStreamingMethods() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isPageStreaming()) { return true; } } return false; }
@Override public boolean hasPageStreamingMethods() { for (MethodConfig methodConfig : getMethodConfigs()) { if (methodConfig.isPageStreaming()) { return true; } } return false; }
@Override public String getRawName() { return getInterfaceModel().getSimpleName(); }
@Override public List<DiscoveryField> getFields() { return parentMethod().getInputFields(); }