Skip to content

Commit e8acfcd

Browse files
chore: migrate to microgenerator (googleapis#366)
* chore: migrate logging to the Java microgenerator Committer: @miraleung PiperOrigin-RevId: 345522415 Source-Author: Google APIs <noreply@google.com> Source-Date: Thu Dec 3 13:28:21 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: fcc7482ec4cdd89f4ecc342b1fc06a38c5aa9c30 Source-Link: googleapis/googleapis@fcc7482 * chore: update gapic-generator-java to 0.0.8 Committer: @miraleung PiperOrigin-RevId: 346126713 Source-Author: Google APIs <noreply@google.com> Source-Date: Mon Dec 7 10:39:38 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: b8b2f8c288cec1f673bf10aa5008819c1576bf2e Source-Link: googleapis/googleapis@b8b2f8c * chore: update gapic-generator-java to 0.0.9 Committer: @miraleung PiperOrigin-RevId: 346372957 Source-Author: Google APIs <noreply@google.com> Source-Date: Tue Dec 8 11:37:30 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 857f70daef9f4c38f042fb3dfb7b8423ae18fd19 Source-Link: googleapis/googleapis@857f70d * chore: update gapic-generator-java to 0.0.11 Committer: @miraleung PiperOrigin-RevId: 347036369 Source-Author: Google APIs <noreply@google.com> Source-Date: Fri Dec 11 11:13:47 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 6d65640b1fcbdf26ea76cb720de0ac138cae9bed Source-Link: googleapis/googleapis@6d65640 * chore: update gapic-generator-java to 0.0.13 Committer: @miraleung PiperOrigin-RevId: 347849179 Source-Author: Google APIs <noreply@google.com> Source-Date: Wed Dec 16 10:28:38 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 360a0e177316b7e9811f2ccbbef11e5f83377f3f Source-Link: googleapis/googleapis@360a0e1 * chore: update gapic-generator-java to 0.0.14 Committer: @miraleung PiperOrigin-RevId: 348091500 Source-Author: Google APIs <noreply@google.com> Source-Date: Thu Dec 17 14:12:38 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: c1a601690b7fdfc2ca7a070038546321102b5f0b Source-Link: googleapis/googleapis@c1a6016 * Rename method names in CmekSettingsName to avoid breaking changes * Rename return types in CmekSettingsName to avoid breaking changes Co-authored-by: Neenu Shaji <Neenu1995@users.noreply.github.com> Co-authored-by: Neenu1995 <neenushaji@google.com>
1 parent 08e0eee commit e8acfcd

45 files changed

Lines changed: 5585 additions & 5561 deletions

Some content is hidden

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

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

Lines changed: 519 additions & 1648 deletions
Large diffs are not rendered by default.

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

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.google.cloud.logging.v2;
1718

1819
import static com.google.cloud.logging.v2.ConfigClient.ListBucketsPagedResponse;
@@ -69,7 +70,7 @@
6970
import java.util.List;
7071
import javax.annotation.Generated;
7172

72-
// AUTO-GENERATED DOCUMENTATION AND CLASS
73+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
7374
/**
7475
* Settings class to configure an instance of {@link ConfigClient}.
7576
*
@@ -84,39 +85,24 @@
8485
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
8586
* build() is called, the tree of builders is called to create the complete settings object.
8687
*
87-
* <p>For example, to set the total timeout of deleteSink to 30 seconds:
88+
* <p>For example, to set the total timeout of getBucket to 30 seconds:
8889
*
89-
* <pre>
90-
* <code>
91-
* ConfigSettings.Builder configSettingsBuilder =
92-
* ConfigSettings.newBuilder();
90+
* <pre>{@code
91+
* ConfigSettings.Builder configSettingsBuilder = ConfigSettings.newBuilder();
9392
* configSettingsBuilder
94-
* .deleteSinkSettings()
93+
* .getBucketSettings()
9594
* .setRetrySettings(
96-
* configSettingsBuilder.deleteSinkSettings().getRetrySettings().toBuilder()
95+
* configSettingsBuilder
96+
* .getBucketSettings()
97+
* .getRetrySettings()
98+
* .toBuilder()
9799
* .setTotalTimeout(Duration.ofSeconds(30))
98100
* .build());
99101
* ConfigSettings configSettings = configSettingsBuilder.build();
100-
* </code>
101-
* </pre>
102+
* }</pre>
102103
*/
103-
@Generated("by gapic-generator")
104-
@BetaApi
104+
@Generated("by gapic-generator-java")
105105
public class ConfigSettings extends ClientSettings<ConfigSettings> {
106-
/** Returns the object with the settings used for calls to deleteSink. */
107-
public UnaryCallSettings<DeleteSinkRequest, Empty> deleteSinkSettings() {
108-
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteSinkSettings();
109-
}
110-
111-
/** Returns the object with the settings used for calls to updateSink. */
112-
public UnaryCallSettings<UpdateSinkRequest, LogSink> updateSinkSettings() {
113-
return ((ConfigServiceV2StubSettings) getStubSettings()).updateSinkSettings();
114-
}
115-
116-
/** Returns the object with the settings used for calls to deleteExclusion. */
117-
public UnaryCallSettings<DeleteExclusionRequest, Empty> deleteExclusionSettings() {
118-
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteExclusionSettings();
119-
}
120106

121107
/** Returns the object with the settings used for calls to listBuckets. */
122108
public PagedCallSettings<ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>
@@ -191,6 +177,16 @@ public UnaryCallSettings<CreateSinkRequest, LogSink> createSinkSettings() {
191177
return ((ConfigServiceV2StubSettings) getStubSettings()).createSinkSettings();
192178
}
193179

180+
/** Returns the object with the settings used for calls to updateSink. */
181+
public UnaryCallSettings<UpdateSinkRequest, LogSink> updateSinkSettings() {
182+
return ((ConfigServiceV2StubSettings) getStubSettings()).updateSinkSettings();
183+
}
184+
185+
/** Returns the object with the settings used for calls to deleteSink. */
186+
public UnaryCallSettings<DeleteSinkRequest, Empty> deleteSinkSettings() {
187+
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteSinkSettings();
188+
}
189+
194190
/** Returns the object with the settings used for calls to listExclusions. */
195191
public PagedCallSettings<
196192
ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -213,6 +209,11 @@ public UnaryCallSettings<UpdateExclusionRequest, LogExclusion> updateExclusionSe
213209
return ((ConfigServiceV2StubSettings) getStubSettings()).updateExclusionSettings();
214210
}
215211

212+
/** Returns the object with the settings used for calls to deleteExclusion. */
213+
public UnaryCallSettings<DeleteExclusionRequest, Empty> deleteExclusionSettings() {
214+
return ((ConfigServiceV2StubSettings) getStubSettings()).deleteExclusionSettings();
215+
}
216+
216217
/** Returns the object with the settings used for calls to getCmekSettings. */
217218
public UnaryCallSettings<GetCmekSettingsRequest, CmekSettings> getCmekSettingsSettings() {
218219
return ((ConfigServiceV2StubSettings) getStubSettings()).getCmekSettingsSettings();
@@ -282,18 +283,15 @@ protected ConfigSettings(Builder settingsBuilder) throws IOException {
282283

283284
/** Builder for ConfigSettings. */
284285
public static class Builder extends ClientSettings.Builder<ConfigSettings, Builder> {
286+
285287
protected Builder() throws IOException {
286-
this((ClientContext) null);
288+
this(((ClientContext) null));
287289
}
288290

289291
protected Builder(ClientContext clientContext) {
290292
super(ConfigServiceV2StubSettings.newBuilder(clientContext));
291293
}
292294

293-
private static Builder createDefault() {
294-
return new Builder(ConfigServiceV2StubSettings.newBuilder());
295-
}
296-
297295
protected Builder(ConfigSettings settings) {
298296
super(settings.getStubSettings().toBuilder());
299297
}
@@ -302,11 +300,15 @@ protected Builder(ConfigServiceV2StubSettings.Builder stubSettings) {
302300
super(stubSettings);
303301
}
304302

303+
private static Builder createDefault() {
304+
return new Builder(ConfigServiceV2StubSettings.newBuilder());
305+
}
306+
305307
public ConfigServiceV2StubSettings.Builder getStubSettingsBuilder() {
306308
return ((ConfigServiceV2StubSettings.Builder) getStubSettings());
307309
}
308310

309-
// NEXT_MAJOR_VER: remove 'throws Exception'
311+
// NEXT_MAJOR_VER: remove 'throws Exception'.
310312
/**
311313
* Applies the given settings updater function to all of the unary API methods in this service.
312314
*
@@ -319,21 +321,6 @@ public Builder applyToAllUnaryMethods(
319321
return this;
320322
}
321323

322-
/** Returns the builder for the settings used for calls to deleteSink. */
323-
public UnaryCallSettings.Builder<DeleteSinkRequest, Empty> deleteSinkSettings() {
324-
return getStubSettingsBuilder().deleteSinkSettings();
325-
}
326-
327-
/** Returns the builder for the settings used for calls to updateSink. */
328-
public UnaryCallSettings.Builder<UpdateSinkRequest, LogSink> updateSinkSettings() {
329-
return getStubSettingsBuilder().updateSinkSettings();
330-
}
331-
332-
/** Returns the builder for the settings used for calls to deleteExclusion. */
333-
public UnaryCallSettings.Builder<DeleteExclusionRequest, Empty> deleteExclusionSettings() {
334-
return getStubSettingsBuilder().deleteExclusionSettings();
335-
}
336-
337324
/** Returns the builder for the settings used for calls to listBuckets. */
338325
public PagedCallSettings.Builder<
339326
ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse>
@@ -408,6 +395,16 @@ public UnaryCallSettings.Builder<CreateSinkRequest, LogSink> createSinkSettings(
408395
return getStubSettingsBuilder().createSinkSettings();
409396
}
410397

398+
/** Returns the builder for the settings used for calls to updateSink. */
399+
public UnaryCallSettings.Builder<UpdateSinkRequest, LogSink> updateSinkSettings() {
400+
return getStubSettingsBuilder().updateSinkSettings();
401+
}
402+
403+
/** Returns the builder for the settings used for calls to deleteSink. */
404+
public UnaryCallSettings.Builder<DeleteSinkRequest, Empty> deleteSinkSettings() {
405+
return getStubSettingsBuilder().deleteSinkSettings();
406+
}
407+
411408
/** Returns the builder for the settings used for calls to listExclusions. */
412409
public PagedCallSettings.Builder<
413410
ListExclusionsRequest, ListExclusionsResponse, ListExclusionsPagedResponse>
@@ -432,6 +429,11 @@ public UnaryCallSettings.Builder<GetExclusionRequest, LogExclusion> getExclusion
432429
return getStubSettingsBuilder().updateExclusionSettings();
433430
}
434431

432+
/** Returns the builder for the settings used for calls to deleteExclusion. */
433+
public UnaryCallSettings.Builder<DeleteExclusionRequest, Empty> deleteExclusionSettings() {
434+
return getStubSettingsBuilder().deleteExclusionSettings();
435+
}
436+
435437
/** Returns the builder for the settings used for calls to getCmekSettings. */
436438
public UnaryCallSettings.Builder<GetCmekSettingsRequest, CmekSettings>
437439
getCmekSettingsSettings() {

0 commit comments

Comments
 (0)