Skip to content

Commit 77e6526

Browse files
feat: [dataplex] DataScans service (#8902)
- [ ] Regenerate this pull request now. feat: added StorageFormat.iceberg chore: formatting changes PiperOrigin-RevId: 496586743 Source-Link: https://togithub.com/googleapis/googleapis/commit/58f5c439736e80b9f83d89179b8c8c2324782066 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/193c125d04f2649edb821d45b8e6ba6a91c9b090 Copy-Tag: eyJwIjoiamF2YS1kYXRhcGxleC8uT3dsQm90LnlhbWwiLCJoIjoiMTkzYzEyNWQwNGYyNjQ5ZWRiODIxZDQ1YjhlNmJhNmE5MWM5YjA5MCJ9 BEGIN_NESTED_COMMIT docs: [dataplex] fix minor docstring formatting PiperOrigin-RevId: 495317762 Source-Link: https://togithub.com/googleapis/googleapis/commit/d9dc42bf24866ac28c09489feb58590c838ed970 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/6947bc43478b20e5650b62894d0c64137ef39909 Copy-Tag: eyJwIjoiamF2YS1kYXRhcGxleC8uT3dsQm90LnlhbWwiLCJoIjoiNjk0N2JjNDM0NzhiMjBlNTY1MGI2Mjg5NGQwYzY0MTM3ZWYzOTkwOSJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore: [dataplex] reformatted the protos PiperOrigin-RevId: 494247971 Source-Link: https://togithub.com/googleapis/googleapis/commit/f7f499371afaa6fc236b67148aa4bd41943725a6 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/f2b7d97b7ba4713a324aab058cf56c9d7305eb21 Copy-Tag: eyJwIjoiamF2YS1kYXRhcGxleC8uT3dsQm90LnlhbWwiLCJoIjoiZjJiN2Q5N2I3YmE0NzEzYTMyNGFhYjA1OGNmNTZjOWQ3MzA1ZWIyMSJ9 END_NESTED_COMMIT
1 parent 84d9aa0 commit 77e6526

File tree

186 files changed

+78223
-2929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+78223
-2929
lines changed

java-dataplex/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>google-cloud-dataplex</artifactId>
22-
<version>1.4.0</version>
22+
<version>1.5.0</version>
2323
</dependency>
2424
```
2525

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

2828
```Groovy
29-
implementation 'com.google.cloud:google-cloud-dataplex:1.4.0'
29+
implementation 'com.google.cloud:google-cloud-dataplex:1.5.0'
3030
```
3131

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

3434
```Scala
35-
libraryDependencies += "com.google.cloud" % "google-cloud-dataplex" % "1.4.0"
35+
libraryDependencies += "com.google.cloud" % "google-cloud-dataplex" % "1.5.0"
3636
```
3737

3838
## Authentication

java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java

Lines changed: 1759 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 351 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,351 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.dataplex.v1;
18+
19+
import static com.google.cloud.dataplex.v1.DataScanServiceClient.ListDataScanJobsPagedResponse;
20+
import static com.google.cloud.dataplex.v1.DataScanServiceClient.ListDataScansPagedResponse;
21+
import static com.google.cloud.dataplex.v1.DataScanServiceClient.ListLocationsPagedResponse;
22+
23+
import com.google.api.core.ApiFunction;
24+
import com.google.api.core.BetaApi;
25+
import com.google.api.gax.core.GoogleCredentialsProvider;
26+
import com.google.api.gax.core.InstantiatingExecutorProvider;
27+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
28+
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
29+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
30+
import com.google.api.gax.rpc.ClientContext;
31+
import com.google.api.gax.rpc.ClientSettings;
32+
import com.google.api.gax.rpc.OperationCallSettings;
33+
import com.google.api.gax.rpc.PagedCallSettings;
34+
import com.google.api.gax.rpc.TransportChannelProvider;
35+
import com.google.api.gax.rpc.UnaryCallSettings;
36+
import com.google.cloud.dataplex.v1.stub.DataScanServiceStubSettings;
37+
import com.google.cloud.location.GetLocationRequest;
38+
import com.google.cloud.location.ListLocationsRequest;
39+
import com.google.cloud.location.ListLocationsResponse;
40+
import com.google.cloud.location.Location;
41+
import com.google.longrunning.Operation;
42+
import com.google.protobuf.Empty;
43+
import java.io.IOException;
44+
import java.util.List;
45+
import javax.annotation.Generated;
46+
47+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
48+
/**
49+
* Settings class to configure an instance of {@link DataScanServiceClient}.
50+
*
51+
* <p>The default instance has everything set to sensible defaults:
52+
*
53+
* <ul>
54+
* <li>The default service address (dataplex.googleapis.com) and default port (443) are used.
55+
* <li>Credentials are acquired automatically through Application Default Credentials.
56+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
57+
* </ul>
58+
*
59+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
60+
* build() is called, the tree of builders is called to create the complete settings object.
61+
*
62+
* <p>For example, to set the total timeout of getDataScan to 30 seconds:
63+
*
64+
* <pre>{@code
65+
* // This snippet has been automatically generated and should be regarded as a code template only.
66+
* // It will require modifications to work:
67+
* // - It may require correct/in-range values for request initialization.
68+
* // - It may require specifying regional endpoints when creating the service client as shown in
69+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
70+
* DataScanServiceSettings.Builder dataScanServiceSettingsBuilder =
71+
* DataScanServiceSettings.newBuilder();
72+
* dataScanServiceSettingsBuilder
73+
* .getDataScanSettings()
74+
* .setRetrySettings(
75+
* dataScanServiceSettingsBuilder.getDataScanSettings().getRetrySettings().toBuilder()
76+
* .setTotalTimeout(Duration.ofSeconds(30))
77+
* .build());
78+
* DataScanServiceSettings dataScanServiceSettings = dataScanServiceSettingsBuilder.build();
79+
* }</pre>
80+
*/
81+
@Generated("by gapic-generator-java")
82+
public class DataScanServiceSettings extends ClientSettings<DataScanServiceSettings> {
83+
84+
/** Returns the object with the settings used for calls to createDataScan. */
85+
public UnaryCallSettings<CreateDataScanRequest, Operation> createDataScanSettings() {
86+
return ((DataScanServiceStubSettings) getStubSettings()).createDataScanSettings();
87+
}
88+
89+
/** Returns the object with the settings used for calls to createDataScan. */
90+
public OperationCallSettings<CreateDataScanRequest, DataScan, OperationMetadata>
91+
createDataScanOperationSettings() {
92+
return ((DataScanServiceStubSettings) getStubSettings()).createDataScanOperationSettings();
93+
}
94+
95+
/** Returns the object with the settings used for calls to updateDataScan. */
96+
public UnaryCallSettings<UpdateDataScanRequest, Operation> updateDataScanSettings() {
97+
return ((DataScanServiceStubSettings) getStubSettings()).updateDataScanSettings();
98+
}
99+
100+
/** Returns the object with the settings used for calls to updateDataScan. */
101+
public OperationCallSettings<UpdateDataScanRequest, DataScan, OperationMetadata>
102+
updateDataScanOperationSettings() {
103+
return ((DataScanServiceStubSettings) getStubSettings()).updateDataScanOperationSettings();
104+
}
105+
106+
/** Returns the object with the settings used for calls to deleteDataScan. */
107+
public UnaryCallSettings<DeleteDataScanRequest, Operation> deleteDataScanSettings() {
108+
return ((DataScanServiceStubSettings) getStubSettings()).deleteDataScanSettings();
109+
}
110+
111+
/** Returns the object with the settings used for calls to deleteDataScan. */
112+
public OperationCallSettings<DeleteDataScanRequest, Empty, OperationMetadata>
113+
deleteDataScanOperationSettings() {
114+
return ((DataScanServiceStubSettings) getStubSettings()).deleteDataScanOperationSettings();
115+
}
116+
117+
/** Returns the object with the settings used for calls to getDataScan. */
118+
public UnaryCallSettings<GetDataScanRequest, DataScan> getDataScanSettings() {
119+
return ((DataScanServiceStubSettings) getStubSettings()).getDataScanSettings();
120+
}
121+
122+
/** Returns the object with the settings used for calls to listDataScans. */
123+
public PagedCallSettings<ListDataScansRequest, ListDataScansResponse, ListDataScansPagedResponse>
124+
listDataScansSettings() {
125+
return ((DataScanServiceStubSettings) getStubSettings()).listDataScansSettings();
126+
}
127+
128+
/** Returns the object with the settings used for calls to runDataScan. */
129+
public UnaryCallSettings<RunDataScanRequest, RunDataScanResponse> runDataScanSettings() {
130+
return ((DataScanServiceStubSettings) getStubSettings()).runDataScanSettings();
131+
}
132+
133+
/** Returns the object with the settings used for calls to getDataScanJob. */
134+
public UnaryCallSettings<GetDataScanJobRequest, DataScanJob> getDataScanJobSettings() {
135+
return ((DataScanServiceStubSettings) getStubSettings()).getDataScanJobSettings();
136+
}
137+
138+
/** Returns the object with the settings used for calls to listDataScanJobs. */
139+
public PagedCallSettings<
140+
ListDataScanJobsRequest, ListDataScanJobsResponse, ListDataScanJobsPagedResponse>
141+
listDataScanJobsSettings() {
142+
return ((DataScanServiceStubSettings) getStubSettings()).listDataScanJobsSettings();
143+
}
144+
145+
/** Returns the object with the settings used for calls to listLocations. */
146+
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
147+
listLocationsSettings() {
148+
return ((DataScanServiceStubSettings) getStubSettings()).listLocationsSettings();
149+
}
150+
151+
/** Returns the object with the settings used for calls to getLocation. */
152+
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
153+
return ((DataScanServiceStubSettings) getStubSettings()).getLocationSettings();
154+
}
155+
156+
public static final DataScanServiceSettings create(DataScanServiceStubSettings stub)
157+
throws IOException {
158+
return new DataScanServiceSettings.Builder(stub.toBuilder()).build();
159+
}
160+
161+
/** Returns a builder for the default ExecutorProvider for this service. */
162+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
163+
return DataScanServiceStubSettings.defaultExecutorProviderBuilder();
164+
}
165+
166+
/** Returns the default service endpoint. */
167+
public static String getDefaultEndpoint() {
168+
return DataScanServiceStubSettings.getDefaultEndpoint();
169+
}
170+
171+
/** Returns the default service scopes. */
172+
public static List<String> getDefaultServiceScopes() {
173+
return DataScanServiceStubSettings.getDefaultServiceScopes();
174+
}
175+
176+
/** Returns a builder for the default credentials for this service. */
177+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
178+
return DataScanServiceStubSettings.defaultCredentialsProviderBuilder();
179+
}
180+
181+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
182+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
183+
return DataScanServiceStubSettings.defaultGrpcTransportProviderBuilder();
184+
}
185+
186+
/** Returns a builder for the default REST ChannelProvider for this service. */
187+
@BetaApi
188+
public static InstantiatingHttpJsonChannelProvider.Builder
189+
defaultHttpJsonTransportProviderBuilder() {
190+
return DataScanServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
191+
}
192+
193+
public static TransportChannelProvider defaultTransportChannelProvider() {
194+
return DataScanServiceStubSettings.defaultTransportChannelProvider();
195+
}
196+
197+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
198+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
199+
return DataScanServiceStubSettings.defaultApiClientHeaderProviderBuilder();
200+
}
201+
202+
/** Returns a new gRPC builder for this class. */
203+
public static Builder newBuilder() {
204+
return Builder.createDefault();
205+
}
206+
207+
/** Returns a new REST builder for this class. */
208+
@BetaApi
209+
public static Builder newHttpJsonBuilder() {
210+
return Builder.createHttpJsonDefault();
211+
}
212+
213+
/** Returns a new builder for this class. */
214+
public static Builder newBuilder(ClientContext clientContext) {
215+
return new Builder(clientContext);
216+
}
217+
218+
/** Returns a builder containing all the values of this settings class. */
219+
public Builder toBuilder() {
220+
return new Builder(this);
221+
}
222+
223+
protected DataScanServiceSettings(Builder settingsBuilder) throws IOException {
224+
super(settingsBuilder);
225+
}
226+
227+
/** Builder for DataScanServiceSettings. */
228+
public static class Builder extends ClientSettings.Builder<DataScanServiceSettings, Builder> {
229+
230+
protected Builder() throws IOException {
231+
this(((ClientContext) null));
232+
}
233+
234+
protected Builder(ClientContext clientContext) {
235+
super(DataScanServiceStubSettings.newBuilder(clientContext));
236+
}
237+
238+
protected Builder(DataScanServiceSettings settings) {
239+
super(settings.getStubSettings().toBuilder());
240+
}
241+
242+
protected Builder(DataScanServiceStubSettings.Builder stubSettings) {
243+
super(stubSettings);
244+
}
245+
246+
private static Builder createDefault() {
247+
return new Builder(DataScanServiceStubSettings.newBuilder());
248+
}
249+
250+
@BetaApi
251+
private static Builder createHttpJsonDefault() {
252+
return new Builder(DataScanServiceStubSettings.newHttpJsonBuilder());
253+
}
254+
255+
public DataScanServiceStubSettings.Builder getStubSettingsBuilder() {
256+
return ((DataScanServiceStubSettings.Builder) getStubSettings());
257+
}
258+
259+
/**
260+
* Applies the given settings updater function to all of the unary API methods in this service.
261+
*
262+
* <p>Note: This method does not support applying settings to streaming methods.
263+
*/
264+
public Builder applyToAllUnaryMethods(
265+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
266+
super.applyToAllUnaryMethods(
267+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
268+
return this;
269+
}
270+
271+
/** Returns the builder for the settings used for calls to createDataScan. */
272+
public UnaryCallSettings.Builder<CreateDataScanRequest, Operation> createDataScanSettings() {
273+
return getStubSettingsBuilder().createDataScanSettings();
274+
}
275+
276+
/** Returns the builder for the settings used for calls to createDataScan. */
277+
public OperationCallSettings.Builder<CreateDataScanRequest, DataScan, OperationMetadata>
278+
createDataScanOperationSettings() {
279+
return getStubSettingsBuilder().createDataScanOperationSettings();
280+
}
281+
282+
/** Returns the builder for the settings used for calls to updateDataScan. */
283+
public UnaryCallSettings.Builder<UpdateDataScanRequest, Operation> updateDataScanSettings() {
284+
return getStubSettingsBuilder().updateDataScanSettings();
285+
}
286+
287+
/** Returns the builder for the settings used for calls to updateDataScan. */
288+
public OperationCallSettings.Builder<UpdateDataScanRequest, DataScan, OperationMetadata>
289+
updateDataScanOperationSettings() {
290+
return getStubSettingsBuilder().updateDataScanOperationSettings();
291+
}
292+
293+
/** Returns the builder for the settings used for calls to deleteDataScan. */
294+
public UnaryCallSettings.Builder<DeleteDataScanRequest, Operation> deleteDataScanSettings() {
295+
return getStubSettingsBuilder().deleteDataScanSettings();
296+
}
297+
298+
/** Returns the builder for the settings used for calls to deleteDataScan. */
299+
public OperationCallSettings.Builder<DeleteDataScanRequest, Empty, OperationMetadata>
300+
deleteDataScanOperationSettings() {
301+
return getStubSettingsBuilder().deleteDataScanOperationSettings();
302+
}
303+
304+
/** Returns the builder for the settings used for calls to getDataScan. */
305+
public UnaryCallSettings.Builder<GetDataScanRequest, DataScan> getDataScanSettings() {
306+
return getStubSettingsBuilder().getDataScanSettings();
307+
}
308+
309+
/** Returns the builder for the settings used for calls to listDataScans. */
310+
public PagedCallSettings.Builder<
311+
ListDataScansRequest, ListDataScansResponse, ListDataScansPagedResponse>
312+
listDataScansSettings() {
313+
return getStubSettingsBuilder().listDataScansSettings();
314+
}
315+
316+
/** Returns the builder for the settings used for calls to runDataScan. */
317+
public UnaryCallSettings.Builder<RunDataScanRequest, RunDataScanResponse>
318+
runDataScanSettings() {
319+
return getStubSettingsBuilder().runDataScanSettings();
320+
}
321+
322+
/** Returns the builder for the settings used for calls to getDataScanJob. */
323+
public UnaryCallSettings.Builder<GetDataScanJobRequest, DataScanJob> getDataScanJobSettings() {
324+
return getStubSettingsBuilder().getDataScanJobSettings();
325+
}
326+
327+
/** Returns the builder for the settings used for calls to listDataScanJobs. */
328+
public PagedCallSettings.Builder<
329+
ListDataScanJobsRequest, ListDataScanJobsResponse, ListDataScanJobsPagedResponse>
330+
listDataScanJobsSettings() {
331+
return getStubSettingsBuilder().listDataScanJobsSettings();
332+
}
333+
334+
/** Returns the builder for the settings used for calls to listLocations. */
335+
public PagedCallSettings.Builder<
336+
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
337+
listLocationsSettings() {
338+
return getStubSettingsBuilder().listLocationsSettings();
339+
}
340+
341+
/** Returns the builder for the settings used for calls to getLocation. */
342+
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
343+
return getStubSettingsBuilder().getLocationSettings();
344+
}
345+
346+
@Override
347+
public DataScanServiceSettings build() throws IOException {
348+
return new DataScanServiceSettings(this);
349+
}
350+
}
351+
}

0 commit comments

Comments
 (0)