Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat(v1): add TextDetectionParams.enable_text_detection_confidence_sc…
Browse files Browse the repository at this point in the history
…ore (#352)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/8cf6f1ed-b8f7-4401-820f-48788136f433/targets

- [ ] To automatically regenerate this PR, check this box.

feat(v1): add TextDetectionParams.enable_text_detection_confidence_score to ImageContext proto so customer can optionally get confidence score for TEXT_DETECTION feature

PiperOrigin-RevId: 346372957
Source-Link: googleapis/googleapis@857f70d
PiperOrigin-RevId: 346126713
Source-Link: googleapis/googleapis@b8b2f8c
PiperOrigin-RevId: 345476969
Source-Link: googleapis/googleapis@7be2c82
PiperOrigin-RevId: 345067549
Source-Link: googleapis/googleapis@8cfc6c8
PiperOrigin-RevId: 344845074
Source-Link: googleapis/googleapis@d52da58
PiperOrigin-RevId: 344839236
Source-Link: googleapis/googleapis@80a56e0
PiperOrigin-RevId: 344134135
Source-Link: googleapis/googleapis@b11a87f
  • Loading branch information
yoshi-automation committed Jan 7, 2021
1 parent 027024c commit 2d06685
Show file tree
Hide file tree
Showing 129 changed files with 14,826 additions and 10,594 deletions.

Large diffs are not rendered by default.

Expand Up @@ -5,14 +5,15 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.vision.v1;

import com.google.api.core.ApiFunction;
Expand All @@ -32,7 +33,7 @@
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link ImageAnnotatorClient}.
*
Expand All @@ -47,24 +48,32 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of batchAnnotateFiles to 30 seconds:
* <p>For example, to set the total timeout of batchAnnotateImages to 30 seconds:
*
* <pre>
* <code>
* <pre>{@code
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
* ImageAnnotatorSettings.newBuilder();
* imageAnnotatorSettingsBuilder
* .batchAnnotateFilesSettings()
* .batchAnnotateImagesSettings()
* .setRetrySettings(
* imageAnnotatorSettingsBuilder.batchAnnotateFilesSettings().getRetrySettings().toBuilder()
* imageAnnotatorSettingsBuilder
* .batchAnnotateImagesSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
* </code>
* </pre>
* }</pre>
*/
@Generated("by gapic-generator")
@Generated("by gapic-generator-java")
public class ImageAnnotatorSettings extends ClientSettings<ImageAnnotatorSettings> {

/** Returns the object with the settings used for calls to batchAnnotateImages. */
public UnaryCallSettings<BatchAnnotateImagesRequest, BatchAnnotateImagesResponse>
batchAnnotateImagesSettings() {
return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings();
}

/** Returns the object with the settings used for calls to batchAnnotateFiles. */
public UnaryCallSettings<BatchAnnotateFilesRequest, BatchAnnotateFilesResponse>
batchAnnotateFilesSettings() {
Expand All @@ -78,8 +87,6 @@ public class ImageAnnotatorSettings extends ClientSettings<ImageAnnotatorSetting
}

/** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata>
asyncBatchAnnotateImagesOperationSettings() {
Expand All @@ -94,21 +101,13 @@ public class ImageAnnotatorSettings extends ClientSettings<ImageAnnotatorSetting
}

/** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata>
asyncBatchAnnotateFilesOperationSettings() {
return ((ImageAnnotatorStubSettings) getStubSettings())
.asyncBatchAnnotateFilesOperationSettings();
}

/** Returns the object with the settings used for calls to batchAnnotateImages. */
public UnaryCallSettings<BatchAnnotateImagesRequest, BatchAnnotateImagesResponse>
batchAnnotateImagesSettings() {
return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings();
}

public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub)
throws IOException {
return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -169,18 +168,15 @@ protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException {

/** Builder for ImageAnnotatorSettings. */
public static class Builder extends ClientSettings.Builder<ImageAnnotatorSettings, Builder> {

protected Builder() throws IOException {
this((ClientContext) null);
this(((ClientContext) null));
}

protected Builder(ClientContext clientContext) {
super(ImageAnnotatorStubSettings.newBuilder(clientContext));
}

private static Builder createDefault() {
return new Builder(ImageAnnotatorStubSettings.newBuilder());
}

protected Builder(ImageAnnotatorSettings settings) {
super(settings.getStubSettings().toBuilder());
}
Expand All @@ -189,11 +185,15 @@ protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) {
super(stubSettings);
}

private static Builder createDefault() {
return new Builder(ImageAnnotatorStubSettings.newBuilder());
}

public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() {
return ((ImageAnnotatorStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'
// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
Expand All @@ -206,6 +206,12 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to batchAnnotateImages. */
public UnaryCallSettings.Builder<BatchAnnotateImagesRequest, BatchAnnotateImagesResponse>
batchAnnotateImagesSettings() {
return getStubSettingsBuilder().batchAnnotateImagesSettings();
}

/** Returns the builder for the settings used for calls to batchAnnotateFiles. */
public UnaryCallSettings.Builder<BatchAnnotateFilesRequest, BatchAnnotateFilesResponse>
batchAnnotateFilesSettings() {
Expand All @@ -219,8 +225,6 @@ public Builder applyToAllUnaryMethods(
}

/** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata>
asyncBatchAnnotateImagesOperationSettings() {
Expand All @@ -234,20 +238,12 @@ public Builder applyToAllUnaryMethods(
}

/** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata>
asyncBatchAnnotateFilesOperationSettings() {
return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings();
}

/** Returns the builder for the settings used for calls to batchAnnotateImages. */
public UnaryCallSettings.Builder<BatchAnnotateImagesRequest, BatchAnnotateImagesResponse>
batchAnnotateImagesSettings() {
return getStubSettingsBuilder().batchAnnotateImagesSettings();
}

@Override
public ImageAnnotatorSettings build() throws IOException {
return new ImageAnnotatorSettings(this);
Expand Down

0 comments on commit 2d06685

Please sign in to comment.