diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/YmlFilesBuilder.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/YmlFilesBuilder.java index 0733bb61..6a8ff1b2 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/YmlFilesBuilder.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/build/YmlFilesBuilder.java @@ -59,6 +59,8 @@ public YmlFilesBuilder(DocletEnvironment environment, String outputPath, } public boolean build() { + MetadataFile projectMetadataFile = new MetadataFile(outputPath,"overview.yml");; + List packageItems = new ArrayList<>(); List packageMetadataFiles = new ArrayList<>(); List classMetadataFiles = new ArrayList<>(); @@ -78,6 +80,7 @@ public boolean build() { } for (MetadataFile packageFile : packageMetadataFiles) { + packageItems.addAll(packageFile.getItems()); String packageFileName = packageFile.getFileName(); for (MetadataFile classFile : classMetadataFiles) { String classFileName = classFile.getFileName(); @@ -88,10 +91,11 @@ public boolean build() { } } } - + buildProjectMetadataFile(packageItems, projectMetadataFile); populateUidValues(packageMetadataFiles, classMetadataFiles); updateExternalReferences(classMetadataFiles); + FileUtil.dumpToFile(projectMetadataFile); packageMetadataFiles.forEach(FileUtil::dumpToFile); classMetadataFiles.forEach(FileUtil::dumpToFile); FileUtil.dumpToFile(tocFile); @@ -129,6 +133,30 @@ void buildFilesForInnerClasses(Element element, TocTypeMap tocTypeMap, List packageItems, MetadataFile projectMetadataFile) { + MetadataFileItem projectItem = new MetadataFileItem(LANGS, projectName); + projectItem.setNameWithType(projectName); + projectItem.setFullName(projectName); + projectItem.setType("Namespace"); + projectItem.setJavaType("overview"); + + List children = new ArrayList<>(); + List references = new ArrayList<>(); + packageItems.stream().forEach(i -> { + children.add(i.getUid()); + MetadataFileItem refItem = new MetadataFileItem(i.getUid()); + refItem.setName(i.getName()); + refItem.setNameWithType(i.getNameWithType()); + refItem.setFullName(i.getFullName()); + references.add(refItem); + }); + + projectItem.getChildren().addAll(children); + projectMetadataFile.getReferences().addAll(references); + projectMetadataFile.getItems().add(projectItem); + } + MetadataFile buildPackageMetadataFile(PackageElement packageElement) { String fileName = packageLookup.extractHref(packageElement); MetadataFile packageMetadataFile = new MetadataFile(outputPath, fileName); @@ -159,10 +187,13 @@ MetadataFileItem buildClassReference(TypeElement classElement) { } void populateItemFields(MetadataFileItem item, BaseLookup lookup, T element) { - item.setName(lookup.extractName(element)); + String name = lookup.extractName(element); + item.setName(name); item.setNameWithType(lookup.extractNameWithType(element)); item.setFullName(lookup.extractFullName(element)); item.setType(lookup.extractType(element)); + String javatype = lookup.extractJavaType(element,name); + item.setJavaType(javatype); item.setSummary(lookup.extractSummary(element)); item.setContent(lookup.extractContent(element)); } @@ -301,12 +332,14 @@ void addReferencesInfo(TypeElement classElement, MetadataFile classMetadataFile) MetadataFileItem buildMetadataFileItem(Element element) { return new MetadataFileItem(LANGS, classItemsLookup.extractUid(element)) {{ + String name = classItemsLookup.extractName(element); setId(classItemsLookup.extractId(element)); setParent(classItemsLookup.extractParent(element)); - setName(classItemsLookup.extractName(element)); + setName(name); setNameWithType(classItemsLookup.extractNameWithType(element)); setFullName(classItemsLookup.extractFullName(element)); setType(classItemsLookup.extractType(element)); + setJavaType(classItemsLookup.extractJavaType(element, name)); setPackageName(classItemsLookup.extractPackageName(element)); setSummary(classItemsLookup.extractSummary(element)); }}; diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/BaseLookup.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/BaseLookup.java index 7084318f..ff5cc116 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/BaseLookup.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/BaseLookup.java @@ -13,6 +13,8 @@ import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; +import javax.lang.model.element.Modifier; +import javax.lang.model.element.TypeElement; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -117,6 +119,18 @@ public String extractType(T key) { return resolve(key).getType(); } + public String extractJavaType(T element, String name) { + if (element.getKind().name().equals(ElementKind.CLASS.name()) && name.contains("Exception")){ + return "exception"; + } + String javatype = element.getKind().name().toLowerCase().replaceAll("_",""); + + if (javatype.equals("package") || javatype.equals("overview") || javatype.equals("annotationtype")){ + return javatype; + } + return null; + } + public String extractContent(T key) { return resolve(key).getContent(); } diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassItemsLookup.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassItemsLookup.java index 009b67dd..7f2bf25c 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassItemsLookup.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassItemsLookup.java @@ -40,6 +40,7 @@ protected ExtendedMetadataFileItem buildMetadataFileItem(Element element) { setHref(classQName + ".yml"); setName(elementQName); setType(determineType(element)); + setJavaType(extractJavaType(element, elementQName)); setPackageName(packageName); setSummary(determineComment(element)); }}; diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassLookup.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassLookup.java index 406a3d6f..6c907940 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassLookup.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/ClassLookup.java @@ -13,6 +13,7 @@ import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; +import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; @@ -45,6 +46,7 @@ protected ExtendedMetadataFileItem buildMetadataFileItem(TypeElement classElemen result.setNameWithType(classSNameWithGenericsSupport); result.setFullName(classQNameWithGenericsSupport); result.setType(determineType(classElement)); + result.setJavaType(extractJavaType(classElement, classSNameWithGenericsSupport)); result.setPackageName(packageName); result.setSummary(determineComment(classElement)); result.setSuperclass(determineNestedSuperclass(classElement, result, inheritedMethods)); diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/PackageLookup.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/PackageLookup.java index ca9738fd..8de6714f 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/PackageLookup.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/lookup/PackageLookup.java @@ -26,6 +26,7 @@ protected ExtendedMetadataFileItem buildMetadataFileItem(PackageElement packageE result.setNameWithType(qName); result.setFullName(qName); result.setType(determineType(packageElement)); + result.setJavaType(extractJavaType(packageElement, qName)); result.setSummary(determineComment(packageElement)); result.setContent(determinePackageContent(packageElement)); return result; diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/Guide.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/Guide.java index 22310a0d..55708f69 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/Guide.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/Guide.java @@ -18,7 +18,7 @@ // for including guides with toc items // [items: [name: Overview, -// href: index.md, +// href: overview.html, // name: Version history, // href: history.md, // name: name, diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/MetadataFileItem.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/MetadataFileItem.java index 02e9be9c..a608148c 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/MetadataFileItem.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/MetadataFileItem.java @@ -9,7 +9,7 @@ import java.util.List; @JsonPropertyOrder({"uid", "id", "parent", "children", "href", "langs", "isExternal", "name", "nameWithType", - "fullName", "overload", "overridden", "type", "package", "summary", "syntax", "inheritance", "implements", "exceptions", + "fullName", "overload", "overridden", "type", "javatype", "package", "summary", "syntax", "inheritance", "implements", "exceptions", "spec.java", "inheritedMembers", "status"}) public class MetadataFileItem implements Comparable { @@ -25,6 +25,7 @@ public class MetadataFileItem implements Comparable { private String overload; private String overridden; private String type; + private String javatype; @JsonProperty("package") private String packageName; private String summary; @@ -140,10 +141,18 @@ public String getType() { return type; } + public String getJavaType() { + return javatype; + } + public void setType(String type) { this.type = type; } + public void setJavaType(String javaType) { + this.javatype = javaType; + } + public String getPackageName() { return packageName; } diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/TocContents.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/TocContents.java index 4ee95c89..d55c027d 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/TocContents.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/model/TocContents.java @@ -37,6 +37,7 @@ public TocContents(String projectName, List items) { private void createTocContents(String projectName, List items) { List tocItems = new ArrayList<>(); // combine guides and tocItems + tocItems.add(new Guide("Overview", "overview.html")); tocItems.add(new Guide("Version history", "history.md")); tocItems.addAll(items); // wrap guides + tocItems with product hierarchy diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java index ac53be5c..6995648e 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java @@ -28,7 +28,7 @@ public static String cleanupHtml(String text) { return text; } return text.replaceAll("
([^<]+)
","$1") - .replaceAll("
", "
")
+                .replaceAll("
", "
")
                 .replaceAll("`([^`]+)`", "$1")
                 .replaceAll("\\[([^]]+)]\\(([^)]+)\\)", "$1")
                 .replaceAll("\\[([^]]+)]\\[([^]]+)\\]", "$1")
diff --git a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/lookup/BaseLookupTest.java b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/lookup/BaseLookupTest.java
index f41140fd..6301d56d 100644
--- a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/lookup/BaseLookupTest.java
+++ b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/lookup/BaseLookupTest.java
@@ -15,10 +15,13 @@
 import org.mockito.junit.MockitoJUnitRunner;
 
 import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.PackageElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.util.Elements;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
@@ -38,6 +41,7 @@ public class BaseLookupTest {
     private LinkTree linkTree;
     private ReferenceTree referenceTree;
     private LiteralTree literalTree;
+    private TypeElement typeElement;
     private BaseLookup baseLookup;
     private ExtendedMetadataFileItem lastBuiltItem;
 
@@ -51,6 +55,7 @@ public void setup() {
         linkTree = Mockito.mock(LinkTree.class);
         referenceTree = Mockito.mock(ReferenceTree.class);
         literalTree = Mockito.mock(LiteralTree.class);
+        typeElement = Mockito.mock(TypeElement.class);
 
         baseLookup = new BaseLookup<>(environment) {
             @Override
@@ -217,6 +222,29 @@ public void testExtractMethods() {
         assertEquals("Wrong references", baseLookup.extractReferences(element), lastBuiltItem.getReferences());
     }
 
+    @Test
+    public void testExtractJavaType() {
+        String name = "com.microsoft.samples.google.ValidationException";
+        when(typeElement.getKind()).thenReturn(ElementKind.CLASS);
+        assertEquals("Wrong javaType", baseLookup.extractJavaType(typeElement, name), "exception");
+
+        name = "com.microsoft.samples.google.BetaApi";
+        when(typeElement.getKind()).thenReturn(ElementKind.ANNOTATION_TYPE);
+        assertEquals("Wrong javaType", baseLookup.extractJavaType(typeElement, name), "annotationtype");
+
+        name = "com.microsoft.samples.google";
+        when(typeElement.getKind()).thenReturn(ElementKind.PACKAGE);
+        assertEquals("Wrong javaType", baseLookup.extractJavaType(typeElement, name), "package");
+
+        name = "com.microsoft.samples.google.SpeechClient";
+        when(typeElement.getKind()).thenReturn(ElementKind.CLASS);
+        assertEquals("Wrong javaType", baseLookup.extractJavaType(typeElement, name), null);
+
+        name = "com.microsoft.samples.google.ValidationException.Supplier";
+        when(typeElement.getKind()).thenReturn(ElementKind.INTERFACE);
+        assertEquals("Wrong javaType", baseLookup.extractJavaType(typeElement, name), null);
+    }
+
     private ExtendedMetadataFileItem buildExtendedMetadataFileItem(Element element) {
         ExtendedMetadataFileItem result = new ExtendedMetadataFileItem(String.valueOf(element));
         result.setPackageName("Some package name");
@@ -235,6 +263,7 @@ private ExtendedMetadataFileItem buildExtendedMetadataFileItem(Element element)
         result.setReturn(new Return("return type", "return desc"));
         result.setSummary("Some summary");
         result.setType("Some type");
+        result.setJavaType("Some type");
         result.setContent("Some content");
         result.setTypeParameters(Arrays.asList(new TypeParameter("type param id")));
         result.setSuperclass(Arrays.asList("Some "));
diff --git a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/MetadataFileItemTest.java b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/MetadataFileItemTest.java
index 422fdca3..534be760 100644
--- a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/MetadataFileItemTest.java
+++ b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/MetadataFileItemTest.java
@@ -152,4 +152,12 @@ public void getIsExternal() {
         assertTrue("Wrong isExternal when true", (new MetadataFileItem("123", "name", true)).getIsExternal());
         assertNull("Wrong isExternal when false", (new MetadataFileItem("123", "name", false)).getIsExternal());
     }
+
+    @Test
+    public void setJavaType() {
+        MetadataFileItem metadataFileItem = new MetadataFileItem("123");
+        assertNull("Wrong javaType when null", metadataFileItem.getJavaType());
+        metadataFileItem.setJavaType("javaType");
+        assertEquals("Wrong javaType when set","javaType", metadataFileItem.getJavaType());
+    }
 }
diff --git a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/TocContentsTest.java b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/TocContentsTest.java
index 63d50d25..d1d5965d 100644
--- a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/TocContentsTest.java
+++ b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/model/TocContentsTest.java
@@ -56,15 +56,19 @@ public void getContentsWithProjectName() {
         assertEquals(contents.getName(), "google-cloud-project");
 
         List items = contents.getItems();
-        assertEquals("Should be 4 items", items.size(), 4);
+        assertEquals("Should be 5 items", items.size(), 5);
 
         assertEquals("Guide should be first", items.get(0).getClass(), Guide.class);
-        Guide history = (Guide) items.get(0);
+        Guide overview = (Guide) items.get(0);
+        assertEquals("First guide should be Overview", overview.getName(), "Overview");
+
+        assertEquals("Guide should be second", items.get(1).getClass(), Guide.class);
+        Guide history = (Guide) items.get(1);
         assertEquals("Second guide should be Version History", history.getName(), "Version history");
 
-        assertEquals("Item A should be second", items.get(1), tocItemA);
-        assertEquals("Item B should be third", items.get(2), tocItemB);
-        assertEquals("Item C should be fourth", items.get(3), tocItemC);
+        assertEquals("Item A should be third", items.get(2), tocItemA);
+        assertEquals("Item B should be fourth", items.get(3), tocItemB);
+        assertEquals("Item C should be fifth", items.get(4), tocItemC);
     }
 
     @Test
diff --git a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java
index ab0fe04a..24d3ef05 100644
--- a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java
+++ b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java
@@ -60,7 +60,7 @@ private MetadataFileItem buildMetadataFileItem(int seed) {
     public void cleanupHtmlRemoveLonePreTagsTest() {
         String expectedActual = "
text
"; String expectedResult = "text"; - String expectedWithCode = "
text
"; + String expectedWithCode = "
text
"; String random = UUID.randomUUID().toString(); assertEquals(expectedResult, YamlUtil.cleanupHtml(expectedActual)); @@ -72,7 +72,7 @@ public void cleanupHtmlRemoveLonePreTagsTest() { @Test public void cleanupHtmlIncludePrettyPrintTest() { String expectedActual = "
";
-        String expectedResult = "
";
+        String expectedResult = "
";
         String random = UUID.randomUUID().toString();
 
         assertEquals(expectedResult, YamlUtil.cleanupHtml(expectedActual));
diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.yml
index ba14b3a2..aa019f1d 100644
--- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.yml
+++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.agreements.yml
@@ -15,6 +15,7 @@ items:
   type: "Namespace"
   syntax:
     content: "package com.microsoft.samples.agreements"
+  javaType: "package"
 references:
 - uid: "com.microsoft.samples.agreements.AgreementDetailsCollectionOperations"
   name: "AgreementDetailsCollectionOperations"
diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.yml
index 5842c9d6..eb3f4e84 100644
--- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.yml
+++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.commentinheritance.yml
@@ -20,6 +20,7 @@ items:
   type: "Namespace"
   syntax:
     content: "package com.microsoft.samples.commentinheritance"
+  javaType: "package"
 references:
 - uid: "com.microsoft.samples.commentinheritance.Animal"
   name: "Animal"
diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.BetaApi.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.BetaApi.yml
index b4c65868..d70e3939 100644
--- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.BetaApi.yml
+++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.BetaApi.yml
@@ -17,6 +17,7 @@ items:
     content: "public interface BetaApi implements Annotation"
   implements:
   - "java.lang.annotation.Annotation"
+  javaType: "annotationtype"
 - uid: "com.microsoft.samples.google.BetaApi.value()"
   id: "value()"
   parent: "com.microsoft.samples.google.BetaApi"
diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.yml
index e59c4b09..fcb4b7e9 100644
--- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.yml
+++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ProductSearchSettings.yml
@@ -45,7 +45,7 @@ items:
   fullName: "com.microsoft.samples.google.ProductSearchSettings"
   type: "Class"
   package: "com.microsoft.samples.google"
-  summary: "Settings class to configure an instance of ProductSearchClient.\n\n 

The default instance has everything set to sensible defaults:\n\n

    \n
  • The default service address (vision.googleapis.com) and default port (443) are used.\n
  • Credentials are acquired automatically through Application Default Credentials.\n
  • Retries are configured for idempotent methods but not for non-idempotent methods.\n
\n\n

The builder of this class is recursive, so contained classes are themselves builders. When\n build() is called, the tree of builders is called to create the complete settings object.\n\n

For example, to set the total timeout of createProductSet to 30 seconds:\n\n

\n ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();\n productSearchSettingsBuilder\n     .createProductSetSettings()\n     .setRetrySettings(\n         productSearchSettingsBuilder\n             .createProductSetSettings()\n             .getRetrySettings()\n             .toBuilder()\n             .setTotalTimeout(Duration.ofSeconds(30))\n             .build());\n ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();\n 
" + summary: "Settings class to configure an instance of ProductSearchClient.\n\n

The default instance has everything set to sensible defaults:\n\n

    \n
  • The default service address (vision.googleapis.com) and default port (443) are used.\n
  • Credentials are acquired automatically through Application Default Credentials.\n
  • Retries are configured for idempotent methods but not for non-idempotent methods.\n
\n\n

The builder of this class is recursive, so contained classes are themselves builders. When\n build() is called, the tree of builders is called to create the complete settings object.\n\n

For example, to set the total timeout of createProductSet to 30 seconds:\n\n

\n ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();\n productSearchSettingsBuilder\n     .createProductSetSettings()\n     .setRetrySettings(\n         productSearchSettingsBuilder\n             .createProductSetSettings()\n             .getRetrySettings()\n             .toBuilder()\n             .setTotalTimeout(Duration.ofSeconds(30))\n             .build());\n ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();\n 
" syntax: content: "public class ProductSearchSettings extends ClientSettings" inheritance: diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechClient.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechClient.yml index f8965b77..6da8b2e8 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechClient.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechClient.yml @@ -33,7 +33,7 @@ items: fullName: "com.microsoft.samples.google.SpeechClient" type: "Class" package: "com.microsoft.samples.google" - summary: "Service Description: Service that implements Google Cloud Speech API.\n\n

This class provides the ability to make remote calls to the backing service through method\n calls that map to API methods. Sample code to get started:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

Note: close() needs to be called on the SpeechClient object to clean up resources such as\n threads. In the example above, try-with-resources is used, which automatically calls close().\n\n

The surface of this class includes several types of Java methods for each of the API's\n methods:\n\n

    \n
  1. A \"flattened\" method. With this type of method, the fields of the request type have been\n converted into function parameters. It may be the case that not all fields are available as\n parameters, and not every API method will have a flattened method entry point.\n
  2. A \"request object\" method. This type of method only takes one parameter, a request object,\n which must be constructed before the call. Not every API method will have a request object\n method.\n
  3. A \"callable\" method. This type of method takes no parameters and returns an immutable API\n callable object, which can be used to initiate calls to the service.\n
\n\n

See the individual methods for example code.\n\n

Many parameters require resource names to be formatted in a particular way. To assist with\n these names, this class includes a format method for each type of name, and additionally a parse\n method to extract the individual identifiers contained within names that are returned.\n\n

This class can be customized by passing in a custom instance of SpeechSettings to create().\n For example:\n\n

To customize credentials:\n\n

\n SpeechSettings speechSettings =\n     SpeechSettings.newBuilder()\n         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))\n         .build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

To customize the endpoint:\n\n

\n SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

Please refer to the GitHub repository's samples for more quickstart code snippets." + summary: "Service Description: Service that implements Google Cloud Speech API.\n\n

This class provides the ability to make remote calls to the backing service through method\n calls that map to API methods. Sample code to get started:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

Note: close() needs to be called on the SpeechClient object to clean up resources such as\n threads. In the example above, try-with-resources is used, which automatically calls close().\n\n

The surface of this class includes several types of Java methods for each of the API's\n methods:\n\n

    \n
  1. A \"flattened\" method. With this type of method, the fields of the request type have been\n converted into function parameters. It may be the case that not all fields are available as\n parameters, and not every API method will have a flattened method entry point.\n
  2. A \"request object\" method. This type of method only takes one parameter, a request object,\n which must be constructed before the call. Not every API method will have a request object\n method.\n
  3. A \"callable\" method. This type of method takes no parameters and returns an immutable API\n callable object, which can be used to initiate calls to the service.\n
\n\n

See the individual methods for example code.\n\n

Many parameters require resource names to be formatted in a particular way. To assist with\n these names, this class includes a format method for each type of name, and additionally a parse\n method to extract the individual identifiers contained within names that are returned.\n\n

This class can be customized by passing in a custom instance of SpeechSettings to create().\n For example:\n\n

To customize credentials:\n\n

\n SpeechSettings speechSettings =\n     SpeechSettings.newBuilder()\n         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))\n         .build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

To customize the endpoint:\n\n

\n SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

Please refer to the GitHub repository's samples for more quickstart code snippets." syntax: content: "public class SpeechClient implements BackgroundResource" inheritance: @@ -265,7 +265,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.longRunningRecognizeAsync*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();\n }\n 
" syntax: content: "public final OperationFuture longRunningRecognizeAsync(LongRunningRecognizeRequest request)" parameters: @@ -285,7 +285,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.longRunningRecognizeAsync*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   LongRunningRecognizeResponse response =\n       speechClient.longRunningRecognizeAsync(config, audio).get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   LongRunningRecognizeResponse response =\n       speechClient.longRunningRecognizeAsync(config, audio).get();\n }\n 
" syntax: content: "public final OperationFuture longRunningRecognizeAsync(RecognitionConfig config, RecognitionAudio audio)" parameters: @@ -308,7 +308,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.longRunningRecognizeCallable*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);\n   // Do something.\n   Operation response = future.get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);\n   // Do something.\n   Operation response = future.get();\n }\n 
" syntax: content: "public final UnaryCallable longRunningRecognizeCallable()" return: @@ -324,7 +324,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.longRunningRecognizeOperationCallable*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   OperationFuture future =\n       speechClient.longRunningRecognizeOperationCallable().futureCall(request);\n   // Do something.\n   LongRunningRecognizeResponse response = future.get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   OperationFuture future =\n       speechClient.longRunningRecognizeOperationCallable().futureCall(request);\n   // Do something.\n   LongRunningRecognizeResponse response = future.get();\n }\n 
" syntax: content: "public final OperationCallable longRunningRecognizeOperationCallable()" return: @@ -340,7 +340,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.recognize*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
" syntax: content: "public final RecognizeResponse recognize(RecognitionConfig config, RecognitionAudio audio)" parameters: @@ -363,7 +363,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.recognize*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   RecognizeResponse response = speechClient.recognize(request);\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   RecognizeResponse response = speechClient.recognize(request);\n }\n 
" syntax: content: "public final RecognizeResponse recognize(RecognizeRequest request)" parameters: @@ -383,7 +383,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.recognizeCallable*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.recognizeCallable().futureCall(request);\n   // Do something.\n   RecognizeResponse response = future.get();\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.recognizeCallable().futureCall(request);\n   // Do something.\n   RecognizeResponse response = future.get();\n }\n 
" syntax: content: "public final UnaryCallable recognizeCallable()" return: @@ -425,7 +425,7 @@ items: overload: "com.microsoft.samples.google.SpeechClient.streamingRecognizeCallable*" type: "Method" package: "com.microsoft.samples.google" - summary: "Performs bidirectional streaming speech recognition: receive results while sending audio. This\n method is only available via the gRPC API (not REST).\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   BidiStream bidiStream =\n       speechClient.streamingRecognizeCallable().call();\n   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();\n   bidiStream.send(request);\n   for (StreamingRecognizeResponse response : bidiStream) {\n     // Do something when a response is received.\n   }\n }\n 
" + summary: "Performs bidirectional streaming speech recognition: receive results while sending audio. This\n method is only available via the gRPC API (not REST).\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   BidiStream bidiStream =\n       speechClient.streamingRecognizeCallable().call();\n   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();\n   bidiStream.send(request);\n   for (StreamingRecognizeResponse response : bidiStream) {\n     // Do something when a response is received.\n   }\n }\n 
" syntax: content: "public final BidiStreamingCallable streamingRecognizeCallable()" return: diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml index 72220248..16a482b0 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.SpeechSettings.yml @@ -28,7 +28,7 @@ items: fullName: "com.microsoft.samples.google.SpeechSettings" type: "Class" package: "com.microsoft.samples.google" - summary: "Settings class to configure an instance of SpeechClient.\n\n

The default instance has everything set to sensible defaults:\n\n

    \n
  • The default service address (speech.googleapis.com) and default port (443) are used.\n
  • Credentials are acquired automatically through Application Default Credentials.\n
  • Retries are configured for idempotent methods but not for non-idempotent methods.\n
\n\n

The builder of this class is recursive, so contained classes are themselves builders. When\n build() is called, the tree of builders is called to create the complete settings object.\n\n

For example, to set the total timeout of recognize to 30 seconds:\n\n

\n SpeechSettings.Builder speechSettingsBuilder = SpeechSettings.newBuilder();\n speechSettingsBuilder\n     .recognizeSettings()\n     .setRetrySettings(\n         speechSettingsBuilder\n             .recognizeSettings()\n             .getRetrySettings()\n             .toBuilder()\n             .setTotalTimeout(Duration.ofSeconds(30))\n             .build());\n SpeechSettings speechSettings = speechSettingsBuilder.build();\n 
" + summary: "Settings class to configure an instance of SpeechClient.\n\n

The default instance has everything set to sensible defaults:\n\n

    \n
  • The default service address (speech.googleapis.com) and default port (443) are used.\n
  • Credentials are acquired automatically through Application Default Credentials.\n
  • Retries are configured for idempotent methods but not for non-idempotent methods.\n
\n\n

The builder of this class is recursive, so contained classes are themselves builders. When\n build() is called, the tree of builders is called to create the complete settings object.\n\n

For example, to set the total timeout of recognize to 30 seconds:\n\n

\n SpeechSettings.Builder speechSettingsBuilder = SpeechSettings.newBuilder();\n speechSettingsBuilder\n     .recognizeSettings()\n     .setRetrySettings(\n         speechSettingsBuilder\n             .recognizeSettings()\n             .getRetrySettings()\n             .toBuilder()\n             .setTotalTimeout(Duration.ofSeconds(30))\n             .build());\n SpeechSettings speechSettings = speechSettingsBuilder.build();\n 
" syntax: content: "public class SpeechSettings extends ClientSettings" inheritance: diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ValidationException.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ValidationException.yml index 988e632b..ac1fa8b9 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ValidationException.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.ValidationException.yml @@ -49,6 +49,7 @@ items: - "java.lang.Throwable.printStackTrace(java.io.PrintWriter)" - "java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])" - "java.lang.Throwable.toString()" + javaType: "exception" - uid: "com.microsoft.samples.google.ValidationException.ValidationException(java.lang.String,java.lang.Object...)" id: "ValidationException(java.lang.String,java.lang.Object...)" parent: "com.microsoft.samples.google.ValidationException" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.SpeechClient.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.SpeechClient.yml index 6839651f..d22fb904 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.SpeechClient.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.SpeechClient.yml @@ -33,7 +33,7 @@ items: fullName: "com.microsoft.samples.google.v1beta.SpeechClient" type: "Class" package: "com.microsoft.samples.google.v1beta" - summary: "Service Description: Service that implements Google Cloud Speech API.\n\n

This class provides the ability to make remote calls to the backing service through method\n calls that map to API methods. Sample code to get started:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

Note: close() needs to be called on the SpeechClient object to clean up resources such as\n threads. In the example above, try-with-resources is used, which automatically calls close().\n\n

The surface of this class includes several types of Java methods for each of the API's\n methods:\n\n

    \n
  1. A \"flattened\" method. With this type of method, the fields of the request type have been\n converted into function parameters. It may be the case that not all fields are available as\n parameters, and not every API method will have a flattened method entry point.\n
  2. A \"request object\" method. This type of method only takes one parameter, a request object,\n which must be constructed before the call. Not every API method will have a request object\n method.\n
  3. A \"callable\" method. This type of method takes no parameters and returns an immutable API\n callable object, which can be used to initiate calls to the service.\n
\n\n

See the individual methods for example code.\n\n

Many parameters require resource names to be formatted in a particular way. To assist with\n these names, this class includes a format method for each type of name, and additionally a parse\n method to extract the individual identifiers contained within names that are returned.\n\n

This class can be customized by passing in a custom instance of SpeechSettings to create().\n For example:\n\n

To customize credentials:\n\n

\n SpeechSettings speechSettings =\n     SpeechSettings.newBuilder()\n         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))\n         .build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

To customize the endpoint:\n\n

\n SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

Please refer to the GitHub repository's samples for more quickstart code snippets." + summary: "Service Description: Service that implements Google Cloud Speech API.\n\n

This class provides the ability to make remote calls to the backing service through method\n calls that map to API methods. Sample code to get started:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

Note: close() needs to be called on the SpeechClient object to clean up resources such as\n threads. In the example above, try-with-resources is used, which automatically calls close().\n\n

The surface of this class includes several types of Java methods for each of the API's\n methods:\n\n

    \n
  1. A \"flattened\" method. With this type of method, the fields of the request type have been\n converted into function parameters. It may be the case that not all fields are available as\n parameters, and not every API method will have a flattened method entry point.\n
  2. A \"request object\" method. This type of method only takes one parameter, a request object,\n which must be constructed before the call. Not every API method will have a request object\n method.\n
  3. A \"callable\" method. This type of method takes no parameters and returns an immutable API\n callable object, which can be used to initiate calls to the service.\n
\n\n

See the individual methods for example code.\n\n

Many parameters require resource names to be formatted in a particular way. To assist with\n these names, this class includes a format method for each type of name, and additionally a parse\n method to extract the individual identifiers contained within names that are returned.\n\n

This class can be customized by passing in a custom instance of SpeechSettings to create().\n For example:\n\n

To customize credentials:\n\n

\n SpeechSettings speechSettings =\n     SpeechSettings.newBuilder()\n         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))\n         .build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

To customize the endpoint:\n\n

\n SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

Please refer to the GitHub repository's samples for more quickstart code snippets." syntax: content: "public class SpeechClient implements BackgroundResource" inheritance: @@ -265,7 +265,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.longRunningRecognizeAsync*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();\n }\n 
" syntax: content: "public final OperationFuture longRunningRecognizeAsync(LongRunningRecognizeRequest request)" parameters: @@ -285,7 +285,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.longRunningRecognizeAsync*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   LongRunningRecognizeResponse response =\n       speechClient.longRunningRecognizeAsync(config, audio).get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   LongRunningRecognizeResponse response =\n       speechClient.longRunningRecognizeAsync(config, audio).get();\n }\n 
" syntax: content: "public final OperationFuture longRunningRecognizeAsync(RecognitionConfig config, RecognitionAudio audio)" parameters: @@ -308,7 +308,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.longRunningRecognizeCallable*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);\n   // Do something.\n   Operation response = future.get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);\n   // Do something.\n   Operation response = future.get();\n }\n 
" syntax: content: "public final UnaryCallable longRunningRecognizeCallable()" return: @@ -324,7 +324,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.longRunningRecognizeOperationCallable*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   OperationFuture future =\n       speechClient.longRunningRecognizeOperationCallable().futureCall(request);\n   // Do something.\n   LongRunningRecognizeResponse response = future.get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   OperationFuture future =\n       speechClient.longRunningRecognizeOperationCallable().futureCall(request);\n   // Do something.\n   LongRunningRecognizeResponse response = future.get();\n }\n 
" syntax: content: "public final OperationCallable longRunningRecognizeOperationCallable()" return: @@ -340,7 +340,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.recognize*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
" syntax: content: "public final RecognizeResponse recognize(RecognitionConfig config, RecognitionAudio audio)" parameters: @@ -363,7 +363,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.recognize*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   RecognizeResponse response = speechClient.recognize(request);\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   RecognizeResponse response = speechClient.recognize(request);\n }\n 
" syntax: content: "public final RecognizeResponse recognize(RecognizeRequest request)" parameters: @@ -383,7 +383,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.recognizeCallable*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.recognizeCallable().futureCall(request);\n   // Do something.\n   RecognizeResponse response = future.get();\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.recognizeCallable().futureCall(request);\n   // Do something.\n   RecognizeResponse response = future.get();\n }\n 
" syntax: content: "public final UnaryCallable recognizeCallable()" return: @@ -425,7 +425,7 @@ items: overload: "com.microsoft.samples.google.v1beta.SpeechClient.streamingRecognizeCallable*" type: "Method" package: "com.microsoft.samples.google.v1beta" - summary: "Performs bidirectional streaming speech recognition: receive results while sending audio. This\n method is only available via the gRPC API (not REST).\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   BidiStream bidiStream =\n       speechClient.streamingRecognizeCallable().call();\n   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();\n   bidiStream.send(request);\n   for (StreamingRecognizeResponse response : bidiStream) {\n     // Do something when a response is received.\n   }\n }\n 
" + summary: "Performs bidirectional streaming speech recognition: receive results while sending audio. This\n method is only available via the gRPC API (not REST).\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   BidiStream bidiStream =\n       speechClient.streamingRecognizeCallable().call();\n   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();\n   bidiStream.send(request);\n   for (StreamingRecognizeResponse response : bidiStream) {\n     // Do something when a response is received.\n   }\n }\n 
" syntax: content: "public final BidiStreamingCallable streamingRecognizeCallable()" return: diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.yml index c5c77b4d..2fe445d3 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1beta.yml @@ -12,6 +12,7 @@ items: type: "Namespace" syntax: content: "package com.microsoft.samples.google.v1beta" + javaType: "package" references: - uid: "com.microsoft.samples.google.v1beta.SpeechClient" name: "SpeechClient" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.SpeechClient.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.SpeechClient.yml index e03c37e9..ab98a426 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.SpeechClient.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.SpeechClient.yml @@ -33,7 +33,7 @@ items: fullName: "com.microsoft.samples.google.v1p1alpha.SpeechClient" type: "Class" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Service Description: Service that implements Google Cloud Speech API.\n\n

This class provides the ability to make remote calls to the backing service through method\n calls that map to API methods. Sample code to get started:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

Note: close() needs to be called on the SpeechClient object to clean up resources such as\n threads. In the example above, try-with-resources is used, which automatically calls close().\n\n

The surface of this class includes several types of Java methods for each of the API's\n methods:\n\n

    \n
  1. A \"flattened\" method. With this type of method, the fields of the request type have been\n converted into function parameters. It may be the case that not all fields are available as\n parameters, and not every API method will have a flattened method entry point.\n
  2. A \"request object\" method. This type of method only takes one parameter, a request object,\n which must be constructed before the call. Not every API method will have a request object\n method.\n
  3. A \"callable\" method. This type of method takes no parameters and returns an immutable API\n callable object, which can be used to initiate calls to the service.\n
\n\n

See the individual methods for example code.\n\n

Many parameters require resource names to be formatted in a particular way. To assist with\n these names, this class includes a format method for each type of name, and additionally a parse\n method to extract the individual identifiers contained within names that are returned.\n\n

This class can be customized by passing in a custom instance of SpeechSettings to create().\n For example:\n\n

To customize credentials:\n\n

\n SpeechSettings speechSettings =\n     SpeechSettings.newBuilder()\n         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))\n         .build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

To customize the endpoint:\n\n

\n SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

Please refer to the GitHub repository's samples for more quickstart code snippets." + summary: "Service Description: Service that implements Google Cloud Speech API.\n\n

This class provides the ability to make remote calls to the backing service through method\n calls that map to API methods. Sample code to get started:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

Note: close() needs to be called on the SpeechClient object to clean up resources such as\n threads. In the example above, try-with-resources is used, which automatically calls close().\n\n

The surface of this class includes several types of Java methods for each of the API's\n methods:\n\n

    \n
  1. A \"flattened\" method. With this type of method, the fields of the request type have been\n converted into function parameters. It may be the case that not all fields are available as\n parameters, and not every API method will have a flattened method entry point.\n
  2. A \"request object\" method. This type of method only takes one parameter, a request object,\n which must be constructed before the call. Not every API method will have a request object\n method.\n
  3. A \"callable\" method. This type of method takes no parameters and returns an immutable API\n callable object, which can be used to initiate calls to the service.\n
\n\n

See the individual methods for example code.\n\n

Many parameters require resource names to be formatted in a particular way. To assist with\n these names, this class includes a format method for each type of name, and additionally a parse\n method to extract the individual identifiers contained within names that are returned.\n\n

This class can be customized by passing in a custom instance of SpeechSettings to create().\n For example:\n\n

To customize credentials:\n\n

\n SpeechSettings speechSettings =\n     SpeechSettings.newBuilder()\n         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))\n         .build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

