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 (#352)
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/a0fa0bb5-ad7e-435c-ac39-17051adf64ae/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: 345056993
Source-Link: googleapis/googleapis@544be80
PiperOrigin-RevId: 344134135
Source-Link: googleapis/googleapis@b11a87f
  • Loading branch information
yoshi-automation committed Dec 14, 2020
1 parent 330692e commit 9c85d18
Show file tree
Hide file tree
Showing 20 changed files with 3,914 additions and 4,227 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
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.datalabeling.v1beta1;

import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse;
Expand Down Expand Up @@ -44,7 +45,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 DataLabelingServiceClient}.
*
Expand All @@ -61,23 +62,25 @@
*
* <p>For example, to set the total timeout of createDataset to 30 seconds:
*
* <pre>
* <code>
* <pre>{@code
* DataLabelingServiceSettings.Builder dataLabelingServiceSettingsBuilder =
* DataLabelingServiceSettings.newBuilder();
* dataLabelingServiceSettingsBuilder
* .createDatasetSettings()
* .setRetrySettings(
* dataLabelingServiceSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
* dataLabelingServiceSettingsBuilder
* .createDatasetSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DataLabelingServiceSettings dataLabelingServiceSettings = dataLabelingServiceSettingsBuilder.build();
* </code>
* </pre>
* DataLabelingServiceSettings dataLabelingServiceSettings =
* dataLabelingServiceSettingsBuilder.build();
* }</pre>
*/
@Generated("by gapic-generator")
@BetaApi
@Generated("by gapic-generator-java")
public class DataLabelingServiceSettings extends ClientSettings<DataLabelingServiceSettings> {

/** Returns the object with the settings used for calls to createDataset. */
public UnaryCallSettings<CreateDatasetRequest, Dataset> createDatasetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).createDatasetSettings();
Expand Down Expand Up @@ -105,8 +108,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, ImportDataOperationResponse, ImportDataOperationMetadata>
importDataOperationSettings() {
Expand All @@ -119,8 +120,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, ExportDataOperationResponse, ExportDataOperationMetadata>
exportDataOperationSettings() {
Expand Down Expand Up @@ -164,8 +163,6 @@ public UnaryCallSettings<LabelImageRequest, Operation> labelImageSettings() {
}

/** Returns the object with the settings used for calls to labelImage. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<LabelImageRequest, AnnotatedDataset, LabelOperationMetadata>
labelImageOperationSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).labelImageOperationSettings();
Expand All @@ -177,8 +174,6 @@ public UnaryCallSettings<LabelVideoRequest, Operation> labelVideoSettings() {
}

/** Returns the object with the settings used for calls to labelVideo. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<LabelVideoRequest, AnnotatedDataset, LabelOperationMetadata>
labelVideoOperationSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).labelVideoOperationSettings();
Expand All @@ -190,8 +185,6 @@ public UnaryCallSettings<LabelTextRequest, Operation> labelTextSettings() {
}

/** Returns the object with the settings used for calls to labelText. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<LabelTextRequest, AnnotatedDataset, LabelOperationMetadata>
labelTextOperationSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).labelTextOperationSettings();
Expand Down Expand Up @@ -241,8 +234,6 @@ public UnaryCallSettings<CreateInstructionRequest, Operation> createInstructionS
}

/** Returns the object with the settings used for calls to createInstruction. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<CreateInstructionRequest, Instruction, CreateInstructionMetadata>
createInstructionOperationSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings())
Expand Down Expand Up @@ -386,18 +377,15 @@ protected DataLabelingServiceSettings(Builder settingsBuilder) throws IOExceptio

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

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

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

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

protected Builder(DataLabelingServiceSettings settings) {
super(settings.getStubSettings().toBuilder());
}
Expand All @@ -406,11 +394,15 @@ protected Builder(DataLabelingServiceStubSettings.Builder stubSettings) {
super(stubSettings);
}

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

public DataLabelingServiceStubSettings.Builder getStubSettingsBuilder() {
return ((DataLabelingServiceStubSettings.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 Down Expand Up @@ -451,8 +443,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, ImportDataOperationResponse, ImportDataOperationMetadata>
importDataOperationSettings() {
Expand All @@ -465,8 +455,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, ExportDataOperationResponse, ExportDataOperationMetadata>
exportDataOperationSettings() {
Expand Down Expand Up @@ -512,8 +500,6 @@ public UnaryCallSettings.Builder<LabelImageRequest, Operation> labelImageSetting
}

/** Returns the builder for the settings used for calls to labelImage. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
LabelImageRequest, AnnotatedDataset, LabelOperationMetadata>
labelImageOperationSettings() {
Expand All @@ -526,8 +512,6 @@ public UnaryCallSettings.Builder<LabelVideoRequest, Operation> labelVideoSetting
}

/** Returns the builder for the settings used for calls to labelVideo. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
LabelVideoRequest, AnnotatedDataset, LabelOperationMetadata>
labelVideoOperationSettings() {
Expand All @@ -540,8 +524,6 @@ public UnaryCallSettings.Builder<LabelTextRequest, Operation> labelTextSettings(
}

/** Returns the builder for the settings used for calls to labelText. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<LabelTextRequest, AnnotatedDataset, LabelOperationMetadata>
labelTextOperationSettings() {
return getStubSettingsBuilder().labelTextOperationSettings();
Expand Down Expand Up @@ -593,8 +575,6 @@ public UnaryCallSettings.Builder<GetExampleRequest, Example> getExampleSettings(
}

/** Returns the builder for the settings used for calls to createInstruction. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
CreateInstructionRequest, Instruction, CreateInstructionMetadata>
createInstructionOperationSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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,
Expand All @@ -15,27 +15,15 @@
*/

/**
* A client to Data Labeling API.
* The interfaces provided are listed below, along with usage samples.
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>========================= DataLabelingServiceClient =========================
* <p>======================= DataLabelingServiceClient =======================
*
* <p>Service Description: Service for the AI Platform Data Labeling API.
*
* <p>Sample for DataLabelingServiceClient:
*
* <pre>
* <code>
* try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* Dataset dataset = Dataset.newBuilder().build();
* Dataset response = dataLabelingServiceClient.createDataset(parent, dataset);
* }
* </code>
* </pre>
*/
@Generated("by gapic-generator")
@Generated("by gapic-generator-java")
package com.google.cloud.datalabeling.v1beta1;

import javax.annotation.Generated;
Original file line number Diff line number Diff line change
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.datalabeling.v1beta1.stub;

import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse;
Expand All @@ -25,7 +26,6 @@
import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.SearchEvaluationsPagedResponse;
import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.SearchExampleComparisonsPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
Expand Down Expand Up @@ -91,17 +91,15 @@
import com.google.protobuf.Empty;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Base stub class for Data Labeling API.
* Base stub class for the DataLabelingService service API.
*
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator")
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class DataLabelingServiceStub implements BackgroundResource {

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}
Expand All @@ -126,7 +124,6 @@ public UnaryCallable<DeleteDatasetRequest, Empty> deleteDatasetCallable() {
throw new UnsupportedOperationException("Not implemented: deleteDatasetCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<
ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata>
importDataOperationCallable() {
Expand All @@ -137,7 +134,6 @@ public UnaryCallable<ImportDataRequest, Operation> importDataCallable() {
throw new UnsupportedOperationException("Not implemented: importDataCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<
ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata>
exportDataOperationCallable() {
Expand Down Expand Up @@ -180,7 +176,6 @@ public UnaryCallable<DeleteAnnotatedDatasetRequest, Empty> deleteAnnotatedDatase
throw new UnsupportedOperationException("Not implemented: deleteAnnotatedDatasetCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<LabelImageRequest, AnnotatedDataset, LabelOperationMetadata>
labelImageOperationCallable() {
throw new UnsupportedOperationException("Not implemented: labelImageOperationCallable()");
Expand All @@ -190,7 +185,6 @@ public UnaryCallable<LabelImageRequest, Operation> labelImageCallable() {
throw new UnsupportedOperationException("Not implemented: labelImageCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<LabelVideoRequest, AnnotatedDataset, LabelOperationMetadata>
labelVideoOperationCallable() {
throw new UnsupportedOperationException("Not implemented: labelVideoOperationCallable()");
Expand All @@ -200,7 +194,6 @@ public UnaryCallable<LabelVideoRequest, Operation> labelVideoCallable() {
throw new UnsupportedOperationException("Not implemented: labelVideoCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<LabelTextRequest, AnnotatedDataset, LabelOperationMetadata>
labelTextOperationCallable() {
throw new UnsupportedOperationException("Not implemented: labelTextOperationCallable()");
Expand Down Expand Up @@ -247,7 +240,6 @@ public UnaryCallable<DeleteAnnotationSpecSetRequest, Empty> deleteAnnotationSpec
throw new UnsupportedOperationException("Not implemented: deleteAnnotationSpecSetCallable()");
}

@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable<CreateInstructionRequest, Instruction, CreateInstructionMetadata>
createInstructionOperationCallable() {
throw new UnsupportedOperationException(
Expand Down

0 comments on commit 9c85d18

Please sign in to comment.