Skip to content

Commit

Permalink
docs: [translate] fix minor docstring formatting (#8884)
Browse files Browse the repository at this point in the history
* docs: fix minor docstring formatting

PiperOrigin-RevId: 493589316

Source-Link: googleapis/googleapis@02e3850

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab49dcf5608e7159d07f53bd888f97d2092035e7
Copy-Tag: eyJwIjoiamF2YS10cmFuc2xhdGUvLk93bEJvdC55YW1sIiwiaCI6ImFiNDlkY2Y1NjA4ZTcxNTlkMDdmNTNiZDg4OGY5N2QyMDkyMDM1ZTcifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Dec 7, 2022
1 parent 1169d9e commit 29d1889
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 60 deletions.
32 changes: 16 additions & 16 deletions java-translate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-translate</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-translate:2.5.0'
implementation 'com.google.cloud:google-cloud-translate:2.6.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.5.0"
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.6.0"
```

## Authentication
Expand Down Expand Up @@ -236,16 +236,16 @@ Java is a registered trademark of Oracle and/or its affiliates.

[product-docs]: https://cloud.google.com/translate/docs/
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-translate/latest/overview
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-translate/java11.html
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-translate.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-translate&core=gav
Expand All @@ -257,9 +257,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-translate/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-translate/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-translate/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=translation.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<TranslateTextRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build(), false))
.toBody("*", request.toBuilder().clearParent().build(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<TranslateTextResponse>newBuilder()
Expand Down Expand Up @@ -147,12 +148,13 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<DetectLanguageRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build(), false))
.toBody("*", request.toBuilder().clearParent().build(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<DetectLanguageResponse>newBuilder()
Expand Down Expand Up @@ -188,6 +190,7 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
serializer.putQueryParam(
fields, "displayLanguageCode", request.getDisplayLanguageCode());
serializer.putQueryParam(fields, "model", request.getModel());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down Expand Up @@ -221,12 +224,13 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<TranslateDocumentRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build(), false))
.toBody("*", request.toBuilder().clearParent().build(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<TranslateDocumentResponse>newBuilder()
Expand Down Expand Up @@ -258,12 +262,13 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<BatchTranslateTextRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build(), false))
.toBody("*", request.toBuilder().clearParent().build(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down Expand Up @@ -298,12 +303,13 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<BatchTranslateDocumentRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build(), false))
.toBody("*", request.toBuilder().clearParent().build(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down Expand Up @@ -337,12 +343,13 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<CreateGlossaryRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("glossary", request.getGlossary(), false))
.toBody("glossary", request.getGlossary(), true))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down Expand Up @@ -379,6 +386,7 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
serializer.putQueryParam(fields, "filter", request.getFilter());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down Expand Up @@ -412,6 +420,7 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<GetGlossaryRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down Expand Up @@ -445,6 +454,7 @@ public class HttpJsonTranslationServiceStub extends TranslationServiceStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<DeleteGlossaryRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
.setRequestBodyExtractor(request -> null)
Expand Down
Loading

0 comments on commit 29d1889

Please sign in to comment.