/** Returns the GapicMethodConfig for the given method. */ @Override public GapicMethodConfig getMethodConfig(MethodModel method) { return getMethodConfig(method.getSimpleName()); }
/** * Returns a list of methods with samples, similar to getSupportedMethods, but also filter out * private methods. */ @Override public List<MethodModel> getPublicMethods() { List<MethodModel> methods = new ArrayList<>(getInterfaceConfig().getMethodConfigs().size()); for (MethodModel method : getInterfaceConfigMethods()) { VisibilityConfig visibility = getInterfaceConfig().getMethodConfig(method).getVisibility(); if (isSupported(method) && visibility == VisibilityConfig.PUBLIC) { methods.add(method); } } return methods; }
/** Returns the GapicMethodConfig for the given method. */ public GapicMethodConfig getMethodConfig(Method method) { return getMethodConfig(method.getSimpleName()); }
private boolean isSupported(MethodModel method) { boolean supported = true; supported &= getFeatureConfig().enableGrpcStreaming() || !MethodConfig.isGrpcStreamingMethod(method); supported &= getInterfaceConfig().getMethodConfig(method).getVisibility() != VisibilityConfig.DISABLED; return supported; }