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

fix: migrate to grpc_service_config #207

Merged
merged 2 commits into from Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -59,16 +59,16 @@
* <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 deleteDataset to 30 seconds:
* <p>For example, to set the total timeout of createDataset to 30 seconds:
*
* <pre>
* <code>
* DataLabelingServiceSettings.Builder dataLabelingServiceSettingsBuilder =
* DataLabelingServiceSettings.newBuilder();
* dataLabelingServiceSettingsBuilder
* .deleteDatasetSettings()
* .createDatasetSettings()
* .setRetrySettings(
* dataLabelingServiceSettingsBuilder.deleteDatasetSettings().getRetrySettings().toBuilder()
* dataLabelingServiceSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DataLabelingServiceSettings dataLabelingServiceSettings = dataLabelingServiceSettingsBuilder.build();
Expand All @@ -78,41 +78,6 @@
@Generated("by gapic-generator")
@BetaApi
public class DataLabelingServiceSettings extends ClientSettings<DataLabelingServiceSettings> {
/** Returns the object with the settings used for calls to deleteDataset. */
public UnaryCallSettings<DeleteDatasetRequest, Empty> deleteDatasetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteDatasetSettings();
}

/** Returns the object with the settings used for calls to exportData. */
public UnaryCallSettings<ExportDataRequest, Operation> exportDataSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).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() {
return ((DataLabelingServiceStubSettings) getStubSettings()).exportDataOperationSettings();
}

/** Returns the object with the settings used for calls to deleteAnnotationSpecSet. */
public UnaryCallSettings<DeleteAnnotationSpecSetRequest, Empty>
deleteAnnotationSpecSetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteAnnotationSpecSetSettings();
}

/** Returns the object with the settings used for calls to deleteInstruction. */
public UnaryCallSettings<DeleteInstructionRequest, Empty> deleteInstructionSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteInstructionSettings();
}

/** Returns the object with the settings used for calls to deleteEvaluationJob. */
public UnaryCallSettings<DeleteEvaluationJobRequest, Empty> deleteEvaluationJobSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteEvaluationJobSettings();
}

/** Returns the object with the settings used for calls to createDataset. */
public UnaryCallSettings<CreateDatasetRequest, Dataset> createDatasetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).createDatasetSettings();
Expand All @@ -129,6 +94,11 @@ public UnaryCallSettings<GetDatasetRequest, Dataset> getDatasetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).listDatasetsSettings();
}

/** Returns the object with the settings used for calls to deleteDataset. */
public UnaryCallSettings<DeleteDatasetRequest, Empty> deleteDatasetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteDatasetSettings();
}

/** Returns the object with the settings used for calls to importData. */
public UnaryCallSettings<ImportDataRequest, Operation> importDataSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).importDataSettings();
Expand All @@ -143,6 +113,20 @@ public UnaryCallSettings<ImportDataRequest, Operation> importDataSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).importDataOperationSettings();
}

/** Returns the object with the settings used for calls to exportData. */
public UnaryCallSettings<ExportDataRequest, Operation> exportDataSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).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() {
return ((DataLabelingServiceStubSettings) getStubSettings()).exportDataOperationSettings();
}

/** Returns the object with the settings used for calls to getDataItem. */
public UnaryCallSettings<GetDataItemRequest, DataItem> getDataItemSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).getDataItemSettings();
Expand Down Expand Up @@ -245,6 +229,12 @@ public UnaryCallSettings<GetExampleRequest, Example> getExampleSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).listAnnotationSpecSetsSettings();
}

/** Returns the object with the settings used for calls to deleteAnnotationSpecSet. */
public UnaryCallSettings<DeleteAnnotationSpecSetRequest, Empty>
deleteAnnotationSpecSetSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteAnnotationSpecSetSettings();
}

/** Returns the object with the settings used for calls to createInstruction. */
public UnaryCallSettings<CreateInstructionRequest, Operation> createInstructionSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).createInstructionSettings();
Expand All @@ -271,6 +261,11 @@ public UnaryCallSettings<GetInstructionRequest, Instruction> getInstructionSetti
return ((DataLabelingServiceStubSettings) getStubSettings()).listInstructionsSettings();
}

/** Returns the object with the settings used for calls to deleteInstruction. */
public UnaryCallSettings<DeleteInstructionRequest, Empty> deleteInstructionSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteInstructionSettings();
}

/** Returns the object with the settings used for calls to getEvaluation. */
public UnaryCallSettings<GetEvaluationRequest, Evaluation> getEvaluationSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).getEvaluationSettings();
Expand Down Expand Up @@ -319,6 +314,11 @@ public UnaryCallSettings<ResumeEvaluationJobRequest, Empty> resumeEvaluationJobS
return ((DataLabelingServiceStubSettings) getStubSettings()).resumeEvaluationJobSettings();
}

