-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bazel): update protobuf to v3.21.3 (#275)
- [ ] Regenerate this pull request now. chore(bazel): update gax-java to 2.18.4 PiperOrigin-RevId: 463115700 Source-Link: googleapis/googleapis@52130a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a4d9d9bb3afb20b0f5fa4f5d9f6740b1d0eb19a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE0ZDlkOWJiM2FmYjIwYjBmNWZhNGY1ZDlmNjc0MGIxZDBlYjE5YSJ9
- Loading branch information
1 parent
0181ba0
commit 6af43e9
Showing
101 changed files
with
4,496 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...loud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetCredentialsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_create_setcredentialsprovider_sync] | ||
import com.google.api.gax.core.FixedCredentialsProvider; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceSettings; | ||
import com.google.cloud.networkconnectivity.v1.myCredentials; | ||
|
||
public class SyncCreateSetCredentialsProvider { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetCredentialsProvider(); | ||
} | ||
|
||
public static void syncCreateSetCredentialsProvider() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
HubServiceSettings hubServiceSettings = | ||
HubServiceSettings.newBuilder() | ||
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) | ||
.build(); | ||
HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_create_setcredentialsprovider_sync] |
38 changes: 38 additions & 0 deletions
38
...om/google/cloud/networkconnectivity/v1/hubserviceclient/create/SyncCreateSetEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_create_setendpoint_sync] | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceSettings; | ||
import com.google.cloud.networkconnectivity.v1.myEndpoint; | ||
|
||
public class SyncCreateSetEndpoint { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetEndpoint(); | ||
} | ||
|
||
public static void syncCreateSetEndpoint() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
HubServiceSettings hubServiceSettings = | ||
HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); | ||
HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_create_setendpoint_sync] |
50 changes: 50 additions & 0 deletions
50
...ed/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHub.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_async] | ||
import com.google.api.core.ApiFuture; | ||
import com.google.cloud.networkconnectivity.v1.CreateHubRequest; | ||
import com.google.cloud.networkconnectivity.v1.Hub; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.LocationName; | ||
import com.google.longrunning.Operation; | ||
|
||
public class AsyncCreateHub { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateHub(); | ||
} | ||
|
||
public static void asyncCreateHub() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (HubServiceClient hubServiceClient = HubServiceClient.create()) { | ||
CreateHubRequest request = | ||
CreateHubRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setHubId("hubId99628272") | ||
.setHub(Hub.newBuilder().build()) | ||
.setRequestId("requestId693933066") | ||
.build(); | ||
ApiFuture<Operation> future = hubServiceClient.createHubCallable().futureCall(request); | ||
// Do something. | ||
Operation response = future.get(); | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_async] |
51 changes: 51 additions & 0 deletions
51
...com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/AsyncCreateHubLRO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_lro_async] | ||
import com.google.api.gax.longrunning.OperationFuture; | ||
import com.google.cloud.networkconnectivity.v1.CreateHubRequest; | ||
import com.google.cloud.networkconnectivity.v1.Hub; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.LocationName; | ||
import com.google.cloud.networkconnectivity.v1.OperationMetadata; | ||
|
||
public class AsyncCreateHubLRO { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateHubLRO(); | ||
} | ||
|
||
public static void asyncCreateHubLRO() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (HubServiceClient hubServiceClient = HubServiceClient.create()) { | ||
CreateHubRequest request = | ||
CreateHubRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setHubId("hubId99628272") | ||
.setHub(Hub.newBuilder().build()) | ||
.setRequestId("requestId693933066") | ||
.build(); | ||
OperationFuture<Hub, OperationMetadata> future = | ||
hubServiceClient.createHubOperationCallable().futureCall(request); | ||
// Do something. | ||
Hub response = future.get(); | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_lro_async] |
46 changes: 46 additions & 0 deletions
46
...ted/com/google/cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHub.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_sync] | ||
import com.google.cloud.networkconnectivity.v1.CreateHubRequest; | ||
import com.google.cloud.networkconnectivity.v1.Hub; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.LocationName; | ||
|
||
public class SyncCreateHub { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateHub(); | ||
} | ||
|
||
public static void syncCreateHub() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (HubServiceClient hubServiceClient = HubServiceClient.create()) { | ||
CreateHubRequest request = | ||
CreateHubRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setHubId("hubId99628272") | ||
.setHub(Hub.newBuilder().build()) | ||
.setRequestId("requestId693933066") | ||
.build(); | ||
Hub response = hubServiceClient.createHubAsync(request).get(); | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_sync] |
41 changes: 41 additions & 0 deletions
41
...networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubLocationnameHubString.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_locationnamehubstring_sync] | ||
import com.google.cloud.networkconnectivity.v1.Hub; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.LocationName; | ||
|
||
public class SyncCreateHubLocationnameHubString { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateHubLocationnameHubString(); | ||
} | ||
|
||
public static void syncCreateHubLocationnameHubString() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (HubServiceClient hubServiceClient = HubServiceClient.create()) { | ||
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); | ||
Hub hub = Hub.newBuilder().build(); | ||
String hubId = "hubId99628272"; | ||
Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_locationnamehubstring_sync] |
41 changes: 41 additions & 0 deletions
41
...cloud/networkconnectivity/v1/hubserviceclient/createhub/SyncCreateHubStringHubString.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_stringhubstring_sync] | ||
import com.google.cloud.networkconnectivity.v1.Hub; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.LocationName; | ||
|
||
public class SyncCreateHubStringHubString { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateHubStringHubString(); | ||
} | ||
|
||
public static void syncCreateHubStringHubString() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (HubServiceClient hubServiceClient = HubServiceClient.create()) { | ||
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); | ||
Hub hub = Hub.newBuilder().build(); | ||
String hubId = "hubId99628272"; | ||
Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_stringhubstring_sync] |
50 changes: 50 additions & 0 deletions
50
...om/google/cloud/networkconnectivity/v1/hubserviceclient/createspoke/AsyncCreateSpoke.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.networkconnectivity.v1.samples; | ||
|
||
// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_async] | ||
import com.google.api.core.ApiFuture; | ||
import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; | ||
import com.google.cloud.networkconnectivity.v1.HubServiceClient; | ||
import com.google.cloud.networkconnectivity.v1.LocationName; | ||
import com.google.cloud.networkconnectivity.v1.Spoke; | ||
import com.google.longrunning.Operation; | ||
|
||
public class AsyncCreateSpoke { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateSpoke(); | ||
} | ||
|
||
public static void asyncCreateSpoke() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (HubServiceClient hubServiceClient = HubServiceClient.create()) { | ||
CreateSpokeRequest request = | ||
CreateSpokeRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setSpokeId("spokeId-1998996281") | ||
.setSpoke(Spoke.newBuilder().build()) | ||
.setRequestId("requestId693933066") | ||
.build(); | ||
ApiFuture<Operation> future = hubServiceClient.createSpokeCallable().futureCall(request); | ||
// Do something. | ||
Operation response = future.get(); | ||
} | ||
} | ||
} | ||
// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_async] |
Oops, something went wrong.