To customize the endpoint:\n\n

\n SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();\n SpeechClient speechClient = SpeechClient.create(speechSettings);\n 
\n\n

Please refer to the GitHub repository's samples for more quickstart code snippets." syntax: content: "public class SpeechClient implements BackgroundResource" inheritance: @@ -265,7 +265,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.longRunningRecognizeAsync*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();\n }\n 
" syntax: content: "public final OperationFuture longRunningRecognizeAsync(LongRunningRecognizeRequest request)" parameters: @@ -285,7 +285,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.longRunningRecognizeAsync*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   LongRunningRecognizeResponse response =\n       speechClient.longRunningRecognizeAsync(config, audio).get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   LongRunningRecognizeResponse response =\n       speechClient.longRunningRecognizeAsync(config, audio).get();\n }\n 
" syntax: content: "public final OperationFuture longRunningRecognizeAsync(RecognitionConfig config, RecognitionAudio audio)" parameters: @@ -308,7 +308,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.longRunningRecognizeCallable*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);\n   // Do something.\n   Operation response = future.get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);\n   // Do something.\n   Operation response = future.get();\n }\n 
" syntax: content: "public final UnaryCallable longRunningRecognizeCallable()" return: @@ -324,7 +324,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.longRunningRecognizeOperationCallable*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   OperationFuture future =\n       speechClient.longRunningRecognizeOperationCallable().futureCall(request);\n   // Do something.\n   LongRunningRecognizeResponse response = future.get();\n }\n 
" + summary: "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations\n interface. Returns either an Operation.error or an Operation.response which contains a\n LongRunningRecognizeResponse message. For more information on asynchronous speech\n recognition, see the how-to.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   LongRunningRecognizeRequest request =\n       LongRunningRecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .setOutputConfig(TranscriptOutputConfig.newBuilder().build())\n           .build();\n   OperationFuture future =\n       speechClient.longRunningRecognizeOperationCallable().futureCall(request);\n   // Do something.\n   LongRunningRecognizeResponse response = future.get();\n }\n 
" syntax: content: "public final OperationCallable longRunningRecognizeOperationCallable()" return: @@ -340,7 +340,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.recognize*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
" syntax: content: "public final RecognizeResponse recognize(RecognitionConfig config, RecognitionAudio audio)" parameters: @@ -363,7 +363,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.recognize*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   RecognizeResponse response = speechClient.recognize(request);\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   RecognizeResponse response = speechClient.recognize(request);\n }\n 
" syntax: content: "public final RecognizeResponse recognize(RecognizeRequest request)" parameters: @@ -383,7 +383,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.recognizeCallable*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.recognizeCallable().futureCall(request);\n   // Do something.\n   RecognizeResponse response = future.get();\n }\n 
" + summary: "Performs synchronous speech recognition: receive results after all audio has been sent and\n processed.\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognizeRequest request =\n       RecognizeRequest.newBuilder()\n           .setConfig(RecognitionConfig.newBuilder().build())\n           .setAudio(RecognitionAudio.newBuilder().build())\n           .build();\n   ApiFuture future = speechClient.recognizeCallable().futureCall(request);\n   // Do something.\n   RecognizeResponse response = future.get();\n }\n 
" syntax: content: "public final UnaryCallable recognizeCallable()" return: @@ -425,7 +425,7 @@ items: overload: "com.microsoft.samples.google.v1p1alpha.SpeechClient.streamingRecognizeCallable*" type: "Method" package: "com.microsoft.samples.google.v1p1alpha" - summary: "Performs bidirectional streaming speech recognition: receive results while sending audio. This\n method is only available via the gRPC API (not REST).\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   BidiStream bidiStream =\n       speechClient.streamingRecognizeCallable().call();\n   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();\n   bidiStream.send(request);\n   for (StreamingRecognizeResponse response : bidiStream) {\n     // Do something when a response is received.\n   }\n }\n 
" + summary: "Performs bidirectional streaming speech recognition: receive results while sending audio. This\n method is only available via the gRPC API (not REST).\n\n

Sample code:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   BidiStream bidiStream =\n       speechClient.streamingRecognizeCallable().call();\n   StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();\n   bidiStream.send(request);\n   for (StreamingRecognizeResponse response : bidiStream) {\n     // Do something when a response is received.\n   }\n }\n 
" syntax: content: "public final BidiStreamingCallable streamingRecognizeCallable()" return: diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.yml index 08ba1571..19fbd1f3 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.v1p1alpha.yml @@ -12,6 +12,7 @@ items: type: "Namespace" syntax: content: "package com.microsoft.samples.google.v1p1alpha" + javaType: "package" references: - uid: "com.microsoft.samples.google.v1p1alpha.SpeechClient" name: "SpeechClient" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.yml index 88353eca..390f1b73 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.google.yml @@ -21,6 +21,7 @@ items: type: "Namespace" syntax: content: "package com.microsoft.samples.google" + javaType: "package" references: - uid: "com.microsoft.samples.google.BetaApi" name: "BetaApi" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.yml index d046aa55..6afdce97 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.offers.yml @@ -12,6 +12,7 @@ items: type: "Namespace" syntax: content: "package com.microsoft.samples.offers" + javaType: "package" references: - uid: "com.microsoft.samples.offers.Offer" name: "Offer" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage(package).yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage(package).yml index 89d9b4ce..19b835a1 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage(package).yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage(package).yml @@ -18,6 +18,7 @@ items: summary: "This subpackage contains the sample set of classes for testing DocFx doclet." syntax: content: "package com.microsoft.samples.subpackage" + javaType: "package" references: - uid: "com.microsoft.samples.subpackage.CustomException" name: "CustomException" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.CustomException.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.CustomException.yml index 9ecf8bd3..0ff94f3c 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.CustomException.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.subpackage.CustomException.yml @@ -43,6 +43,7 @@ items: - "java.lang.Throwable.printStackTrace(java.io.PrintWriter)" - "java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])" - "java.lang.Throwable.toString()" + javaType: "exception" - uid: "com.microsoft.samples.subpackage.CustomException.CustomException(java.lang.String)" id: "CustomException(java.lang.String)" parent: "com.microsoft.samples.subpackage.CustomException" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml index bd34b118..b6c5a0ad 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml @@ -16,9 +16,10 @@ items: nameWithType: "com.microsoft.samples" fullName: "com.microsoft.samples" type: "Namespace" - summary: "The interfaces provided are listed below, along with usage samples.\n\n

