Skip to content

Commit 746f3e6

Browse files
Merge branch 'owl-bot-copy' of https://github.com/googleapis/java-logging into owl-bot-copy
🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md feat: KMS configuration in settings chore: formatting changes PiperOrigin-RevId: 430243637 Source-Link: googleapis/googleapis@95da686 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a1f056b7689ccbe5aebc0bfdd318e9945ee7602a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTFmMDU2Yjc2ODljY2JlNWFlYmMwYmZkZDMxOGU5OTQ1ZWU3NjAyYSJ9 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md feat: Update Logging API with latest changes PiperOrigin-RevId: 429289471 Source-Link: googleapis/googleapis@acd5f89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a12622536ae2e9a8978198a151e89234b839b20 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGExMjYyMjUzNmFlMmU5YTg5NzgxOThhMTUxZTg5MjM0YjgzOWIyMCJ9
1 parent 0c027d3 commit 746f3e6

File tree

202 files changed

+48771
-31057
lines changed

Some content is hidden

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

202 files changed

+48771
-31057
lines changed

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

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

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

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

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

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

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

Lines changed: 3489 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: 506 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: 1290 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
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.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+
* LoggingSettings.Builder loggingSettingsBuilder = LoggingSettings.newBuilder();
73+
* loggingSettingsBuilder
74+
* .deleteLogSettings()
75+
* .setRetrySettings(
76+
* loggingSettingsBuilder
77+
* .deleteLogSettings()
78+
* .getRetrySettings()
79+
* .toBuilder()
80+
* .setTotalTimeout(Duration.ofSeconds(30))
81+
* .build());
82+
* LoggingSettings loggingSettings = loggingSettingsBuilder.build();
83+
* }</pre>
84+
*/
85+
@Generated("by gapic-generator-java")
86+
public class LoggingSettings extends ClientSettings<LoggingSettings> {
87+
88+
/** Returns the object with the settings used for calls to deleteLog. */
89+
public UnaryCallSettings<DeleteLogRequest, Empty> deleteLogSettings() {
90+
return ((LoggingServiceV2StubSettings) getStubSettings()).deleteLogSettings();
91+
}
92+
93+
/** Returns the object with the settings used for calls to writeLogEntries. */
94+
public BatchingCallSettings<WriteLogEntriesRequest, WriteLogEntriesResponse>
95+
writeLogEntriesSettings() {
96+
return ((LoggingServiceV2StubSettings) getStubSettings()).writeLogEntriesSettings();
97+
}
98+
99+
/** Returns the object with the settings used for calls to listLogEntries. */
100+
public PagedCallSettings<
101+
ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
102+
listLogEntriesSettings() {
103+
return ((LoggingServiceV2StubSettings) getStubSettings()).listLogEntriesSettings();
104+
}
105+
106+
/** Returns the object with the settings used for calls to listMonitoredResourceDescriptors. */
107+
public PagedCallSettings<
108+
ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse,
109+
ListMonitoredResourceDescriptorsPagedResponse>
110+
listMonitoredResourceDescriptorsSettings() {
111+
return ((LoggingServiceV2StubSettings) getStubSettings())
112+
.listMonitoredResourceDescriptorsSettings();
113+
}
114+
115+
/** Returns the object with the settings used for calls to listLogs. */
116+
public PagedCallSettings<ListLogsRequest, ListLogsResponse, ListLogsPagedResponse>
117+
listLogsSettings() {
118+
return ((LoggingServiceV2StubSettings) getStubSettings()).listLogsSettings();
119+
}
120+
121+
/** Returns the object with the settings used for calls to tailLogEntries. */
122+
public StreamingCallSettings<TailLogEntriesRequest, TailLogEntriesResponse>
123+
tailLogEntriesSettings() {
124+
return ((LoggingServiceV2StubSettings) getStubSettings()).tailLogEntriesSettings();
125+
}
126+
127+
public static final LoggingSettings create(LoggingServiceV2StubSettings stub) throws IOException {
128+
return new LoggingSettings.Builder(stub.toBuilder()).build();
129+
}
130+
131+
/** Returns a builder for the default ExecutorProvider for this service. */
132+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
133+
return LoggingServiceV2StubSettings.defaultExecutorProviderBuilder();
134+
}
135+
136+
/** Returns the default service endpoint. */
137+
public static String getDefaultEndpoint() {
138+
return LoggingServiceV2StubSettings.getDefaultEndpoint();
139+
}
140+
141+
/** Returns the default service scopes. */
142+
public static List<String> getDefaultServiceScopes() {
143+
return LoggingServiceV2StubSettings.getDefaultServiceScopes();
144+
}
145+
146+
/** Returns a builder for the default credentials for this service. */
147+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
148+
return LoggingServiceV2StubSettings.defaultCredentialsProviderBuilder();
149+
}
150+
151+
/** Returns a builder for the default ChannelProvider for this service. */
152+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
153+
return LoggingServiceV2StubSettings.defaultGrpcTransportProviderBuilder();
154+
}
155+
156+
public static TransportChannelProvider defaultTransportChannelProvider() {
157+
return LoggingServiceV2StubSettings.defaultTransportChannelProvider();
158+
}
159+
160+
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
161+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
162+
return LoggingServiceV2StubSettings.defaultApiClientHeaderProviderBuilder();
163+
}
164+
165+
/** Returns a new builder for this class. */
166+
public static Builder newBuilder() {
167+
return Builder.createDefault();
168+
}
169+
170+
/** Returns a new builder for this class. */
171+
public static Builder newBuilder(ClientContext clientContext) {
172+
return new Builder(clientContext);
173+
}
174+
175+
/** Returns a builder containing all the values of this settings class. */
176+
public Builder toBuilder() {
177+
return new Builder(this);
178+
}
179+
180+
protected LoggingSettings(Builder settingsBuilder) throws IOException {
181+
super(settingsBuilder);
182+
}
183+
184+
/** Builder for LoggingSettings. */
185+
public static class Builder extends ClientSettings.Builder<LoggingSettings, Builder> {
186+
187+
protected Builder() throws IOException {
188+
this(((ClientContext) null));
189+
}
190+
191+
protected Builder(ClientContext clientContext) {
192+
super(LoggingServiceV2StubSettings.newBuilder(clientContext));
193+
}
194+
195+
protected Builder(LoggingSettings settings) {
196+
super(settings.getStubSettings().toBuilder());
197+
}
198+
199+
protected Builder(LoggingServiceV2StubSettings.Builder stubSettings) {
200+
super(stubSettings);
201+
}
202+
203+
private static Builder createDefault() {
204+
return new Builder(LoggingServiceV2StubSettings.newBuilder());
205+
}
206+
207+
public LoggingServiceV2StubSettings.Builder getStubSettingsBuilder() {
208+
return ((LoggingServiceV2StubSettings.Builder) getStubSettings());
209+
}
210+
211+
/**
212+
* Applies the given settings updater function to all of the unary API methods in this service.
213+
*
214+
* <p>Note: This method does not support applying settings to streaming methods.
215+
*/
216+
public Builder applyToAllUnaryMethods(
217+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
218+
super.applyToAllUnaryMethods(
219+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
220+
return this;
221+
}
222+
223+
/** Returns the builder for the settings used for calls to deleteLog. */
224+
public UnaryCallSettings.Builder<DeleteLogRequest, Empty> deleteLogSettings() {
225+
return getStubSettingsBuilder().deleteLogSettings();
226+
}
227+
228+
/** Returns the builder for the settings used for calls to writeLogEntries. */
229+
public BatchingCallSettings.Builder<WriteLogEntriesRequest, WriteLogEntriesResponse>
230+
writeLogEntriesSettings() {
231+
return getStubSettingsBuilder().writeLogEntriesSettings();
232+
}
233+
234+
/** Returns the builder for the settings used for calls to listLogEntries. */
235+
public PagedCallSettings.Builder<
236+
ListLogEntriesRequest, ListLogEntriesResponse, ListLogEntriesPagedResponse>
237+
listLogEntriesSettings() {
238+
return getStubSettingsBuilder().listLogEntriesSettings();
239+
}
240+
241+
/** Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. */
242+
public PagedCallSettings.Builder<
243+
ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse,
244+
ListMonitoredResourceDescriptorsPagedResponse>
245+
listMonitoredResourceDescriptorsSettings() {
246+
return getStubSettingsBuilder().listMonitoredResourceDescriptorsSettings();
247+
}
248+
249+
/** Returns the builder for the settings used for calls to listLogs. */
250+
public PagedCallSettings.Builder<ListLogsRequest, ListLogsResponse, ListLogsPagedResponse>
251+
listLogsSettings() {
252+
return getStubSettingsBuilder().listLogsSettings();
253+
}
254+
255+
/** Returns the builder for the settings used for calls to tailLogEntries. */
256+
public StreamingCallSettings.Builder<TailLogEntriesRequest, TailLogEntriesResponse>
257+
tailLogEntriesSettings() {
258+
return getStubSettingsBuilder().tailLogEntriesSettings();
259+
}
260+
261+
@Override
262+
public LoggingSettings build() throws IOException {
263+
return new LoggingSettings(this);
264+
}
265+
}
266+
}

0 commit comments

Comments
 (0)