/** 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 List<ParamDocView> generateParamDocs(GapicMethodContext context) { ImmutableList.Builder<ParamDocView> paramDocs = ImmutableList.builder(); paramDocs.addAll(getMethodParamDocs(context, context.getMethodConfig().getRequiredFields())); paramDocs.add(getOptionalArrayParamDoc(context, context.getMethodConfig().getOptionalFields())); return paramDocs.build(); }
@Override public List<ParamDocView> generateParamDocs(GapicMethodContext context) { ImmutableList.Builder<ParamDocView> docs = ImmutableList.builder(); if (context.getMethodModel().getRequestStreaming()) { docs.add(generateRequestStreamingParamDoc(context)); } else { docs.addAll(generateMethodParamDocs(context, context.getMethodConfig().getRequiredFields())); docs.addAll(generateMethodParamDocs(context, context.getMethodConfig().getOptionalFields())); } docs.add(generateOptionsParamDoc()); return docs.build(); }
@Override public List<ParamDocView> generateParamDocs(GapicMethodContext context) { ImmutableList.Builder<ParamDocView> docs = ImmutableList.builder(); if (context.getMethodModel().getRequestStreaming()) { docs.add(generateRequestStreamingParamDoc(context)); } else { docs.addAll(generateMethodParamDocs(context, context.getMethodConfig().getRequiredFields())); docs.addAll(generateMethodParamDocs(context, context.getMethodConfig().getOptionalFields())); } docs.addAll(generateOptionsParamDocs()); return docs.build(); }
@Override public List<ParamDocView> generateParamDocs(GapicMethodContext context) { ImmutableList.Builder<ParamDocView> docs = ImmutableList.builder(); if (!context.getMethodModel().getRequestStreaming()) { docs.add(generateRequestObjectParamDoc(context)); docs.addAll( generateMethodParamDocs(context, context.getMethodConfig().getRequiredFields(), false)); docs.addAll( generateMethodParamDocs(context, context.getMethodConfig().getOptionalFields(), true)); } docs.add(generateOptionsParamDoc()); return docs.build(); }
methodParams.add(param.build()); for (FieldModel field : context.getMethodConfig().getOptionalFields()) { if (isRequestTokenParam(context.getMethodConfig(), field)) { continue;
private void addMethodImports(GapicMethodContext context) { ModelTypeTable typeTable = context.getTypeTable(); GapicMethodConfig methodConfig = context.getMethodConfig(); if (methodConfig.isLongRunningOperation()) { typeTable.getAndSaveNicknameFor(methodConfig.getLongRunningConfig().getReturnType()); typeTable.getAndSaveNicknameFor(methodConfig.getLongRunningConfig().getMetadataType()); } typeTable.getAndSaveNicknameFor(context.getMethod().getInputType()); addFieldsImports(typeTable, methodConfig.getRequiredFields()); addFieldsImports(typeTable, methodConfig.getOptionalFields()); }
private void addMethodImports(GapicMethodContext context) { ModelTypeTable typeTable = context.getTypeTable(); GapicMethodConfig methodConfig = context.getMethodConfig(); if (methodConfig.isLongRunningOperation()) { typeTable.getAndSaveNicknameFor(methodConfig.getLongRunningConfig().getReturnType()); typeTable.getAndSaveNicknameFor(methodConfig.getLongRunningConfig().getMetadataType()); } typeTable.getAndSaveNicknameFor(context.getMethod().getInputType()); addFieldsImports(typeTable, methodConfig.getRequiredFields()); addFieldsImports(typeTable, methodConfig.getOptionalFields()); }
fieldNamePatterns, resourceNameConfigs, getOptionalFields(methodModel, methodConfigProto.getRequiredFieldsList())); if (diagCollector.getErrorCount() > 0) { return null;