diff --git a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java index 4f0434e7..7153768d 100644 --- a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java +++ b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/HubServiceClient.java @@ -49,6 +49,13 @@ *
This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * Hub response = hubServiceClient.getHub(name); + * } + * }+ * *
Note: close() needs to be called on the HubServiceClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -162,6 +169,17 @@ public final OperationsClient getOperationsClient() { /** * Lists Hubs in a given project and location. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The parent resource's name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -175,6 +193,17 @@ public final ListHubsPagedResponse listHubs(LocationName parent) { /** * Lists Hubs in a given project and location. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The parent resource's name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -187,6 +216,24 @@ public final ListHubsPagedResponse listHubs(String parent) { /** * Lists Hubs in a given project and location. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListHubsRequest request = + * ListHubsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Hub element : hubServiceClient.listHubs(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -199,6 +246,24 @@ public final ListHubsPagedResponse listHubs(ListHubsRequest request) { * Lists Hubs in a given project and location. * *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListHubsRequest request = + * ListHubsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.listHubsPagedCallable().futureCall(request); + * // Do something. + * for (Hub element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * while (true) { + * ListHubsResponse response = hubServiceClient.listHubsCallable().call(request); + * for (Hub element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * Hub response = hubServiceClient.getHub(name); + * } + * }+ * * @param name Required. Name of the Hub resource to get. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -231,6 +322,15 @@ public final Hub getHub(HubName name) { /** * Gets details of a single Hub. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String name = HubName.of("[PROJECT]", "[HUB]").toString(); + * Hub response = hubServiceClient.getHub(name); + * } + * }+ * * @param name Required. Name of the Hub resource to get. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -243,6 +343,16 @@ public final Hub getHub(String name) { /** * Gets details of a single Hub. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * GetHubRequest request = + * GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + * Hub response = hubServiceClient.getHub(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -255,6 +365,16 @@ public final Hub getHub(GetHubRequest request) { * Gets details of a single Hub. * *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * GetHubRequest request = + * GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.getHubCallable().futureCall(request); + * // Do something. + * Hub response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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(); + * } + * }+ * * @param parent Required. The parent resource's name of the Hub. * @param hub Required. Initial values for a new Hub. * @param hubId Optional. Unique id for the Hub to create. @@ -284,6 +415,17 @@ public final OperationFuture
Sample code: + * + *
{@code + * 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(); + * } + * }+ * * @param parent Required. The parent resource's name of the Hub. * @param hub Required. Initial values for a new Hub. * @param hubId Optional. Unique id for the Hub to create. @@ -300,6 +442,21 @@ public final OperationFuture
Sample code: + * + *
{@code + * 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(); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -312,6 +469,22 @@ public final OperationFuture
Sample code: + * + *
{@code + * 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*/ public final OperationCallablefuture = + * hubServiceClient.createHubOperationCallable().futureCall(request); + * // Do something. + * Hub response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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*/ public final UnaryCallablefuture = hubServiceClient.createHubCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * Hub hub = Hub.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get(); + * } + * }+ * * @param hub Required. The state that the Hub should be in after the update. * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the * Hub resource by the update. The fields specified in the update_mask are relative to the @@ -350,6 +548,20 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * UpdateHubRequest request = + * UpdateHubRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setHub(Hub.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * Hub response = hubServiceClient.updateHubAsync(request).get(); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -362,6 +574,21 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * UpdateHubRequest request = + * UpdateHubRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setHub(Hub.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture*/ public final OperationCallablefuture = + * hubServiceClient.updateHubOperationCallable().futureCall(request); + * // Do something. + * Hub response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * UpdateHubRequest request = + * UpdateHubRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setHub(Hub.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.updateHubCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * hubServiceClient.deleteHubAsync(name).get(); + * } + * }+ * * @param name Required. The name of the Hub to delete. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -395,6 +645,15 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String name = HubName.of("[PROJECT]", "[HUB]").toString(); + * hubServiceClient.deleteHubAsync(name).get(); + * } + * }+ * * @param name Required. The name of the Hub to delete. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -407,6 +666,19 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * DeleteHubRequest request = + * DeleteHubRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * hubServiceClient.deleteHubAsync(request).get(); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -419,6 +691,20 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * DeleteHubRequest request = + * DeleteHubRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture*/ public final OperationCallablefuture = + * hubServiceClient.deleteHubOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * DeleteHubRequest request = + * DeleteHubRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.deleteHubCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The parent's resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -452,6 +762,17 @@ public final ListSpokesPagedResponse listSpokes(LocationName parent) { /** * Lists Spokes in a given project and location. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param parent Required. The parent's resource name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -464,6 +785,24 @@ public final ListSpokesPagedResponse listSpokes(String parent) { /** * Lists Spokes in a given project and location. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListSpokesRequest request = + * ListSpokesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Spoke element : hubServiceClient.listSpokes(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -476,6 +815,24 @@ public final ListSpokesPagedResponse listSpokes(ListSpokesRequest request) { * Lists Spokes in a given project and location. * *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListSpokesRequest request = + * ListSpokesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.listSpokesPagedCallable().futureCall(request); + * // Do something. + * for (Spoke element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * while (true) { + * ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request); + * for (Spoke element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }*/ public final UnaryCallable
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + * Spoke response = hubServiceClient.getSpoke(name); + * } + * }+ * * @param name Required. The name of Spoke resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -508,6 +891,15 @@ public final Spoke getSpoke(SpokeName name) { /** * Gets details of a single Spoke. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + * Spoke response = hubServiceClient.getSpoke(name); + * } + * }+ * * @param name Required. The name of Spoke resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -520,6 +912,18 @@ public final Spoke getSpoke(String name) { /** * Gets details of a single Spoke. * + *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * GetSpokeRequest request = + * GetSpokeRequest.newBuilder() + * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * .build(); + * Spoke response = hubServiceClient.getSpoke(request); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -532,6 +936,18 @@ public final Spoke getSpoke(GetSpokeRequest request) { * Gets details of a single Spoke. * *
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * GetSpokeRequest request = + * GetSpokeRequest.newBuilder() + * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.getSpokeCallable().futureCall(request); + * // Do something. + * Spoke response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Spoke spoke = Spoke.newBuilder().build(); + * String spokeId = "spokeId-1998996281"; + * Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + * } + * }+ * * @param parent Required. The parent's resource name of the Spoke. * @param spoke Required. Initial values for a new Hub. * @param spokeId Optional. Unique id for the Spoke to create. @@ -561,6 +988,17 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * Spoke spoke = Spoke.newBuilder().build(); + * String spokeId = "spokeId-1998996281"; + * Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + * } + * }+ * * @param parent Required. The parent's resource name of the Spoke. * @param spoke Required. Initial values for a new Hub. * @param spokeId Optional. Unique id for the Spoke to create. @@ -581,6 +1019,21 @@ public final OperationFuture
Sample code: + * + *
{@code + * 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(); + * Spoke response = hubServiceClient.createSpokeAsync(request).get(); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -594,6 +1047,22 @@ public final OperationFuture
Sample code: + * + *
{@code + * 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(); + * OperationFuture*/ public final OperationCallablefuture = + * hubServiceClient.createSpokeOperationCallable().futureCall(request); + * // Do something. + * Spoke response = future.get(); + * } + * }
Sample code: + * + *
{@code + * 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*/ public final UnaryCallablefuture = hubServiceClient.createSpokeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * Spoke spoke = Spoke.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Spoke response = hubServiceClient.updateSpokeAsync(spoke, updateMask).get(); + * } + * }+ * * @param spoke Required. The state that the Spoke should be in after the update. * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the * Spoke resource by the update. The fields specified in the update_mask are relative to the @@ -632,6 +1126,20 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * UpdateSpokeRequest request = + * UpdateSpokeRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setSpoke(Spoke.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * Spoke response = hubServiceClient.updateSpokeAsync(request).get(); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -645,6 +1153,21 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * UpdateSpokeRequest request = + * UpdateSpokeRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setSpoke(Spoke.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture*/ public final OperationCallablefuture = + * hubServiceClient.updateSpokeOperationCallable().futureCall(request); + * // Do something. + * Spoke response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * UpdateSpokeRequest request = + * UpdateSpokeRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setSpoke(Spoke.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.updateSpokeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + * hubServiceClient.deleteSpokeAsync(name).get(); + * } + * }+ * * @param name Required. The name of the Spoke to delete. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -678,6 +1224,15 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + * hubServiceClient.deleteSpokeAsync(name).get(); + * } + * }+ * * @param name Required. The name of the Spoke to delete. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -690,6 +1245,19 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * DeleteSpokeRequest request = + * DeleteSpokeRequest.newBuilder() + * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * hubServiceClient.deleteSpokeAsync(request).get(); + * } + * }+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -703,6 +1271,20 @@ public final OperationFuture
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * DeleteSpokeRequest request = + * DeleteSpokeRequest.newBuilder() + * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture*/ public final OperationCallablefuture = + * hubServiceClient.deleteSpokeOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * DeleteSpokeRequest request = + * DeleteSpokeRequest.newBuilder() + * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture*/ public final UnaryCallablefuture = hubServiceClient.deleteSpokeCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample for HubServiceClient: + * + *
{@code + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * Hub response = hubServiceClient.getHub(name); + * } + * }*/ @Generated("by gapic-generator-java") package com.google.cloud.networkconnectivity.v1alpha1; diff --git a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/stub/GrpcHubServiceStub.java b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/stub/GrpcHubServiceStub.java index ab4f2082..add90a91 100644 --- a/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/stub/GrpcHubServiceStub.java +++ b/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1alpha1/stub/GrpcHubServiceStub.java @@ -424,77 +424,95 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable