Skip to content

Commit

Permalink
chore(bazel): update protobuf to v3.21.3 (#275)
Browse files Browse the repository at this point in the history
- [ ] 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
gcf-owl-bot[bot] authored Jul 26, 2022
1 parent 0181ba0 commit 6af43e9
Show file tree
Hide file tree
Showing 101 changed files with 4,496 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ public int getLocationFeaturesValue(int index) {
* <code>repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1;
* </code>
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of locationFeatures at the given index.
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for locationFeatures to set.
* @return This builder for chaining.
*/
public Builder setLocationFeaturesValue(int index, int value) {
Expand Down
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]
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]
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]
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]
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]
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]
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]
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]
Loading

0 comments on commit 6af43e9

Please sign in to comment.