Skip to content

Commit 2e36e37

Browse files
fix(deps): Update the Java code generator (gapic-generator-java) to 2.31.0
PiperOrigin-RevId: 596645164 Source-Link: googleapis/googleapis@4a0e62e Source-Link: https://github.com/googleapis/googleapis-gen/commit/a10ed6a77676c37e60799098d48d0afb16008613 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTEwZWQ2YTc3Njc2YzM3ZTYwNzk5MDk4ZDQ4ZDBhZmIxNjAwODYxMyJ9
1 parent d1f8ff8 commit 2e36e37

File tree

219 files changed

+43583
-32799
lines changed

Some content is hidden

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

219 files changed

+43583
-32799
lines changed

grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/MetricsServiceV2Grpc.java

Lines changed: 0 additions & 816 deletions
This file was deleted.

owl-bot-staging/v2/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java

Lines changed: 5513 additions & 0 deletions
Large diffs are not rendered by default.

owl-bot-staging/v2/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigSettings.java

Lines changed: 630 additions & 0 deletions
Large diffs are not rendered by default.

owl-bot-staging/v2/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java

Lines changed: 1535 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
/*
2+
* Copyright 2023 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.logging.v2;
18+
19+
import static com.google.cloud.logging.v2.LoggingClient.ListLogEntriesPagedResponse;
20+
import static com.google.cloud.logging.v2.LoggingClient.ListLogsPagedResponse;
21+
import static com.google.cloud.logging.v2.LoggingClient.ListMonitoredResourceDescriptorsPagedResponse;
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.rpc.ApiClientHeaderProvider;
29+
import com.google.api.gax.rpc.BatchingCallSettings;
30+
import com.google.api.gax.rpc.ClientContext;
31+
import com.google.api.gax.rpc.ClientSettings;
32+
import com.google.api.gax.rpc.PagedCallSettings;
33+
import com.google.api.gax.rpc.StreamingCallSettings;
34+
import com.google.api.gax.rpc.StubSettings;
35+
import com.google.api.gax.rpc.TransportChannelProvider;
36+
import com.google.api.gax.rpc.UnaryCallSettings;
37+
import com.google.cloud.logging.v2.stub.LoggingServiceV2StubSettings;
38+
import com.google.logging.v2.DeleteLogRequest;
39+
import com.google.logging.v2.ListLogEntriesRequest;
40+
import com.google.logging.v2.ListLogEntriesResponse;
41+
import com.google.logging.v2.ListLogsRequest;
42+
import com.google.logging.v2.ListLogsResponse;
43+
import com.google.logging.v2.ListMonitoredResourceDescriptorsRequest;
44+
import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
45+
import com.google.logging.v2.TailLogEntriesRequest;
46+
import com.google.logging.v2.TailLogEntriesResponse;
47+
import com.google.logging.v2.WriteLogEntriesRequest;
48+
import com.google.logging.v2.WriteLogEntriesResponse;
49+
import com.google.protobuf.Empty;
50+
import java.io.IOException;
51+
import java.util.List;
52+
import javax.annotation.Generated;
53+
54+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
55+
/**
56+
* Settings class to configure an instance of {@link LoggingClient}.
57+
*
58+
* <p>The default instance has everything set to sensible defaults:
59+
*
60+
* <ul>
61+
* <li>The default service address (logging.googleapis.com) and default port (443) are used.
62+
* <li>Credentials are acquired automatically through Application Default Credentials.
63+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
64+
* </ul>
65+
*
66+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
67+
* build() is called, the tree of builders is called to create the complete settings object.
68+
*
69+
* <p>For example, to set the total timeout of deleteLog to 30 seconds:
70+
*
71+
* <pre>{@code
72+
* // This snippet has been automatically generated and should be regarded as a code template only.
73+
* // It will require modifications to work:
74+
* // - It may require correct/in-range values for request initialization.
75+
* // - It may require specifying regional endpoints when creating the service client as shown in
76+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
77+
* LoggingSettings.Builder loggingSettingsBuilder = LoggingSettings.newBuilder();
78+
* loggingSettingsBuilder
79+
* .deleteLogSettings()
80+
* .setRetrySettings(
81+
* loggingSettingsBuilder
82+
* .deleteLogSettings()
83+
* .getRetrySettings()
84+
* .toBuilder()
85+
* .setTotalTimeout(Duration.ofSeconds(30))
86+
* .build());
87+
* LoggingSettings loggingSettings = loggingSettingsBuilder.build();
88+
* }</pre>
89+
*/
90+
@Generated("by gapic-generator-java")
91+
public class LoggingSettings extends ClientSettings<LoggingSettings> {
92+
93+
/** Returns the object with the settings used for calls to deleteLog. */
94+
public UnaryCallSettings<DeleteLogRequest, Empty> deleteLogSettings() {
95+
return ((LoggingServiceV2StubSettings) getStubSettings()).deleteLogSettings();
96+
}
97+
98+
/** Returns the object with the settings used for calls to writeLogEntries. */
99+
public BatchingCallSettings<WriteLogEntriesRequest, WriteLogEntriesResponse>
100+
writeLogEntriesSettings() {
101+
return ((LoggingServiceV2StubSettings) getStubSettings()).writeLogEntriesSettings();
102+
}
103+
104+
/** Returns the object with the settings used for calls to listLogEntries. */
105+
public PagedCallSettings<
106+
ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
107+
listLogEntriesSettings() {
108+
return ((LoggingServiceV2StubSettings) getStubSettings()).listLogEntriesSettings();
109+
}
110+
111+
/** Returns the object with the settings used for calls to listMonitoredResourceDescriptors. */
112+
public PagedCallSettings<
113+
ListMonitoredResourceDescriptorsRequest,
114+
ListMonitoredResourceDescriptorsResponse,
115+
ListMonitoredResourceDescriptorsPagedResponse>
116+
listMonitoredResourceDescriptorsSettings() {
117+
return ((LoggingServiceV2StubSettings) getStubSettings())
118+
.listMonitoredResourceDescriptorsSettings();
119+
}
120+
121+
/** Returns the object with the settings used for calls to listLogs. */
122+
public PagedCallSettings<ListLogsRequest, ListLogsResponse, ListLogsPagedResponse>
123+
listLogsSettings() {
124+
return ((LoggingServiceV2StubSettings) getStubSettings()).listLogsSettings();
125+
}
126+
127+
/** Returns the object with the settings used for calls to tailLogEntries. */
128+
public StreamingCallSettings<TailLogEntriesRequest, TailLogEntriesResponse>
129+
tailLogEntriesSettings() {
130+
return ((LoggingServiceV2StubSettings) getStubSettings()).tailLogEntriesSettings();
131+
}
132+
133+
public static final LoggingSettings create(LoggingServiceV2StubSettings stub) throws IOException {
134+
return new LoggingSettings.Builder(stub.toBuilder()).build();
135+
}
136+
137+
/** Returns a builder for the default ExecutorProvider for this service. */
138+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
139+
return LoggingServiceV2StubSettings.defaultExecutorProviderBuilder();
140+
}
141+
142+
/** Returns the default service endpoint. */
143+
public static String getDefaultEndpoint() {
144+
return LoggingServiceV2StubSettings.getDefaultEndpoint();
145+
}
146+
147+
/** Returns the default service scopes. */
148+
public static List<String> getDefaultServiceScopes() {
149+
return LoggingServiceV2StubSettings.getDefaultServiceScopes();
150+
}
151+
152+
/** Returns a builder for the default credentials for this service. */
153+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
154+
return LoggingServiceV2StubSettings.defaultCredentialsProviderBuilder();
155+
}
156+
157+
/** Returns a builder for the default ChannelProvider for this service. */
158+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
159+
return LoggingServiceV2StubSettings.defaultGrpcTransportProviderBuilder();
160+
}
161+
162+
public static TransportChannelProvider defaultTransportChannelProvider() {
163+
return LoggingServiceV2StubSettings.defaultTransportChannelProvider();
164+
}
165+
166+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
167+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
168+
return LoggingServiceV2StubSettings.defaultApiClientHeaderProviderBuilder();
169+
}
170+
171+
/** Returns a new builder for this class. */
172+
public static Builder newBuilder() {
173+
return Builder.createDefault();
174+
}
175+
176+
/** Returns a new builder for this class. */
177+
public static Builder newBuilder(ClientContext clientContext) {
178+
return new Builder(clientContext);
179+
}
180+
181+
/** Returns a builder containing all the values of this settings class. */
182+
public Builder toBuilder() {
183+
return new Builder(this);
184+
}
185+
186+
protected LoggingSettings(Builder settingsBuilder) throws IOException {
187+
super(settingsBuilder);
188+
}
189+
190+
/** Builder for LoggingSettings. */
191+
public static class Builder extends ClientSettings.Builder<LoggingSettings, Builder> {
192+
193+
protected Builder() throws IOException {
194+
this(((ClientContext) null));
195+
}
196+
197+
protected Builder(ClientContext clientContext) {
198+
super(LoggingServiceV2StubSettings.newBuilder(clientContext));
199+
}
200+
201+
protected Builder(LoggingSettings settings) {
202+
super(settings.getStubSettings().toBuilder());
203+
}
204+
205+
protected Builder(LoggingServiceV2StubSettings.Builder stubSettings) {
206+
super(stubSettings);
207+
}
208+
209+
private static Builder createDefault() {
210+
return new Builder(LoggingServiceV2StubSettings.newBuilder());
211+
}
212+
213+
public LoggingServiceV2StubSettings.Builder getStubSettingsBuilder() {
214+
return ((LoggingServiceV2StubSettings.Builder) getStubSettings());
215+
}
216+
217+
/**
218+
* Applies the given settings updater function to all of the unary API methods in this service.
219+
*
220+
* <p>Note: This method does not support applying settings to streaming methods.
221+
*/
222+
public Builder applyToAllUnaryMethods(
223+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
224+
super.applyToAllUnaryMethods(
225+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
226+
return this;
227+
}
228+
229+
/** Returns the builder for the settings used for calls to deleteLog. */
230+
public UnaryCallSettings.Builder<DeleteLogRequest, Empty> deleteLogSettings() {
231+
return getStubSettingsBuilder().deleteLogSettings();
232+
}
233+
234+
/** Returns the builder for the settings used for calls to writeLogEntries. */
235+
public BatchingCallSettings.Builder<WriteLogEntriesRequest, WriteLogEntriesResponse>
236+
writeLogEntriesSettings() {
237+
return getStubSettingsBuilder().writeLogEntriesSettings();
238+
}
239+
240+
/** Returns the builder for the settings used for calls to listLogEntries. */
241+
public PagedCallSettings.Builder<
242+
ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
243+
listLogEntriesSettings() {
244+
return getStubSettingsBuilder().listLogEntriesSettings();
245+
}
246+
247+
/** Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. */
248+
public PagedCallSettings.Builder<
249+
ListMonitoredResourceDescriptorsRequest,
250+
ListMonitoredResourceDescriptorsResponse,
251+
ListMonitoredResourceDescriptorsPagedResponse>
252+
listMonitoredResourceDescriptorsSettings() {
253+
return getStubSettingsBuilder().listMonitoredResourceDescriptorsSettings();
254+
}
255+
256+
/** Returns the builder for the settings used for calls to listLogs. */
257+
public PagedCallSettings.Builder<ListLogsRequest, ListLogsResponse, ListLogsPagedResponse>
258+
listLogsSettings() {
259+
return getStubSettingsBuilder().listLogsSettings();
260+
}
261+
262+
/** Returns the builder for the settings used for calls to tailLogEntries. */
263+
public StreamingCallSettings.Builder<TailLogEntriesRequest, TailLogEntriesResponse>
264+
tailLogEntriesSettings() {
265+
return getStubSettingsBuilder().tailLogEntriesSettings();
266+
}
267+
268+
@Override
269+
public LoggingSettings build() throws IOException {
270+
return new LoggingSettings(this);
271+
}
272+
}
273+
}

0 commit comments

Comments
 (0)