Skip to content

Commit 6af43e9

Browse files
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
1 parent 0181ba0 commit 6af43e9

File tree

101 files changed

+4496
-2
lines changed

Some content is hidden

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

101 files changed

+4496
-2
lines changed

java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LocationMetadata.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -775,8 +775,8 @@ public int getLocationFeaturesValue(int index) {
775775
* <code>repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1;
776776
* </code>
777777
*
778-
* @param index The index of the value to return.
779-
* @return The enum numeric value on the wire of locationFeatures at the given index.
778+
* @param index The index to set the value at.
779+
* @param value The enum numeric value on the wire for locationFeatures to set.
780780
* @return This builder for chaining.
781781
*/
782782
public Builder setLocationFeaturesValue(int index, int value) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_create_setcredentialsprovider_sync]
20+
import com.google.api.gax.core.FixedCredentialsProvider;
21+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
22+
import com.google.cloud.networkconnectivity.v1.HubServiceSettings;
23+
import com.google.cloud.networkconnectivity.v1.myCredentials;
24+
25+
public class SyncCreateSetCredentialsProvider {
26+
27+
public static void main(String[] args) throws Exception {
28+
syncCreateSetCredentialsProvider();
29+
}
30+
31+
public static void syncCreateSetCredentialsProvider() throws Exception {
32+
// This snippet has been automatically generated for illustrative purposes only.
33+
// It may require modifications to work in your environment.
34+
HubServiceSettings hubServiceSettings =
35+
HubServiceSettings.newBuilder()
36+
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
37+
.build();
38+
HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
39+
}
40+
}
41+
// [END networkconnectivity_v1_generated_hubserviceclient_create_setcredentialsprovider_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_create_setendpoint_sync]
20+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
21+
import com.google.cloud.networkconnectivity.v1.HubServiceSettings;
22+
import com.google.cloud.networkconnectivity.v1.myEndpoint;
23+
24+
public class SyncCreateSetEndpoint {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateSetEndpoint();
28+
}
29+
30+
public static void syncCreateSetEndpoint() throws Exception {
31+
// This snippet has been automatically generated for illustrative purposes only.
32+
// It may require modifications to work in your environment.
33+
HubServiceSettings hubServiceSettings =
34+
HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
35+
HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
36+
}
37+
}
38+
// [END networkconnectivity_v1_generated_hubserviceclient_create_setendpoint_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_async]
20+
import com.google.api.core.ApiFuture;
21+
import com.google.cloud.networkconnectivity.v1.CreateHubRequest;
22+
import com.google.cloud.networkconnectivity.v1.Hub;
23+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
24+
import com.google.cloud.networkconnectivity.v1.LocationName;
25+
import com.google.longrunning.Operation;
26+
27+
public class AsyncCreateHub {
28+
29+
public static void main(String[] args) throws Exception {
30+
asyncCreateHub();
31+
}
32+
33+
public static void asyncCreateHub() throws Exception {
34+
// This snippet has been automatically generated for illustrative purposes only.
35+
// It may require modifications to work in your environment.
36+
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
37+
CreateHubRequest request =
38+
CreateHubRequest.newBuilder()
39+
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
40+
.setHubId("hubId99628272")
41+
.setHub(Hub.newBuilder().build())
42+
.setRequestId("requestId693933066")
43+
.build();
44+
ApiFuture<Operation> future = hubServiceClient.createHubCallable().futureCall(request);
45+
// Do something.
46+
Operation response = future.get();
47+
}
48+
}
49+
}
50+
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_lro_async]
20+
import com.google.api.gax.longrunning.OperationFuture;
21+
import com.google.cloud.networkconnectivity.v1.CreateHubRequest;
22+
import com.google.cloud.networkconnectivity.v1.Hub;
23+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
24+
import com.google.cloud.networkconnectivity.v1.LocationName;
25+
import com.google.cloud.networkconnectivity.v1.OperationMetadata;
26+
27+
public class AsyncCreateHubLRO {
28+
29+
public static void main(String[] args) throws Exception {
30+
asyncCreateHubLRO();
31+
}
32+
33+
public static void asyncCreateHubLRO() throws Exception {
34+
// This snippet has been automatically generated for illustrative purposes only.
35+
// It may require modifications to work in your environment.
36+
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
37+
CreateHubRequest request =
38+
CreateHubRequest.newBuilder()
39+
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
40+
.setHubId("hubId99628272")
41+
.setHub(Hub.newBuilder().build())
42+
.setRequestId("requestId693933066")
43+
.build();
44+
OperationFuture<Hub, OperationMetadata> future =
45+
hubServiceClient.createHubOperationCallable().futureCall(request);
46+
// Do something.
47+
Hub response = future.get();
48+
}
49+
}
50+
}
51+
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_lro_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_sync]
20+
import com.google.cloud.networkconnectivity.v1.CreateHubRequest;
21+
import com.google.cloud.networkconnectivity.v1.Hub;
22+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
23+
import com.google.cloud.networkconnectivity.v1.LocationName;
24+
25+
public class SyncCreateHub {
26+
27+
public static void main(String[] args) throws Exception {
28+
syncCreateHub();
29+
}
30+
31+
public static void syncCreateHub() throws Exception {
32+
// This snippet has been automatically generated for illustrative purposes only.
33+
// It may require modifications to work in your environment.
34+
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
35+
CreateHubRequest request =
36+
CreateHubRequest.newBuilder()
37+
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
38+
.setHubId("hubId99628272")
39+
.setHub(Hub.newBuilder().build())
40+
.setRequestId("requestId693933066")
41+
.build();
42+
Hub response = hubServiceClient.createHubAsync(request).get();
43+
}
44+
}
45+
}
46+
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_locationnamehubstring_sync]
20+
import com.google.cloud.networkconnectivity.v1.Hub;
21+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
22+
import com.google.cloud.networkconnectivity.v1.LocationName;
23+
24+
public class SyncCreateHubLocationnameHubString {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateHubLocationnameHubString();
28+
}
29+
30+
public static void syncCreateHubLocationnameHubString() throws Exception {
31+
// This snippet has been automatically generated for illustrative purposes only.
32+
// It may require modifications to work in your environment.
33+
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
34+
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
35+
Hub hub = Hub.newBuilder().build();
36+
String hubId = "hubId99628272";
37+
Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
38+
}
39+
}
40+
}
41+
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_locationnamehubstring_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_createhub_stringhubstring_sync]
20+
import com.google.cloud.networkconnectivity.v1.Hub;
21+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
22+
import com.google.cloud.networkconnectivity.v1.LocationName;
23+
24+
public class SyncCreateHubStringHubString {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateHubStringHubString();
28+
}
29+
30+
public static void syncCreateHubStringHubString() throws Exception {
31+
// This snippet has been automatically generated for illustrative purposes only.
32+
// It may require modifications to work in your environment.
33+
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
34+
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
35+
Hub hub = Hub.newBuilder().build();
36+
String hubId = "hubId99628272";
37+
Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
38+
}
39+
}
40+
}
41+
// [END networkconnectivity_v1_generated_hubserviceclient_createhub_stringhubstring_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2022 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.networkconnectivity.v1.samples;
18+
19+
// [START networkconnectivity_v1_generated_hubserviceclient_createspoke_async]
20+
import com.google.api.core.ApiFuture;
21+
import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest;
22+
import com.google.cloud.networkconnectivity.v1.HubServiceClient;
23+
import com.google.cloud.networkconnectivity.v1.LocationName;
24+
import com.google.cloud.networkconnectivity.v1.Spoke;
25+
import com.google.longrunning.Operation;
26+
27+
public class AsyncCreateSpoke {
28+
29+
public static void main(String[] args) throws Exception {
30+
asyncCreateSpoke();
31+
}
32+
33+
public static void asyncCreateSpoke() throws Exception {
34+
// This snippet has been automatically generated for illustrative purposes only.
35+
// It may require modifications to work in your environment.
36+
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
37+
CreateSpokeRequest request =
38+
CreateSpokeRequest.newBuilder()
39+
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
40+
.setSpokeId("spokeId-1998996281")
41+
.setSpoke(Spoke.newBuilder().build())
42+
.setRequestId("requestId693933066")
43+
.build();
44+
ApiFuture<Operation> future = hubServiceClient.createSpokeCallable().futureCall(request);
45+
// Do something.
46+
Operation response = future.get();
47+
}
48+
}
49+
}
50+
// [END networkconnectivity_v1_generated_hubserviceclient_createspoke_async]

0 commit comments

Comments
 (0)