SpeechClient

\n\n

Service Description: Service that implements Google Cloud Speech API.\n\n

Sample for SpeechClient:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

AdaptationClient

\n\n

Service Description: Service that implements Google Cloud Speech Adaptation API.\n\n

Sample for AdaptationClient:\n\n

\n try (AdaptationClient adaptationClient = AdaptationClient.create()) {\n   LocationName parent = LocationName.of(\"[PROJECT]\", \"[LOCATION]\");\n   PhraseSet phraseSet = PhraseSet.newBuilder().build();\n   String phraseSetId = \"phraseSetId959902180\";\n   PhraseSet response = adaptationClient.createPhraseSet(parent, phraseSet, phraseSetId);\n }\n 
" + summary: "The interfaces provided are listed below, along with usage samples.\n\n

SpeechClient

\n\n

Service Description: Service that implements Google Cloud Speech API.\n\n

Sample for SpeechClient:\n\n

\n try (SpeechClient speechClient = SpeechClient.create()) {\n   RecognitionConfig config = RecognitionConfig.newBuilder().build();\n   RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n   RecognizeResponse response = speechClient.recognize(config, audio);\n }\n 
\n\n

AdaptationClient

\n\n

Service Description: Service that implements Google Cloud Speech Adaptation API.\n\n

Sample for AdaptationClient:\n\n

\n try (AdaptationClient adaptationClient = AdaptationClient.create()) {\n   LocationName parent = LocationName.of(\"[PROJECT]\", \"[LOCATION]\");\n   PhraseSet phraseSet = PhraseSet.newBuilder().build();\n   String phraseSetId = \"phraseSetId959902180\";\n   PhraseSet response = adaptationClient.createPhraseSet(parent, phraseSet, phraseSetId);\n }\n 
" syntax: content: "package com.microsoft.samples" + javaType: "package" references: - uid: "com.microsoft.samples.BasePartnerComponent" name: "BasePartnerComponent" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/overview.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/overview.yml new file mode 100644 index 00000000..ea4eedf2 --- /dev/null +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/overview.yml @@ -0,0 +1,51 @@ +### YamlMime:ManagedReference +items: +- uid: "google-cloud-project" + children: + - "com.microsoft.samples" + - "com.microsoft.samples.agreements" + - "com.microsoft.samples.commentinheritance" + - "com.microsoft.samples.google" + - "com.microsoft.samples.google.v1beta" + - "com.microsoft.samples.google.v1p1alpha" + - "com.microsoft.samples.offers" + - "com.microsoft.samples.subpackage" + langs: + - "java" + nameWithType: "google-cloud-project" + fullName: "google-cloud-project" + type: "Namespace" + javaType: "overview" +references: +- uid: "com.microsoft.samples.agreements" + name: "com.microsoft.samples.agreements" + nameWithType: "com.microsoft.samples.agreements" + fullName: "com.microsoft.samples.agreements" +- uid: "com.microsoft.samples.commentinheritance" + name: "com.microsoft.samples.commentinheritance" + nameWithType: "com.microsoft.samples.commentinheritance" + fullName: "com.microsoft.samples.commentinheritance" +- uid: "com.microsoft.samples.google" + name: "com.microsoft.samples.google" + nameWithType: "com.microsoft.samples.google" + fullName: "com.microsoft.samples.google" +- uid: "com.microsoft.samples.offers" + name: "com.microsoft.samples.offers" + nameWithType: "com.microsoft.samples.offers" + fullName: "com.microsoft.samples.offers" +- uid: "com.microsoft.samples" + name: "com.microsoft.samples" + nameWithType: "com.microsoft.samples" + fullName: "com.microsoft.samples" +- uid: "com.microsoft.samples.subpackage" + name: "com.microsoft.samples.subpackage" + nameWithType: "com.microsoft.samples.subpackage" + fullName: "com.microsoft.samples.subpackage" +- uid: "com.microsoft.samples.google.v1beta" + name: "com.microsoft.samples.google.v1beta" + nameWithType: "com.microsoft.samples.google.v1beta" + fullName: "com.microsoft.samples.google.v1beta" +- uid: "com.microsoft.samples.google.v1p1alpha" + name: "com.microsoft.samples.google.v1p1alpha" + nameWithType: "com.microsoft.samples.google.v1p1alpha" + fullName: "com.microsoft.samples.google.v1p1alpha" diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/toc.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/toc.yml index c460a0f6..e03f636c 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/toc.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/toc.yml @@ -1,6 +1,8 @@ ### YamlMime:TableOfContent - name: "google-cloud-project" items: + - name: "Overview" + href: "overview.html" - name: "Version history" href: "history.md" - uid: "com.microsoft.samples"