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

Commit 66164f8

Browse files
feat: added client side library for the followings: (#25)
- [ ] Regenerate this pull request now. 1. Content APIs. 2. Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition). PiperOrigin-RevId: 429081053 Source-Link: googleapis/googleapis@7b42fd0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3f71d2df5c102ee1fe82f492de545cd3a3dc7f79 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2Y3MWQyZGY1YzEwMmVlMWZlODJmNDkyZGU1NDVjZDNhM2RjN2Y3OSJ9
1 parent 4a3bdf5 commit 66164f8

File tree

101 files changed

+49673
-808
lines changed

Some content is hidden

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

101 files changed

+49673
-808
lines changed

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

Lines changed: 752 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
/*
2+
* Copyright 2021 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.ContentServiceClient.ListContentPagedResponse;
20+
21+
import com.google.api.core.ApiFunction;
22+
import com.google.api.core.BetaApi;
23+
import com.google.api.gax.core.GoogleCredentialsProvider;
24+
import com.google.api.gax.core.InstantiatingExecutorProvider;
25+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
26+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
27+
import com.google.api.gax.rpc.ClientContext;
28+
import com.google.api.gax.rpc.ClientSettings;
29+
import com.google.api.gax.rpc.PagedCallSettings;
30+
import com.google.api.gax.rpc.TransportChannelProvider;
31+
import com.google.api.gax.rpc.UnaryCallSettings;
32+
import com.google.cloud.dataplex.v1.stub.ContentServiceStubSettings;
33+
import com.google.protobuf.Empty;
34+
import java.io.IOException;
35+
import java.util.List;
36+
import javax.annotation.Generated;
37+
38+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
39+
/**
40+
* Settings class to configure an instance of {@link ContentServiceClient}.
41+
*
42+
* <p>The default instance has everything set to sensible defaults:
43+
*
44+
* <ul>
45+
* <li>The default service address (dataplex.googleapis.com) and default port (443) are used.
46+
* <li>Credentials are acquired automatically through Application Default Credentials.
47+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
48+
* </ul>
49+
*
50+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
51+
* build() is called, the tree of builders is called to create the complete settings object.
52+
*
53+
* <p>For example, to set the total timeout of createContent to 30 seconds:
54+
*
55+
* <pre>{@code
56+
* ContentServiceSettings.Builder contentServiceSettingsBuilder =
57+
* ContentServiceSettings.newBuilder();
58+
* contentServiceSettingsBuilder
59+
* .createContentSettings()
60+
* .setRetrySettings(
61+
* contentServiceSettingsBuilder
62+
* .createContentSettings()
63+
* .getRetrySettings()
64+
* .toBuilder()
65+
* .setTotalTimeout(Duration.ofSeconds(30))
66+
* .build());
67+
* ContentServiceSettings contentServiceSettings = contentServiceSettingsBuilder.build();
68+
* }</pre>
69+
*/
70+
@Generated("by gapic-generator-java")
71+
public class ContentServiceSettings extends ClientSettings<ContentServiceSettings> {
72+
73+
/** Returns the object with the settings used for calls to createContent. */
74+
public UnaryCallSettings<CreateContentRequest, Content> createContentSettings() {
75+
return ((ContentServiceStubSettings) getStubSettings()).createContentSettings();
76+
}
77+
78+
/** Returns the object with the settings used for calls to updateContent. */
79+
public UnaryCallSettings<UpdateContentRequest, Content> updateContentSettings() {
80+
return ((ContentServiceStubSettings) getStubSettings()).updateContentSettings();
81+
}
82+
83+
/** Returns the object with the settings used for calls to deleteContent. */
84+
public UnaryCallSettings<DeleteContentRequest, Empty> deleteContentSettings() {
85+
return ((ContentServiceStubSettings) getStubSettings()).deleteContentSettings();
86+
}
87+
88+
/** Returns the object with the settings used for calls to getContent. */
89+
public UnaryCallSettings<GetContentRequest, Content> getContentSettings() {
90+
return ((ContentServiceStubSettings) getStubSettings()).getContentSettings();
91+
}
92+
93+
/** Returns the object with the settings used for calls to listContent. */
94+
public PagedCallSettings<ListContentRequest, ListContentResponse, ListContentPagedResponse>
95+
listContentSettings() {
96+
return ((ContentServiceStubSettings) getStubSettings()).listContentSettings();
97+
}
98+
99+
public static final ContentServiceSettings create(ContentServiceStubSettings stub)
100+
throws IOException {
101+
return new ContentServiceSettings.Builder(stub.toBuilder()).build();
102+
}
103+
104+
/** Returns a builder for the default ExecutorProvider for this service. */
105+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
106+
return ContentServiceStubSettings.defaultExecutorProviderBuilder();
107+
}
108+
109+
/** Returns the default service endpoint. */
110+
public static String getDefaultEndpoint() {
111+
return ContentServiceStubSettings.getDefaultEndpoint();
112+
}
113+
114+
/** Returns the default service scopes. */
115+
public static List<String> getDefaultServiceScopes() {
116+
return ContentServiceStubSettings.getDefaultServiceScopes();
117+
}
118+
119+
/** Returns a builder for the default credentials for this service. */
120+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
121+
return ContentServiceStubSettings.defaultCredentialsProviderBuilder();
122+
}
123+
124+
/** Returns a builder for the default ChannelProvider for this service. */
125+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
126+
return ContentServiceStubSettings.defaultGrpcTransportProviderBuilder();
127+
}
128+
129+
public static TransportChannelProvider defaultTransportChannelProvider() {
130+
return ContentServiceStubSettings.defaultTransportChannelProvider();
131+
}
132+
133+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
134+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
135+
return ContentServiceStubSettings.defaultApiClientHeaderProviderBuilder();
136+
}
137+
138+
/** Returns a new builder for this class. */
139+
public static Builder newBuilder() {
140+
return Builder.createDefault();
141+
}
142+
143+
/** Returns a new builder for this class. */
144+
public static Builder newBuilder(ClientContext clientContext) {
145+
return new Builder(clientContext);
146+
}
147+
148+
/** Returns a builder containing all the values of this settings class. */
149+
public Builder toBuilder() {
150+
return new Builder(this);
151+
}
152+
153+
protected ContentServiceSettings(Builder settingsBuilder) throws IOException {
154+
super(settingsBuilder);
155+
}
156+
157+
/** Builder for ContentServiceSettings. */
158+
public static class Builder extends ClientSettings.Builder<ContentServiceSettings, Builder> {
159+
160+
protected Builder() throws IOException {
161+
this(((ClientContext) null));
162+
}
163+
164+
protected Builder(ClientContext clientContext) {
165+
super(ContentServiceStubSettings.newBuilder(clientContext));
166+
}
167+
168+
protected Builder(ContentServiceSettings settings) {
169+
super(settings.getStubSettings().toBuilder());
170+
}
171+
172+
protected Builder(ContentServiceStubSettings.Builder stubSettings) {
173+
super(stubSettings);
174+
}
175+
176+
private static Builder createDefault() {
177+
return new Builder(ContentServiceStubSettings.newBuilder());
178+
}
179+
180+
public ContentServiceStubSettings.Builder getStubSettingsBuilder() {
181+
return ((ContentServiceStubSettings.Builder) getStubSettings());
182+
}
183+
184+
/**
185+
* Applies the given settings updater function to all of the unary API methods in this service.
186+
*
187+
* <p>Note: This method does not support applying settings to streaming methods.
188+
*/
189+
public Builder applyToAllUnaryMethods(
190+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
191+
super.applyToAllUnaryMethods(
192+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
193+
return this;
194+
}
195+
196+
/** Returns the builder for the settings used for calls to createContent. */
197+
public UnaryCallSettings.Builder<CreateContentRequest, Content> createContentSettings() {
198+
return getStubSettingsBuilder().createContentSettings();
199+
}
200+
201+
/** Returns the builder for the settings used for calls to updateContent. */
202+
public UnaryCallSettings.Builder<UpdateContentRequest, Content> updateContentSettings() {
203+
return getStubSettingsBuilder().updateContentSettings();
204+
}
205+
206+
/** Returns the builder for the settings used for calls to deleteContent. */
207+
public UnaryCallSettings.Builder<DeleteContentRequest, Empty> deleteContentSettings() {
208+
return getStubSettingsBuilder().deleteContentSettings();
209+
}
210+
211+
/** Returns the builder for the settings used for calls to getContent. */
212+
public UnaryCallSettings.Builder<GetContentRequest, Content> getContentSettings() {
213+
return getStubSettingsBuilder().getContentSettings();
214+
}
215+
216+
/** Returns the builder for the settings used for calls to listContent. */
217+
public PagedCallSettings.Builder<
218+
ListContentRequest, ListContentResponse, ListContentPagedResponse>
219+
listContentSettings() {
220+
return getStubSettingsBuilder().listContentSettings();
221+
}
222+
223+
@Override
224+
public ContentServiceSettings build() throws IOException {
225+
return new ContentServiceSettings(this);
226+
}
227+
}
228+
}

0 commit comments

Comments
 (0)