/** Returns the object with the settings used for calls to deleteEvaluationJob. */
public UnaryCallSettings<DeleteEvaluationJobRequest, Empty> deleteEvaluationJobSettings() {
return ((DataLabelingServiceStubSettings) getStubSettings()).deleteEvaluationJobSettings();
}

/** Returns the object with the settings used for calls to listEvaluationJobs. */
public PagedCallSettings<
ListEvaluationJobsRequest, ListEvaluationJobsResponse, ListEvaluationJobsPagedResponse>
Expand Down Expand Up @@ -423,42 +423,6 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to deleteDataset. */
public UnaryCallSettings.Builder<DeleteDatasetRequest, Empty> deleteDatasetSettings() {
return getStubSettingsBuilder().deleteDatasetSettings();
}

/** Returns the builder for the settings used for calls to exportData. */
public UnaryCallSettings.Builder<ExportDataRequest, Operation> exportDataSettings() {
return getStubSettingsBuilder().exportDataSettings();
}

/** 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() {
return getStubSettingsBuilder().exportDataOperationSettings();
}

/** Returns the builder for the settings used for calls to deleteAnnotationSpecSet. */
public UnaryCallSettings.Builder<DeleteAnnotationSpecSetRequest, Empty>
deleteAnnotationSpecSetSettings() {
return getStubSettingsBuilder().deleteAnnotationSpecSetSettings();
}

/** Returns the builder for the settings used for calls to deleteInstruction. */
public UnaryCallSettings.Builder<DeleteInstructionRequest, Empty> deleteInstructionSettings() {
return getStubSettingsBuilder().deleteInstructionSettings();
}

/** Returns the builder for the settings used for calls to deleteEvaluationJob. */
public UnaryCallSettings.Builder<DeleteEvaluationJobRequest, Empty>
deleteEvaluationJobSettings() {
return getStubSettingsBuilder().deleteEvaluationJobSettings();
}

/** Returns the builder for the settings used for calls to createDataset. */
public UnaryCallSettings.Builder<CreateDatasetRequest, Dataset> createDatasetSettings() {
return getStubSettingsBuilder().createDatasetSettings();
Expand All @@ -476,6 +440,11 @@ public UnaryCallSettings.Builder<GetDatasetRequest, Dataset> getDatasetSettings(
return getStubSettingsBuilder().listDatasetsSettings();
}

/** Returns the builder for the settings used for calls to deleteDataset. */
public UnaryCallSettings.Builder<DeleteDatasetRequest, Empty> deleteDatasetSettings() {
return getStubSettingsBuilder().deleteDatasetSettings();
}

/** Returns the builder for the settings used for calls to importData. */
public UnaryCallSettings.Builder<ImportDataRequest, Operation> importDataSettings() {
return getStubSettingsBuilder().importDataSettings();
Expand All @@ -490,6 +459,20 @@ public UnaryCallSettings.Builder<ImportDataRequest, Operation> importDataSetting
return getStubSettingsBuilder().importDataOperationSettings();
}

/** Returns the builder for the settings used for calls to exportData. */
public UnaryCallSettings.Builder<ExportDataRequest, Operation> exportDataSettings() {
return getStubSettingsBuilder().exportDataSettings();
}

/** 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() {
return getStubSettingsBuilder().exportDataOperationSettings();
}

/** Returns the builder for the settings used for calls to getDataItem. */
public UnaryCallSettings.Builder<GetDataItemRequest, DataItem> getDataItemSettings() {
return getStubSettingsBuilder().getDataItemSettings();
Expand Down Expand Up @@ -597,6 +580,12 @@ public UnaryCallSettings.Builder<GetExampleRequest, Example> getExampleSettings(
return getStubSettingsBuilder().listAnnotationSpecSetsSettings();
}

/** Returns the builder for the settings used for calls to deleteAnnotationSpecSet. */
public UnaryCallSettings.Builder<DeleteAnnotationSpecSetRequest, Empty>
deleteAnnotationSpecSetSettings() {
return getStubSettingsBuilder().deleteAnnotationSpecSetSettings();
}

/** Returns the builder for the settings used for calls to createInstruction. */
public UnaryCallSettings.Builder<CreateInstructionRequest, Operation>
createInstructionSettings() {
Expand Down Expand Up @@ -624,6 +613,11 @@ public UnaryCallSettings.Builder<GetInstructionRequest, Instruction> getInstruct
return getStubSettingsBuilder().listInstructionsSettings();
}

/** Returns the builder for the settings used for calls to deleteInstruction. */
public UnaryCallSettings.Builder<DeleteInstructionRequest, Empty> deleteInstructionSettings() {
return getStubSettingsBuilder().deleteInstructionSettings();
}

/** Returns the builder for the settings used for calls to getEvaluation. */
public UnaryCallSettings.Builder<GetEvaluationRequest, Evaluation> getEvaluationSettings() {
return getStubSettingsBuilder().getEvaluationSettings();
Expand Down Expand Up @@ -675,6 +669,12 @@ public UnaryCallSettings.Builder<GetEvaluationRequest, Evaluation> getEvaluation
return getStubSettingsBuilder().resumeEvaluationJobSettings();
}

/** Returns the builder for the settings used for calls to deleteEvaluationJob. */
public UnaryCallSettings.Builder<DeleteEvaluationJobRequest, Empty>
deleteEvaluationJobSettings() {
return getStubSettingsBuilder().deleteEvaluationJobSettings();
}

/** Returns the builder for the settings used for calls to listEvaluationJobs. */
public PagedCallSettings.Builder<
ListEvaluationJobsRequest, ListEvaluationJobsResponse, ListEvaluationJobsPagedResponse>
Expand Down
Expand Up @@ -28,8 +28,9 @@
* <pre>
* <code>
* try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
* DatasetName name = DatasetName.of("[PROJECT]", "[DATASET]");
* dataLabelingServiceClient.deleteDataset(name);
* ProjectName parent = ProjectName.of("[PROJECT]");
* Dataset dataset = Dataset.newBuilder().build();
* Dataset response = dataLabelingServiceClient.createDataset(parent, dataset);
* }
* </code>
* </pre>
Expand Down
Expand Up @@ -106,33 +106,6 @@ public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}

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<
ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata>
exportDataOperationCallable() {
throw new UnsupportedOperationException("Not implemented: exportDataOperationCallable()");
}

