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

Commit

Permalink
chore: migrate to microgenerator (#421)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/f5b22665-d6d4-4957-932f-6bd5e7f41f50/targets

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

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: 345057013
Source-Link: googleapis/googleapis@0cf640e
PiperOrigin-RevId: 344134135
Source-Link: googleapis/googleapis@b11a87f
  • Loading branch information
yoshi-automation committed Dec 15, 2020
1 parent 3eee3bb commit 5e2af2a
Show file tree
Hide file tree
Showing 51 changed files with 5,454 additions and 6,305 deletions.
1,327 changes: 139 additions & 1,188 deletions google-cloud-automl/src/main/java/com/google/cloud/automl/v1/AutoMlClient.java

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.automl.v1;

import static com.google.cloud.automl.v1.AutoMlClient.ListDatasetsPagedResponse;
Expand All @@ -38,7 +39,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 AutoMlClient}.
*
Expand All @@ -55,31 +56,29 @@
*
* <p>For example, to set the total timeout of getDataset to 30 seconds:
*
* <pre>
* <code>
* AutoMlSettings.Builder autoMlSettingsBuilder =
* AutoMlSettings.newBuilder();
* <pre>{@code
* AutoMlSettings.Builder autoMlSettingsBuilder = AutoMlSettings.newBuilder();
* autoMlSettingsBuilder
* .getDatasetSettings()
* .setRetrySettings(
* autoMlSettingsBuilder.getDatasetSettings().getRetrySettings().toBuilder()
* autoMlSettingsBuilder
* .getDatasetSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AutoMlSettings autoMlSettings = autoMlSettingsBuilder.build();
* </code>
* </pre>
* }</pre>
*/
@Generated("by gapic-generator")
@BetaApi
@Generated("by gapic-generator-java")
public class AutoMlSettings extends ClientSettings<AutoMlSettings> {

/** Returns the object with the settings used for calls to createDataset. */
public UnaryCallSettings<CreateDatasetRequest, Operation> createDatasetSettings() {
return ((AutoMlStubSettings) getStubSettings()).createDatasetSettings();
}

/** Returns the object with the settings used for calls to createDataset. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<CreateDatasetRequest, Dataset, OperationMetadata>
createDatasetOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).createDatasetOperationSettings();
Expand Down Expand Up @@ -107,8 +106,6 @@ public UnaryCallSettings<DeleteDatasetRequest, Operation> deleteDatasetSettings(
}

/** Returns the object with the settings used for calls to deleteDataset. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<DeleteDatasetRequest, Empty, OperationMetadata>
deleteDatasetOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).deleteDatasetOperationSettings();
Expand All @@ -120,8 +117,6 @@ public UnaryCallSettings<ImportDataRequest, Operation> importDataSettings() {
}

/** Returns the object with the settings used for calls to importData. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<ImportDataRequest, Empty, OperationMetadata>
importDataOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).importDataOperationSettings();
Expand All @@ -133,8 +128,6 @@ public UnaryCallSettings<ExportDataRequest, Operation> exportDataSettings() {
}

/** Returns the object with the settings used for calls to exportData. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<ExportDataRequest, Empty, OperationMetadata>
exportDataOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).exportDataOperationSettings();
Expand All @@ -151,8 +144,6 @@ public UnaryCallSettings<CreateModelRequest, Operation> createModelSettings() {
}

/** Returns the object with the settings used for calls to createModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<CreateModelRequest, Model, OperationMetadata>
createModelOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).createModelOperationSettings();
Expand All @@ -175,8 +166,6 @@ public UnaryCallSettings<DeleteModelRequest, Operation> deleteModelSettings() {
}

/** Returns the object with the settings used for calls to deleteModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<DeleteModelRequest, Empty, OperationMetadata>
deleteModelOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).deleteModelOperationSettings();
Expand All @@ -193,8 +182,6 @@ public UnaryCallSettings<DeployModelRequest, Operation> deployModelSettings() {
}

/** Returns the object with the settings used for calls to deployModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<DeployModelRequest, Empty, OperationMetadata>
deployModelOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).deployModelOperationSettings();
Expand All @@ -206,8 +193,6 @@ public UnaryCallSettings<UndeployModelRequest, Operation> undeployModelSettings(
}

/** Returns the object with the settings used for calls to undeployModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<UndeployModelRequest, Empty, OperationMetadata>
undeployModelOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).undeployModelOperationSettings();
Expand All @@ -219,8 +204,6 @@ public UnaryCallSettings<ExportModelRequest, Operation> exportModelSettings() {
}

/** Returns the object with the settings used for calls to exportModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<ExportModelRequest, Empty, OperationMetadata>
exportModelOperationSettings() {
return ((AutoMlStubSettings) getStubSettings()).exportModelOperationSettings();
Expand Down Expand Up @@ -300,18 +283,15 @@ protected AutoMlSettings(Builder settingsBuilder) throws IOException {

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

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

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

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

protected Builder(AutoMlSettings settings) {
super(settings.getStubSettings().toBuilder());
}
Expand All @@ -320,11 +300,15 @@ protected Builder(AutoMlStubSettings.Builder stubSettings) {
super(stubSettings);
}

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

public AutoMlStubSettings.Builder getStubSettingsBuilder() {
return ((AutoMlStubSettings.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 @@ -343,8 +327,6 @@ public UnaryCallSettings.Builder<CreateDatasetRequest, Operation> createDatasetS
}

/** Returns the builder for the settings used for calls to createDataset. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateDatasetRequest, Dataset, OperationMetadata>
createDatasetOperationSettings() {
return getStubSettingsBuilder().createDatasetOperationSettings();
Expand Down Expand Up @@ -373,8 +355,6 @@ public UnaryCallSettings.Builder<DeleteDatasetRequest, Operation> deleteDatasetS
}

/** Returns the builder for the settings used for calls to deleteDataset. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<DeleteDatasetRequest, Empty, OperationMetadata>
deleteDatasetOperationSettings() {
return getStubSettingsBuilder().deleteDatasetOperationSettings();
Expand All @@ -386,8 +366,6 @@ public UnaryCallSettings.Builder<ImportDataRequest, Operation> importDataSetting
}

/** Returns the builder for the settings used for calls to importData. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<ImportDataRequest, Empty, OperationMetadata>
importDataOperationSettings() {
return getStubSettingsBuilder().importDataOperationSettings();
Expand All @@ -399,8 +377,6 @@ public UnaryCallSettings.Builder<ExportDataRequest, Operation> exportDataSetting
}

/** Returns the builder for the settings used for calls to exportData. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<ExportDataRequest, Empty, OperationMetadata>
exportDataOperationSettings() {
return getStubSettingsBuilder().exportDataOperationSettings();
Expand All @@ -418,8 +394,6 @@ public UnaryCallSettings.Builder<CreateModelRequest, Operation> createModelSetti
}

/** Returns the builder for the settings used for calls to createModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateModelRequest, Model, OperationMetadata>
createModelOperationSettings() {
return getStubSettingsBuilder().createModelOperationSettings();
Expand All @@ -442,8 +416,6 @@ public UnaryCallSettings.Builder<DeleteModelRequest, Operation> deleteModelSetti
}

/** Returns the builder for the settings used for calls to deleteModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<DeleteModelRequest, Empty, OperationMetadata>
deleteModelOperationSettings() {
return getStubSettingsBuilder().deleteModelOperationSettings();
Expand All @@ -460,8 +432,6 @@ public UnaryCallSettings.Builder<DeployModelRequest, Operation> deployModelSetti
}

/** Returns the builder for the settings used for calls to deployModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<DeployModelRequest, Empty, OperationMetadata>
deployModelOperationSettings() {
return getStubSettingsBuilder().deployModelOperationSettings();
Expand All @@ -473,8 +443,6 @@ public UnaryCallSettings.Builder<UndeployModelRequest, Operation> undeployModelS
}

/** Returns the builder for the settings used for calls to undeployModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<UndeployModelRequest, Empty, OperationMetadata>
undeployModelOperationSettings() {
return getStubSettingsBuilder().undeployModelOperationSettings();
Expand All @@ -486,8 +454,6 @@ public UnaryCallSettings.Builder<ExportModelRequest, Operation> exportModelSetti
}

/** Returns the builder for the settings used for calls to exportModel. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<ExportModelRequest, Empty, OperationMetadata>
exportModelOperationSettings() {
return getStubSettingsBuilder().exportModelOperationSettings();
Expand Down

0 comments on commit 5e2af2a

Please sign in to comment.