Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enabled: true
3 changes: 2 additions & 1 deletion .github/trusted-contribution.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
trustedContributors:
- renovate-bot
- renovate-bot
- gcf-owl-bot[bot]
28 changes: 15 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
Expand All @@ -23,6 +26,9 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: 8
Expand All @@ -37,28 +43,21 @@ jobs:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
linkage-monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- name: Install artifacts to local Maven repository
run: .kokoro/build.sh
shell: bash
- name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release)
uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: 8
Expand All @@ -70,6 +69,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: actions/setup-java@v1
with:
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/common.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/drop.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/promote.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2019 Google Inc.
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc11.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2021 Google Inc.
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/stage.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/trampoline.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2018 Google Inc.
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.pubsub.v1;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
Expand Down Expand Up @@ -211,7 +210,7 @@ public final Schema createSchema(ProjectName parent, Schema schema, String schem
*
* <pre>{@code
* try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
* String parent = ProjectName.of("[PROJECT]").toString();
* String parent = SchemaName.of("[PROJECT]", "[SCHEMA]").toString();
* Schema schema = Schema.newBuilder().build();
* String schemaId = "schemaId-697673060";
* Schema response = schemaServiceClient.createSchema(parent, schema, schemaId);
Expand Down Expand Up @@ -249,7 +248,7 @@ public final Schema createSchema(String parent, Schema schema, String schemaId)
* try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
* CreateSchemaRequest request =
* CreateSchemaRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setParent(SchemaName.of("[PROJECT]", "[SCHEMA]").toString())
* .setSchema(Schema.newBuilder().build())
* .setSchemaId("schemaId-697673060")
* .build();
Expand All @@ -274,7 +273,7 @@ public final Schema createSchema(CreateSchemaRequest request) {
* try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
* CreateSchemaRequest request =
* CreateSchemaRequest.newBuilder()
* .setParent(ProjectName.of("[PROJECT]").toString())
* .setParent(SchemaName.of("[PROJECT]", "[SCHEMA]").toString())
* .setSchema(Schema.newBuilder().build())
* .setSchemaId("schemaId-697673060")
* .build();
Expand Down Expand Up @@ -474,7 +473,7 @@ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture<ListSchemasPagedResponse> future = schemaServiceClient.listSchemasPagedCallable().futureCall(request);
* ApiFuture<Schema> future = schemaServiceClient.listSchemasPagedCallable().futureCall(request);
* // Do something.
* for (Schema element : future.get().iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -504,7 +503,7 @@ public final ListSchemasPagedResponse listSchemas(ListSchemasRequest request) {
* .build();
* while (true) {
* ListSchemasResponse response = schemaServiceClient.listSchemasCallable().call(request);
* for (Schema element : response.getSchemasList()) {
* for (Schema element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -967,14 +966,7 @@ public static ApiFuture<ListSchemasPagedResponse> createAsync(
ApiFuture<ListSchemasPage> futurePage =
ListSchemasPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListSchemasPage, ListSchemasPagedResponse>() {
@Override
public ListSchemasPagedResponse apply(ListSchemasPage input) {
return new ListSchemasPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListSchemasPagedResponse(input), MoreExecutors.directExecutor());
}

private ListSchemasPagedResponse(ListSchemasPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,13 @@ public SchemaServiceStubSettings.Builder getStubSettingsBuilder() {
return ((SchemaServiceStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down
Loading