public UnaryCallable<ExportDataRequest, Operation> exportDataCallable() {
throw new UnsupportedOperationException("Not implemented: exportDataCallable()");
}

public UnaryCallable<DeleteAnnotationSpecSetRequest, Empty> deleteAnnotationSpecSetCallable() {
throw new UnsupportedOperationException("Not implemented: deleteAnnotationSpecSetCallable()");
}

public UnaryCallable<DeleteInstructionRequest, Empty> deleteInstructionCallable() {
throw new UnsupportedOperationException("Not implemented: deleteInstructionCallable()");
}

public UnaryCallable<DeleteEvaluationJobRequest, Empty> deleteEvaluationJobCallable() {
throw new UnsupportedOperationException("Not implemented: deleteEvaluationJobCallable()");
}

public UnaryCallable<CreateDatasetRequest, Dataset> createDatasetCallable() {
throw new UnsupportedOperationException("Not implemented: createDatasetCallable()");
}
Expand All @@ -149,6 +122,10 @@ public UnaryCallable<ListDatasetsRequest, ListDatasetsResponse> listDatasetsCall
throw new UnsupportedOperationException("Not implemented: listDatasetsCallable()");
}

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>
Expand All @@ -160,6 +137,17 @@ 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() {
throw new UnsupportedOperationException("Not implemented: exportDataOperationCallable()");
}

public UnaryCallable<ExportDataRequest, Operation> exportDataCallable() {
throw new UnsupportedOperationException("Not implemented: exportDataCallable()");
}

public UnaryCallable<GetDataItemRequest, DataItem> getDataItemCallable() {
throw new UnsupportedOperationException("Not implemented: getDataItemCallable()");
}
Expand Down Expand Up @@ -255,6 +243,10 @@ public UnaryCallable<ListExamplesRequest, ListExamplesResponse> listExamplesCall
throw new UnsupportedOperationException("Not implemented: listAnnotationSpecSetsCallable()");
}

public UnaryCallable<DeleteAnnotationSpecSetRequest, Empty> deleteAnnotationSpecSetCallable() {
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() {
Expand All @@ -280,6 +272,10 @@ public UnaryCallable<GetInstructionRequest, Instruction> getInstructionCallable(
throw new UnsupportedOperationException("Not implemented: listInstructionsCallable()");
}

public UnaryCallable<DeleteInstructionRequest, Empty> deleteInstructionCallable() {
throw new UnsupportedOperationException("Not implemented: deleteInstructionCallable()");
}

public UnaryCallable<GetEvaluationRequest, Evaluation> getEvaluationCallable() {
throw new UnsupportedOperationException("Not implemented: getEvaluationCallable()");
}
Expand Down Expand Up @@ -325,6 +321,10 @@ public UnaryCallable<ResumeEvaluationJobRequest, Empty> resumeEvaluationJobCalla
throw new UnsupportedOperationException("Not implemented: resumeEvaluationJobCallable()");
}

public UnaryCallable<DeleteEvaluationJobRequest, Empty> deleteEvaluationJobCallable() {
throw new UnsupportedOperationException("Not implemented: deleteEvaluationJobCallable()");
}

public UnaryCallable<ListEvaluationJobsRequest, ListEvaluationJobsPagedResponse>
listEvaluationJobsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listEvaluationJobsPagedCallable()");
Expand Down