From 2164568460df563f4a51d6696c39e1a8e58d68e2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:19:34 -0400 Subject: [PATCH] feat: [networkconnectivity] add Network Connectivity Center APIs related to VPC spokes (#9927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Network Connectivity Center APIs related to VPC spokes PiperOrigin-RevId: 569346113 Source-Link: https://github.com/googleapis/googleapis/commit/1df1c4f0e34e9d44e45d90ce695f70f47b3d7913 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ac186aa86be170deb461f71181880900af0176b Copy-Tag: eyJwIjoiamF2YS1uZXR3b3JrY29ubmVjdGl2aXR5Ly5Pd2xCb3QueWFtbCIsImgiOiI1YWMxODZhYTg2YmUxNzBkZWI0NjFmNzExODE4ODA5MDBhZjAxNzZiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: adding proto-google-iam-v1 dependency * chore: adding more dependencies --------- Co-authored-by: Owl Bot Co-authored-by: ddixit14 --- java-networkconnectivity/README.md | 2 +- .../google-cloud-networkconnectivity/pom.xml | 12 + .../v1/HubServiceClient.java | 2295 +++++- .../v1/HubServiceSettings.java | 196 + .../v1/PolicyBasedRoutingServiceClient.java | 447 ++ .../v1/PolicyBasedRoutingServiceSettings.java | 65 + .../v1/gapic_metadata.json | 57 + .../v1/stub/GrpcHubServiceStub.java | 516 ++ .../GrpcPolicyBasedRoutingServiceStub.java | 167 + .../v1/stub/HubServiceStub.java | 122 + .../v1/stub/HubServiceStubSettings.java | 746 +- .../stub/PolicyBasedRoutingServiceStub.java | 36 + ...PolicyBasedRoutingServiceStubSettings.java | 188 +- .../reflect-config.json | 951 ++- .../v1/HubServiceClientTest.java | 1338 +++- .../v1/MockHubServiceImpl.java | 187 + .../networkconnectivity/v1/MockIAMPolicy.java | 59 + .../v1/MockIAMPolicyImpl.java | 127 + .../networkconnectivity/v1/MockLocations.java | 59 + .../v1/MockLocationsImpl.java | 105 + .../PolicyBasedRoutingServiceClientTest.java | 271 +- .../v1/HubServiceGrpc.java | 1153 ++- .../v1/AcceptHubSpokeRequest.java | 1114 +++ .../v1/AcceptHubSpokeRequestOrBuilder.java | 134 + .../v1/AcceptHubSpokeResponse.java | 714 ++ .../v1/AcceptHubSpokeResponseOrBuilder.java | 60 + .../v1/CreateHubRequest.java | 70 +- .../v1/CreateHubRequestOrBuilder.java | 20 +- .../v1/CreateSpokeRequest.java | 70 +- .../v1/CreateSpokeRequestOrBuilder.java | 20 +- .../v1/DeleteHubRequest.java | 70 +- .../v1/DeleteHubRequestOrBuilder.java | 20 +- .../v1/DeleteSpokeRequest.java | 70 +- .../v1/DeleteSpokeRequestOrBuilder.java | 20 +- .../v1/GetGroupRequest.java | 641 ++ .../v1/GetGroupRequestOrBuilder.java | 54 + .../v1/GetRouteRequest.java | 641 ++ .../v1/GetRouteRequestOrBuilder.java | 54 + .../v1/GetRouteTableRequest.java | 645 ++ .../v1/GetRouteTableRequestOrBuilder.java | 54 + .../cloud/networkconnectivity/v1/Group.java | 2100 ++++++ .../networkconnectivity/v1/GroupName.java | 217 + .../v1/GroupOrBuilder.java | 283 + .../cloud/networkconnectivity/v1/Hub.java | 748 +- .../networkconnectivity/v1/HubOrBuilder.java | 144 +- .../networkconnectivity/v1/HubProto.java | 936 ++- .../networkconnectivity/v1/HubRouteName.java | 260 + .../v1/LinkedVpcNetwork.java | 929 +++ .../v1/LinkedVpcNetworkOrBuilder.java | 109 + .../v1/ListGroupsRequest.java | 1282 ++++ .../v1/ListGroupsRequestOrBuilder.java | 142 + .../v1/ListGroupsResponse.java | 1414 ++++ .../v1/ListGroupsResponseOrBuilder.java | 157 + .../v1/ListHubSpokesRequest.java | 1992 ++++++ .../v1/ListHubSpokesRequestOrBuilder.java | 250 + .../v1/ListHubSpokesResponse.java | 1462 ++++ .../v1/ListHubSpokesResponseOrBuilder.java | 167 + .../v1/ListHubsRequest.java | 22 +- .../v1/ListHubsRequestOrBuilder.java | 6 +- .../v1/ListHubsResponse.java | 35 +- .../v1/ListHubsResponseOrBuilder.java | 10 +- .../v1/ListRouteTablesRequest.java | 1288 ++++ .../v1/ListRouteTablesRequestOrBuilder.java | 142 + .../v1/ListRouteTablesResponse.java | 1431 ++++ .../v1/ListRouteTablesResponseOrBuilder.java | 157 + .../v1/ListRoutesRequest.java | 1282 ++++ .../v1/ListRoutesRequestOrBuilder.java | 142 + .../v1/ListRoutesResponse.java | 1414 ++++ .../v1/ListRoutesResponseOrBuilder.java | 157 + .../v1/ListSpokesRequest.java | 22 +- .../v1/ListSpokesRequestOrBuilder.java | 6 +- .../v1/ListSpokesResponse.java | 35 +- .../v1/ListSpokesResponseOrBuilder.java | 10 +- .../v1/NextHopVpcNetwork.java | 609 ++ .../v1/NextHopVpcNetworkOrBuilder.java | 50 + .../v1/OperationMetadata.java | 20 +- .../v1/OperationMetadataOrBuilder.java | 5 +- .../v1/RejectHubSpokeRequest.java | 1296 ++++ .../v1/RejectHubSpokeRequestOrBuilder.java | 159 + .../v1/RejectHubSpokeResponse.java | 714 ++ .../v1/RejectHubSpokeResponseOrBuilder.java | 60 + .../cloud/networkconnectivity/v1/Route.java | 3155 ++++++++ .../v1/RouteOrBuilder.java | 441 ++ .../networkconnectivity/v1/RouteTable.java | 2085 ++++++ .../v1/RouteTableName.java | 223 + .../v1/RouteTableOrBuilder.java | 283 + .../networkconnectivity/v1/RouteType.java | 180 + .../cloud/networkconnectivity/v1/Spoke.java | 6349 ++++++++++++----- .../v1/SpokeOrBuilder.java | 190 +- .../networkconnectivity/v1/SpokeSummary.java | 4528 ++++++++++++ .../v1/SpokeSummaryOrBuilder.java | 238 + .../networkconnectivity/v1/SpokeType.java | 221 + .../cloud/networkconnectivity/v1/State.java | 104 +- .../v1/UpdateHubRequest.java | 70 +- .../v1/UpdateHubRequestOrBuilder.java | 20 +- .../v1/UpdateSpokeRequest.java | 70 +- .../v1/UpdateSpokeRequestOrBuilder.java | 20 +- .../cloud/networkconnectivity/v1/common.proto | 13 +- .../cloud/networkconnectivity/v1/hub.proto | 856 ++- .../accepthubspoke/AsyncAcceptHubSpoke.java | 52 + .../AsyncAcceptHubSpokeLRO.java | 54 + .../accepthubspoke/SyncAcceptHubSpoke.java | 49 + .../SyncAcceptHubSpokeHubnameSpokename.java | 44 + .../SyncAcceptHubSpokeHubnameString.java | 44 + .../SyncAcceptHubSpokeStringSpokename.java | 44 + .../SyncAcceptHubSpokeStringString.java | 44 + .../v1/hubservice/getgroup/AsyncGetGroup.java | 49 + .../v1/hubservice/getgroup/SyncGetGroup.java | 46 + .../getgroup/SyncGetGroupGroupname.java | 42 + .../getgroup/SyncGetGroupString.java | 42 + .../getiampolicy/AsyncGetIamPolicy.java | 51 + .../getiampolicy/SyncGetIamPolicy.java | 48 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../v1/hubservice/getroute/AsyncGetRoute.java | 49 + .../v1/hubservice/getroute/SyncGetRoute.java | 46 + .../getroute/SyncGetRouteHubroutename.java | 42 + .../getroute/SyncGetRouteString.java | 42 + .../getroutetable/AsyncGetRouteTable.java | 49 + .../getroutetable/SyncGetRouteTable.java | 46 + .../SyncGetRouteTableRoutetablename.java | 42 + .../SyncGetRouteTableString.java | 42 + .../listgroups/AsyncListGroups.java | 55 + .../listgroups/AsyncListGroupsPaged.java | 63 + .../hubservice/listgroups/SyncListGroups.java | 52 + .../listgroups/SyncListGroupsHubname.java | 44 + .../listgroups/SyncListGroupsString.java | 44 + .../listhubspokes/AsyncListHubSpokes.java | 57 + .../AsyncListHubSpokesPaged.java | 65 + .../listhubspokes/SyncListHubSpokes.java | 54 + .../SyncListHubSpokesHubname.java | 44 + .../SyncListHubSpokesString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../listroutes/AsyncListRoutes.java | 55 + .../listroutes/AsyncListRoutesPaged.java | 63 + .../hubservice/listroutes/SyncListRoutes.java | 52 + .../SyncListRoutesRoutetablename.java | 44 + .../listroutes/SyncListRoutesString.java | 44 + .../listroutetables/AsyncListRouteTables.java | 56 + .../AsyncListRouteTablesPaged.java | 63 + .../listroutetables/SyncListRouteTables.java | 52 + .../SyncListRouteTablesHubname.java | 44 + .../SyncListRouteTablesString.java | 44 + .../rejecthubspoke/AsyncRejectHubSpoke.java | 53 + .../AsyncRejectHubSpokeLRO.java | 55 + .../rejecthubspoke/SyncRejectHubSpoke.java | 50 + .../SyncRejectHubSpokeHubnameSpokename.java | 44 + .../SyncRejectHubSpokeHubnameString.java | 44 + .../SyncRejectHubSpokeStringSpokename.java | 44 + .../SyncRejectHubSpokeStringString.java | 44 + .../setiampolicy/AsyncSetIamPolicy.java | 52 + .../setiampolicy/SyncSetIamPolicy.java | 49 + .../AsyncTestIamPermissions.java | 52 + .../SyncTestIamPermissions.java | 48 + .../getiampolicy/AsyncGetIamPolicy.java | 53 + .../getiampolicy/SyncGetIamPolicy.java | 49 + .../getlocation/AsyncGetLocation.java | 47 + .../getlocation/SyncGetLocation.java | 43 + .../listlocations/AsyncListLocations.java | 55 + .../AsyncListLocationsPaged.java | 63 + .../listlocations/SyncListLocations.java | 51 + .../setiampolicy/AsyncSetIamPolicy.java | 54 + .../setiampolicy/SyncSetIamPolicy.java | 50 + .../AsyncTestIamPermissions.java | 53 + .../SyncTestIamPermissions.java | 50 + 167 files changed, 54873 insertions(+), 2768 deletions(-) create mode 100644 java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicy.java create mode 100644 java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicyImpl.java create mode 100644 java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocations.java create mode 100644 java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocationsImpl.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponse.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponseOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Group.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupName.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubRouteName.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetwork.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetworkOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponse.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponseOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponse.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponseOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponse.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponseOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponse.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponseOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetwork.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetworkOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequest.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequestOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponse.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponseOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Route.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTable.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableName.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteType.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummary.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummaryOrBuilder.java create mode 100644 java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeType.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpoke.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/AsyncGetGroup.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroup.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupGroupname.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/AsyncGetLocation.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/SyncGetLocation.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/AsyncGetRoute.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRoute.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteHubroutename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/AsyncGetRouteTable.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTable.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroups.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroupsPaged.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroups.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsHubname.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokes.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokesPaged.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokes.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesHubname.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocations.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/SyncListLocations.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutes.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutesPaged.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutes.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesRoutetablename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTables.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTablesPaged.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTables.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesHubname.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpoke.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/AsyncGetLocation.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/SyncGetLocation.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocations.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/SyncListLocations.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java diff --git a/java-networkconnectivity/README.md b/java-networkconnectivity/README.md index 4a90d240c95b..3222b9c9a43e 100644 --- a/java-networkconnectivity/README.md +++ b/java-networkconnectivity/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-networkconnectivity.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkconnectivity/1.23.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkconnectivity/1.26.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml b/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml index 65e480f718c4..d203b612ecf2 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml +++ b/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml @@ -65,6 +65,18 @@ org.threeten threetenbp + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + com.google.api.grpc + grpc-google-common-protos + diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceClient.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceClient.java index 9c0ede172925..d53ea2c7f7ba 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceClient.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceClient.java @@ -26,9 +26,18 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.stub.HubServiceStub; import com.google.cloud.networkconnectivity.v1.stub.HubServiceStubSettings; import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.OperationsClient; import com.google.protobuf.Empty; @@ -866,6 +875,184 @@ public final UnaryCallable deleteHubCallable() { return stub.deleteHubCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubSpokesPagedResponse listHubSpokes(HubName name) { + ListHubSpokesRequest request = + ListHubSpokesRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return listHubSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubSpokesPagedResponse listHubSpokes(String name) { + ListHubSpokesRequest request = ListHubSpokesRequest.newBuilder().setName(name).build(); + return listHubSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListHubSpokesRequest request =
+   *       ListHubSpokesRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .addAllSpokeLocations(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Spoke element : hubServiceClient.listHubSpokes(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 + */ + public final ListHubSpokesPagedResponse listHubSpokes(ListHubSpokesRequest request) { + return listHubSpokesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListHubSpokesRequest request =
+   *       ListHubSpokesRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .addAllSpokeLocations(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.listHubSpokesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Spoke element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listHubSpokesPagedCallable() { + return stub.listHubSpokesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListHubSpokesRequest request =
+   *       ListHubSpokesRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .addAllSpokeLocations(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListHubSpokesResponse response = hubServiceClient.listHubSpokesCallable().call(request);
+   *     for (Spoke element : response.getSpokesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listHubSpokesCallable() { + return stub.listHubSpokesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists the Network Connectivity Center spokes in a specified project and location. @@ -1430,7 +1617,9 @@ public final UnaryCallable updateSpokeCallable() // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a Network Connectivity Center spoke. + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. * *

Sample code: * @@ -1441,23 +1630,31 @@ public final UnaryCallable updateSpokeCallable() * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { - * SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); - * hubServiceClient.deleteSpokeAsync(name).get(); + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + * RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); * } * } * - * @param name Required. The name of the spoke to delete. + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteSpokeAsync(SpokeName name) { - DeleteSpokeRequest request = - DeleteSpokeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteSpokeAsync(request); + public final OperationFuture rejectHubSpokeAsync( + HubName name, SpokeName spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return rejectHubSpokeAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a Network Connectivity Center spoke. + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. * *

Sample code: * @@ -1468,22 +1665,31 @@ public final OperationFuture deleteSpokeAsync(SpokeNam * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { - * String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); - * hubServiceClient.deleteSpokeAsync(name).get(); + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + * RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); * } * } * - * @param name Required. The name of the spoke to delete. + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteSpokeAsync(String name) { - DeleteSpokeRequest request = DeleteSpokeRequest.newBuilder().setName(name).build(); - return deleteSpokeAsync(request); + public final OperationFuture rejectHubSpokeAsync( + HubName name, String spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri) + .build(); + return rejectHubSpokeAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a Network Connectivity Center spoke. + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. * *

Sample code: * @@ -1494,26 +1700,97 @@ public final OperationFuture deleteSpokeAsync(String n * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { - * DeleteSpokeRequest request = - * DeleteSpokeRequest.newBuilder() - * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * String name = HubName.of("[PROJECT]", "[HUB]").toString(); + * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + * RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); + * } + * } + * + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectHubSpokeAsync( + String name, SpokeName spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return rejectHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectHubSpokeAsync( + String name, String spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder().setName(name).setSpokeUri(spokeUri).build(); + return rejectHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectHubSpokeRequest request =
+   *       RejectHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
    *           .setRequestId("requestId693933066")
+   *           .setDetails("details1557721666")
    *           .build();
-   *   hubServiceClient.deleteSpokeAsync(request).get();
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(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 */ - public final OperationFuture deleteSpokeAsync( - DeleteSpokeRequest request) { - return deleteSpokeOperationCallable().futureCall(request); + public final OperationFuture rejectHubSpokeAsync( + RejectHubSpokeRequest request) { + return rejectHubSpokeOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a Network Connectivity Center spoke. + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. * *

Sample code: * @@ -1524,26 +1801,30 @@ public final OperationFuture deleteSpokeAsync( * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { - * DeleteSpokeRequest request = - * DeleteSpokeRequest.newBuilder() - * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * RejectHubSpokeRequest request = + * RejectHubSpokeRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) * .setRequestId("requestId693933066") + * .setDetails("details1557721666") * .build(); - * OperationFuture future = - * hubServiceClient.deleteSpokeOperationCallable().futureCall(request); + * OperationFuture future = + * hubServiceClient.rejectHubSpokeOperationCallable().futureCall(request); * // Do something. - * future.get(); + * RejectHubSpokeResponse response = future.get(); * } * } */ - public final OperationCallable - deleteSpokeOperationCallable() { - return stub.deleteSpokeOperationCallable(); + public final OperationCallable + rejectHubSpokeOperationCallable() { + return stub.rejectHubSpokeOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a Network Connectivity Center spoke. + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. * *

Sample code: * @@ -1554,37 +1835,1567 @@ public final OperationFuture deleteSpokeAsync( * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { - * DeleteSpokeRequest request = - * DeleteSpokeRequest.newBuilder() - * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + * RejectHubSpokeRequest request = + * RejectHubSpokeRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) * .setRequestId("requestId693933066") + * .setDetails("details1557721666") * .build(); - * ApiFuture future = hubServiceClient.deleteSpokeCallable().futureCall(request); + * ApiFuture future = hubServiceClient.rejectHubSpokeCallable().futureCall(request); * // Do something. - * future.get(); + * Operation response = future.get(); * } * } */ - public final UnaryCallable deleteSpokeCallable() { - return stub.deleteSpokeCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); + public final UnaryCallable rejectHubSpokeCallable() { + return stub.rejectHubSpokeCallable(); } - @Override - public boolean isShutdown() { - return stub.isShutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + HubName name, SpokeName spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return acceptHubSpokeAsync(request); } - @Override + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + HubName name, String spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri) + .build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + String name, SpokeName spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + String name, String spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder().setName(name).setSpokeUri(spokeUri).build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptHubSpokeRequest request =
+   *       AcceptHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(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 + */ + public final OperationFuture acceptHubSpokeAsync( + AcceptHubSpokeRequest request) { + return acceptHubSpokeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptHubSpokeRequest request =
+   *       AcceptHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.acceptHubSpokeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AcceptHubSpokeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + acceptHubSpokeOperationCallable() { + return stub.acceptHubSpokeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptHubSpokeRequest request =
+   *       AcceptHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.acceptHubSpokeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable acceptHubSpokeCallable() { + return stub.acceptHubSpokeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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 + */ + public final OperationFuture deleteSpokeAsync(SpokeName name) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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 + */ + public final OperationFuture deleteSpokeAsync(String name) { + DeleteSpokeRequest request = DeleteSpokeRequest.newBuilder().setName(name).build(); + return deleteSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * 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 + */ + public final OperationFuture deleteSpokeAsync( + DeleteSpokeRequest request) { + return deleteSpokeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   DeleteSpokeRequest request =
+   *       DeleteSpokeRequest.newBuilder()
+   *           .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.deleteSpokeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteSpokeOperationCallable() { + return stub.deleteSpokeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   DeleteSpokeRequest request =
+   *       DeleteSpokeRequest.newBuilder()
+   *           .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.deleteSpokeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSpokeCallable() { + return stub.deleteSpokeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+   *   RouteTable response = hubServiceClient.getRouteTable(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RouteTable getRouteTable(RouteTableName name) { + GetRouteTableRequest request = + GetRouteTableRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRouteTable(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+   *   RouteTable response = hubServiceClient.getRouteTable(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RouteTable getRouteTable(String name) { + GetRouteTableRequest request = GetRouteTableRequest.newBuilder().setName(name).build(); + return getRouteTable(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteTableRequest request =
+   *       GetRouteTableRequest.newBuilder()
+   *           .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .build();
+   *   RouteTable response = hubServiceClient.getRouteTable(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 + */ + public final RouteTable getRouteTable(GetRouteTableRequest request) { + return getRouteTableCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteTableRequest request =
+   *       GetRouteTableRequest.newBuilder()
+   *           .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.getRouteTableCallable().futureCall(request);
+   *   // Do something.
+   *   RouteTable response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRouteTableCallable() { + return stub.getRouteTableCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about the specified route. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
+   *   Route response = hubServiceClient.getRoute(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Route getRoute(HubRouteName name) { + GetRouteRequest request = + GetRouteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRoute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about the specified route. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString();
+   *   Route response = hubServiceClient.getRoute(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Route getRoute(String name) { + GetRouteRequest request = GetRouteRequest.newBuilder().setName(name).build(); + return getRoute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about the specified route. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteRequest request =
+   *       GetRouteRequest.newBuilder()
+   *           .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+   *           .build();
+   *   Route response = hubServiceClient.getRoute(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 + */ + public final Route getRoute(GetRouteRequest request) { + return getRouteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about the specified route. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteRequest request =
+   *       GetRouteRequest.newBuilder()
+   *           .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.getRouteCallable().futureCall(request);
+   *   // Do something.
+   *   Route response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRouteCallable() { + return stub.getRouteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+   *   for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutesPagedResponse listRoutes(RouteTableName parent) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+   *   for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutesPagedResponse listRoutes(String parent) { + ListRoutesRequest request = ListRoutesRequest.newBuilder().setParent(parent).build(); + return listRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRoutesRequest request =
+   *       ListRoutesRequest.newBuilder()
+   *           .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Route element : hubServiceClient.listRoutes(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 + */ + public final ListRoutesPagedResponse listRoutes(ListRoutesRequest request) { + return listRoutesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRoutesRequest request =
+   *       ListRoutesRequest.newBuilder()
+   *           .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.listRoutesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Route element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRoutesPagedCallable() { + return stub.listRoutesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRoutesRequest request =
+   *       ListRoutesRequest.newBuilder()
+   *           .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListRoutesResponse response = hubServiceClient.listRoutesCallable().call(request);
+   *     for (Route element : response.getRoutesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRoutesCallable() { + return stub.listRoutesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName parent = HubName.of("[PROJECT]", "[HUB]");
+   *   for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRouteTablesPagedResponse listRouteTables(HubName parent) { + ListRouteTablesRequest request = + ListRouteTablesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRouteTables(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRouteTablesPagedResponse listRouteTables(String parent) { + ListRouteTablesRequest request = ListRouteTablesRequest.newBuilder().setParent(parent).build(); + return listRouteTables(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRouteTablesRequest request =
+   *       ListRouteTablesRequest.newBuilder()
+   *           .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (RouteTable element : hubServiceClient.listRouteTables(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 + */ + public final ListRouteTablesPagedResponse listRouteTables(ListRouteTablesRequest request) { + return listRouteTablesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRouteTablesRequest request =
+   *       ListRouteTablesRequest.newBuilder()
+   *           .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.listRouteTablesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RouteTable element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRouteTablesPagedCallable() { + return stub.listRouteTablesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRouteTablesRequest request =
+   *       ListRouteTablesRequest.newBuilder()
+   *           .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListRouteTablesResponse response = hubServiceClient.listRouteTablesCallable().call(request);
+   *     for (RouteTable element : response.getRouteTablesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRouteTablesCallable() { + return stub.listRouteTablesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]");
+   *   Group response = hubServiceClient.getGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(GroupName name) { + GetGroupRequest request = + GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString();
+   *   Group response = hubServiceClient.getGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(String name) { + GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build(); + return getGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetGroupRequest request =
+   *       GetGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .build();
+   *   Group response = hubServiceClient.getGroup(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 + */ + public final Group getGroup(GetGroupRequest request) { + return getGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetGroupRequest request =
+   *       GetGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.getGroupCallable().futureCall(request);
+   *   // Do something.
+   *   Group response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getGroupCallable() { + return stub.getGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName parent = HubName.of("[PROJECT]", "[HUB]");
+   *   for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(HubName parent) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(String parent) { + ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build(); + return listGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListGroupsRequest request =
+   *       ListGroupsRequest.newBuilder()
+   *           .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Group element : hubServiceClient.listGroups(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 + */ + public final ListGroupsPagedResponse listGroups(ListGroupsRequest request) { + return listGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListGroupsRequest request =
+   *       ListGroupsRequest.newBuilder()
+   *           .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.listGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Group element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listGroupsPagedCallable() { + return stub.listGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListGroupsRequest request =
+   *       ListGroupsRequest.newBuilder()
+   *           .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListGroupsResponse response = hubServiceClient.listGroupsCallable().call(request);
+   *     for (Group element : response.getGroupsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listGroupsCallable() { + return stub.listGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : hubServiceClient.listLocations(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 + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = hubServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = hubServiceClient.getLocation(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 + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = hubServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = hubServiceClient.setIamPolicy(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 + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = hubServiceClient.getIamPolicy(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 + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = hubServiceClient.testIamPermissions(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 + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override public boolean isTerminated() { return stub.isTerminated(); } @@ -1662,6 +3473,81 @@ protected ListHubsFixedSizeCollection createCollection( } } + public static class ListHubSpokesPagedResponse + extends AbstractPagedListResponse< + ListHubSpokesRequest, + ListHubSpokesResponse, + Spoke, + ListHubSpokesPage, + ListHubSpokesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListHubSpokesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListHubSpokesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListHubSpokesPagedResponse(ListHubSpokesPage page) { + super(page, ListHubSpokesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListHubSpokesPage + extends AbstractPage { + + private ListHubSpokesPage( + PageContext context, + ListHubSpokesResponse response) { + super(context, response); + } + + private static ListHubSpokesPage createEmptyPage() { + return new ListHubSpokesPage(null, null); + } + + @Override + protected ListHubSpokesPage createPage( + PageContext context, + ListHubSpokesResponse response) { + return new ListHubSpokesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListHubSpokesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListHubSpokesRequest, + ListHubSpokesResponse, + Spoke, + ListHubSpokesPage, + ListHubSpokesFixedSizeCollection> { + + private ListHubSpokesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListHubSpokesFixedSizeCollection createEmptyCollection() { + return new ListHubSpokesFixedSizeCollection(null, 0); + } + + @Override + protected ListHubSpokesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListHubSpokesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListSpokesPagedResponse extends AbstractPagedListResponse< ListSpokesRequest, @@ -1734,4 +3620,303 @@ protected ListSpokesFixedSizeCollection createCollection( return new ListSpokesFixedSizeCollection(pages, collectionSize); } } + + public static class ListRoutesPagedResponse + extends AbstractPagedListResponse< + ListRoutesRequest, + ListRoutesResponse, + Route, + ListRoutesPage, + ListRoutesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRoutesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListRoutesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListRoutesPagedResponse(ListRoutesPage page) { + super(page, ListRoutesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRoutesPage + extends AbstractPage { + + private ListRoutesPage( + PageContext context, + ListRoutesResponse response) { + super(context, response); + } + + private static ListRoutesPage createEmptyPage() { + return new ListRoutesPage(null, null); + } + + @Override + protected ListRoutesPage createPage( + PageContext context, + ListRoutesResponse response) { + return new ListRoutesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRoutesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRoutesRequest, + ListRoutesResponse, + Route, + ListRoutesPage, + ListRoutesFixedSizeCollection> { + + private ListRoutesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRoutesFixedSizeCollection createEmptyCollection() { + return new ListRoutesFixedSizeCollection(null, 0); + } + + @Override + protected ListRoutesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRoutesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRouteTablesPagedResponse + extends AbstractPagedListResponse< + ListRouteTablesRequest, + ListRouteTablesResponse, + RouteTable, + ListRouteTablesPage, + ListRouteTablesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRouteTablesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRouteTablesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRouteTablesPagedResponse(ListRouteTablesPage page) { + super(page, ListRouteTablesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRouteTablesPage + extends AbstractPage< + ListRouteTablesRequest, ListRouteTablesResponse, RouteTable, ListRouteTablesPage> { + + private ListRouteTablesPage( + PageContext context, + ListRouteTablesResponse response) { + super(context, response); + } + + private static ListRouteTablesPage createEmptyPage() { + return new ListRouteTablesPage(null, null); + } + + @Override + protected ListRouteTablesPage createPage( + PageContext context, + ListRouteTablesResponse response) { + return new ListRouteTablesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRouteTablesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRouteTablesRequest, + ListRouteTablesResponse, + RouteTable, + ListRouteTablesPage, + ListRouteTablesFixedSizeCollection> { + + private ListRouteTablesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRouteTablesFixedSizeCollection createEmptyCollection() { + return new ListRouteTablesFixedSizeCollection(null, 0); + } + + @Override + protected ListRouteTablesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRouteTablesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListGroupsPagedResponse + extends AbstractPagedListResponse< + ListGroupsRequest, + ListGroupsResponse, + Group, + ListGroupsPage, + ListGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListGroupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListGroupsPagedResponse(ListGroupsPage page) { + super(page, ListGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGroupsPage + extends AbstractPage { + + private ListGroupsPage( + PageContext context, + ListGroupsResponse response) { + super(context, response); + } + + private static ListGroupsPage createEmptyPage() { + return new ListGroupsPage(null, null); + } + + @Override + protected ListGroupsPage createPage( + PageContext context, + ListGroupsResponse response) { + return new ListGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListGroupsRequest, + ListGroupsResponse, + Group, + ListGroupsPage, + ListGroupsFixedSizeCollection> { + + private ListGroupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGroupsFixedSizeCollection createEmptyCollection() { + return new ListGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceSettings.java index 77f5ba868fcb..be4c6154db60 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceSettings.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceSettings.java @@ -16,7 +16,12 @@ package com.google.cloud.networkconnectivity.v1; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubSpokesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRoutesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListSpokesPagedResponse; import com.google.api.core.ApiFunction; @@ -31,7 +36,16 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.stub.HubServiceStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -122,6 +136,12 @@ public UnaryCallSettings deleteHubSettings() { return ((HubServiceStubSettings) getStubSettings()).deleteHubOperationSettings(); } + /** Returns the object with the settings used for calls to listHubSpokes. */ + public PagedCallSettings + listHubSpokesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listHubSpokesSettings(); + } + /** Returns the object with the settings used for calls to listSpokes. */ public PagedCallSettings listSpokesSettings() { @@ -155,6 +175,28 @@ public UnaryCallSettings updateSpokeSettings() { return ((HubServiceStubSettings) getStubSettings()).updateSpokeOperationSettings(); } + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings rejectHubSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).rejectHubSpokeSettings(); + } + + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings + rejectHubSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).rejectHubSpokeOperationSettings(); + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings acceptHubSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).acceptHubSpokeSettings(); + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings + acceptHubSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).acceptHubSpokeOperationSettings(); + } + /** Returns the object with the settings used for calls to deleteSpoke. */ public UnaryCallSettings deleteSpokeSettings() { return ((HubServiceStubSettings) getStubSettings()).deleteSpokeSettings(); @@ -166,6 +208,67 @@ public UnaryCallSettings deleteSpokeSettings() { return ((HubServiceStubSettings) getStubSettings()).deleteSpokeOperationSettings(); } + /** Returns the object with the settings used for calls to getRouteTable. */ + public UnaryCallSettings getRouteTableSettings() { + return ((HubServiceStubSettings) getStubSettings()).getRouteTableSettings(); + } + + /** Returns the object with the settings used for calls to getRoute. */ + public UnaryCallSettings getRouteSettings() { + return ((HubServiceStubSettings) getStubSettings()).getRouteSettings(); + } + + /** Returns the object with the settings used for calls to listRoutes. */ + public PagedCallSettings + listRoutesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listRoutesSettings(); + } + + /** Returns the object with the settings used for calls to listRouteTables. */ + public PagedCallSettings< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listRouteTablesSettings(); + } + + /** Returns the object with the settings used for calls to getGroup. */ + public UnaryCallSettings getGroupSettings() { + return ((HubServiceStubSettings) getStubSettings()).getGroupSettings(); + } + + /** Returns the object with the settings used for calls to listGroups. */ + public PagedCallSettings + listGroupsSettings() { + return ((HubServiceStubSettings) getStubSettings()).listGroupsSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((HubServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((HubServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((HubServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((HubServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((HubServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + public static final HubServiceSettings create(HubServiceStubSettings stub) throws IOException { return new HubServiceSettings.Builder(stub.toBuilder()).build(); } @@ -306,6 +409,13 @@ public UnaryCallSettings.Builder deleteHubSettings( return getStubSettingsBuilder().deleteHubOperationSettings(); } + /** Returns the builder for the settings used for calls to listHubSpokes. */ + public PagedCallSettings.Builder< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings() { + return getStubSettingsBuilder().listHubSpokesSettings(); + } + /** Returns the builder for the settings used for calls to listSpokes. */ public PagedCallSettings.Builder listSpokesSettings() { @@ -339,6 +449,30 @@ public UnaryCallSettings.Builder updateSpokeSetti return getStubSettingsBuilder().updateSpokeOperationSettings(); } + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings.Builder rejectHubSpokeSettings() { + return getStubSettingsBuilder().rejectHubSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings.Builder< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings() { + return getStubSettingsBuilder().rejectHubSpokeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings.Builder acceptHubSpokeSettings() { + return getStubSettingsBuilder().acceptHubSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings.Builder< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings() { + return getStubSettingsBuilder().acceptHubSpokeOperationSettings(); + } + /** Returns the builder for the settings used for calls to deleteSpoke. */ public UnaryCallSettings.Builder deleteSpokeSettings() { return getStubSettingsBuilder().deleteSpokeSettings(); @@ -350,6 +484,68 @@ public UnaryCallSettings.Builder deleteSpokeSetti return getStubSettingsBuilder().deleteSpokeOperationSettings(); } + /** Returns the builder for the settings used for calls to getRouteTable. */ + public UnaryCallSettings.Builder getRouteTableSettings() { + return getStubSettingsBuilder().getRouteTableSettings(); + } + + /** Returns the builder for the settings used for calls to getRoute. */ + public UnaryCallSettings.Builder getRouteSettings() { + return getStubSettingsBuilder().getRouteSettings(); + } + + /** Returns the builder for the settings used for calls to listRoutes. */ + public PagedCallSettings.Builder + listRoutesSettings() { + return getStubSettingsBuilder().listRoutesSettings(); + } + + /** Returns the builder for the settings used for calls to listRouteTables. */ + public PagedCallSettings.Builder< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return getStubSettingsBuilder().listRouteTablesSettings(); + } + + /** Returns the builder for the settings used for calls to getGroup. */ + public UnaryCallSettings.Builder getGroupSettings() { + return getStubSettingsBuilder().getGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listGroups. */ + public PagedCallSettings.Builder + listGroupsSettings() { + return getStubSettingsBuilder().listGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + @Override public HubServiceSettings build() throws IOException { return new HubServiceSettings(this); diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClient.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClient.java index f054e7db7d0d..709488f6d71d 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClient.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClient.java @@ -26,9 +26,18 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.stub.PolicyBasedRoutingServiceStub; import com.google.cloud.networkconnectivity.v1.stub.PolicyBasedRoutingServiceStubSettings; import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.OperationsClient; import com.google.protobuf.Empty; @@ -813,6 +822,368 @@ public final OperationFuture deletePolicyBasedRouteAsy return stub.deletePolicyBasedRouteCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : policyBasedRoutingServiceClient.listLocations(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 + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         policyBasedRoutingServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = policyBasedRoutingServiceClient.getLocation(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 + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = policyBasedRoutingServiceClient.setIamPolicy(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 + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = policyBasedRoutingServiceClient.getIamPolicy(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 + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       policyBasedRoutingServiceClient.testIamPermissions(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 + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + @Override public final void close() { stub.close(); @@ -926,4 +1297,80 @@ protected ListPolicyBasedRoutesFixedSizeCollection createCollection( return new ListPolicyBasedRoutesFixedSizeCollection(pages, collectionSize); } } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceSettings.java index aba8543773d1..73f0cc25dddb 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceSettings.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.networkconnectivity.v1; +import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; import com.google.api.core.ApiFunction; @@ -30,7 +31,16 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.stub.PolicyBasedRoutingServiceStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -125,6 +135,33 @@ public class PolicyBasedRoutingServiceSettings .deletePolicyBasedRouteOperationSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + public static final PolicyBasedRoutingServiceSettings create( PolicyBasedRoutingServiceStubSettings stub) throws IOException { return new PolicyBasedRoutingServiceSettings.Builder(stub.toBuilder()).build(); @@ -263,6 +300,34 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().deletePolicyBasedRouteOperationSettings(); } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + @Override public PolicyBasedRoutingServiceSettings build() throws IOException { return new PolicyBasedRoutingServiceSettings(this); diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/gapic_metadata.json b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/gapic_metadata.json index c2a68318d1b1..612b27c15606 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/gapic_metadata.json +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "HubServiceClient", "rpcs": { + "AcceptHubSpoke": { + "methods": ["acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeOperationCallable", "acceptHubSpokeCallable"] + }, "CreateHub": { "methods": ["createHubAsync", "createHubAsync", "createHubAsync", "createHubOperationCallable", "createHubCallable"] }, @@ -22,18 +25,57 @@ "DeleteSpoke": { "methods": ["deleteSpokeAsync", "deleteSpokeAsync", "deleteSpokeAsync", "deleteSpokeOperationCallable", "deleteSpokeCallable"] }, + "GetGroup": { + "methods": ["getGroup", "getGroup", "getGroup", "getGroupCallable"] + }, "GetHub": { "methods": ["getHub", "getHub", "getHub", "getHubCallable"] }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetRoute": { + "methods": ["getRoute", "getRoute", "getRoute", "getRouteCallable"] + }, + "GetRouteTable": { + "methods": ["getRouteTable", "getRouteTable", "getRouteTable", "getRouteTableCallable"] + }, "GetSpoke": { "methods": ["getSpoke", "getSpoke", "getSpoke", "getSpokeCallable"] }, + "ListGroups": { + "methods": ["listGroups", "listGroups", "listGroups", "listGroupsPagedCallable", "listGroupsCallable"] + }, + "ListHubSpokes": { + "methods": ["listHubSpokes", "listHubSpokes", "listHubSpokes", "listHubSpokesPagedCallable", "listHubSpokesCallable"] + }, "ListHubs": { "methods": ["listHubs", "listHubs", "listHubs", "listHubsPagedCallable", "listHubsCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListRouteTables": { + "methods": ["listRouteTables", "listRouteTables", "listRouteTables", "listRouteTablesPagedCallable", "listRouteTablesCallable"] + }, + "ListRoutes": { + "methods": ["listRoutes", "listRoutes", "listRoutes", "listRoutesPagedCallable", "listRoutesCallable"] + }, "ListSpokes": { "methods": ["listSpokes", "listSpokes", "listSpokes", "listSpokesPagedCallable", "listSpokesCallable"] }, + "RejectHubSpoke": { + "methods": ["rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeOperationCallable", "rejectHubSpokeCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, "UpdateHub": { "methods": ["updateHubAsync", "updateHubAsync", "updateHubOperationCallable", "updateHubCallable"] }, @@ -55,11 +97,26 @@ "DeletePolicyBasedRoute": { "methods": ["deletePolicyBasedRouteAsync", "deletePolicyBasedRouteAsync", "deletePolicyBasedRouteAsync", "deletePolicyBasedRouteOperationCallable", "deletePolicyBasedRouteCallable"] }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "GetPolicyBasedRoute": { "methods": ["getPolicyBasedRoute", "getPolicyBasedRoute", "getPolicyBasedRoute", "getPolicyBasedRouteCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ListPolicyBasedRoutes": { "methods": ["listPolicyBasedRoutes", "listPolicyBasedRoutes", "listPolicyBasedRoutes", "listPolicyBasedRoutesPagedCallable", "listPolicyBasedRoutesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] } } } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcHubServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcHubServiceStub.java index e80cdebb295b..74fe1ca33db4 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcHubServiceStub.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcHubServiceStub.java @@ -16,7 +16,12 @@ package com.google.cloud.networkconnectivity.v1.stub; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubSpokesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRoutesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListSpokesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -27,21 +32,48 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse; import com.google.cloud.networkconnectivity.v1.CreateHubRequest; import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; import com.google.cloud.networkconnectivity.v1.DeleteHubRequest; import com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1.GetGroupRequest; import com.google.cloud.networkconnectivity.v1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1.GetRouteTableRequest; import com.google.cloud.networkconnectivity.v1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1.Group; import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1.ListGroupsResponse; +import com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse; import com.google.cloud.networkconnectivity.v1.ListHubsRequest; import com.google.cloud.networkconnectivity.v1.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1.ListRoutesResponse; import com.google.cloud.networkconnectivity.v1.ListSpokesRequest; import com.google.cloud.networkconnectivity.v1.ListSpokesResponse; import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1.Route; +import com.google.cloud.networkconnectivity.v1.RouteTable; import com.google.cloud.networkconnectivity.v1.Spoke; import com.google.cloud.networkconnectivity.v1.UpdateHubRequest; import com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -100,6 +132,17 @@ public class GrpcHubServiceStub extends HubServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + listHubSpokesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/ListHubSpokes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListHubSpokesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListHubSpokesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listSpokesMethodDescriptor = MethodDescriptor.newBuilder() @@ -133,6 +176,26 @@ public class GrpcHubServiceStub extends HubServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + rejectHubSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/RejectHubSpoke") + .setRequestMarshaller( + ProtoUtils.marshaller(RejectHubSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + acceptHubSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/AcceptHubSpoke") + .setRequestMarshaller( + ProtoUtils.marshaller(AcceptHubSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteSpokeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -141,6 +204,107 @@ public class GrpcHubServiceStub extends HubServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + getRouteTableMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/GetRouteTable") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRouteTableRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RouteTable.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/GetRoute") + .setRequestMarshaller(ProtoUtils.marshaller(GetRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Route.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRoutesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/ListRoutes") + .setRequestMarshaller(ProtoUtils.marshaller(ListRoutesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListRoutesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRouteTablesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/ListRouteTables") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRouteTablesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRouteTablesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/GetGroup") + .setRequestMarshaller(ProtoUtils.marshaller(GetGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Group.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1.HubService/ListGroups") + .setRequestMarshaller(ProtoUtils.marshaller(ListGroupsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListGroupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable listHubsCallable; private final UnaryCallable listHubsPagedCallable; private final UnaryCallable getHubCallable; @@ -153,6 +317,9 @@ public class GrpcHubServiceStub extends HubServiceStub { private final UnaryCallable deleteHubCallable; private final OperationCallable deleteHubOperationCallable; + private final UnaryCallable listHubSpokesCallable; + private final UnaryCallable + listHubSpokesPagedCallable; private final UnaryCallable listSpokesCallable; private final UnaryCallable listSpokesPagedCallable; private final UnaryCallable getSpokeCallable; @@ -162,9 +329,34 @@ public class GrpcHubServiceStub extends HubServiceStub { private final UnaryCallable updateSpokeCallable; private final OperationCallable updateSpokeOperationCallable; + private final UnaryCallable rejectHubSpokeCallable; + private final OperationCallable + rejectHubSpokeOperationCallable; + private final UnaryCallable acceptHubSpokeCallable; + private final OperationCallable + acceptHubSpokeOperationCallable; private final UnaryCallable deleteSpokeCallable; private final OperationCallable deleteSpokeOperationCallable; + private final UnaryCallable getRouteTableCallable; + private final UnaryCallable getRouteCallable; + private final UnaryCallable listRoutesCallable; + private final UnaryCallable listRoutesPagedCallable; + private final UnaryCallable + listRouteTablesCallable; + private final UnaryCallable + listRouteTablesPagedCallable; + private final UnaryCallable getGroupCallable; + private final UnaryCallable listGroupsCallable; + private final UnaryCallable listGroupsPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -258,6 +450,16 @@ protected GrpcHubServiceStub( return builder.build(); }) .build(); + GrpcCallSettings listHubSpokesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listHubSpokesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listSpokesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listSpokesMethodDescriptor) @@ -298,6 +500,26 @@ protected GrpcHubServiceStub( return builder.build(); }) .build(); + GrpcCallSettings rejectHubSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rejectHubSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings acceptHubSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(acceptHubSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings deleteSpokeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSpokeMethodDescriptor) @@ -308,6 +530,118 @@ protected GrpcHubServiceStub( return builder.build(); }) .build(); + GrpcCallSettings getRouteTableTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRouteTableMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listRoutesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRoutesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listRouteTablesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRouteTablesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); this.listHubsCallable = callableFactory.createUnaryCallable( @@ -345,6 +679,12 @@ protected GrpcHubServiceStub( settings.deleteHubOperationSettings(), clientContext, operationsStub); + this.listHubSpokesCallable = + callableFactory.createUnaryCallable( + listHubSpokesTransportSettings, settings.listHubSpokesSettings(), clientContext); + this.listHubSpokesPagedCallable = + callableFactory.createPagedCallable( + listHubSpokesTransportSettings, settings.listHubSpokesSettings(), clientContext); this.listSpokesCallable = callableFactory.createUnaryCallable( listSpokesTransportSettings, settings.listSpokesSettings(), clientContext); @@ -372,6 +712,24 @@ protected GrpcHubServiceStub( settings.updateSpokeOperationSettings(), clientContext, operationsStub); + this.rejectHubSpokeCallable = + callableFactory.createUnaryCallable( + rejectHubSpokeTransportSettings, settings.rejectHubSpokeSettings(), clientContext); + this.rejectHubSpokeOperationCallable = + callableFactory.createOperationCallable( + rejectHubSpokeTransportSettings, + settings.rejectHubSpokeOperationSettings(), + clientContext, + operationsStub); + this.acceptHubSpokeCallable = + callableFactory.createUnaryCallable( + acceptHubSpokeTransportSettings, settings.acceptHubSpokeSettings(), clientContext); + this.acceptHubSpokeOperationCallable = + callableFactory.createOperationCallable( + acceptHubSpokeTransportSettings, + settings.acceptHubSpokeOperationSettings(), + clientContext, + operationsStub); this.deleteSpokeCallable = callableFactory.createUnaryCallable( deleteSpokeTransportSettings, settings.deleteSpokeSettings(), clientContext); @@ -381,6 +739,53 @@ protected GrpcHubServiceStub( settings.deleteSpokeOperationSettings(), clientContext, operationsStub); + this.getRouteTableCallable = + callableFactory.createUnaryCallable( + getRouteTableTransportSettings, settings.getRouteTableSettings(), clientContext); + this.getRouteCallable = + callableFactory.createUnaryCallable( + getRouteTransportSettings, settings.getRouteSettings(), clientContext); + this.listRoutesCallable = + callableFactory.createUnaryCallable( + listRoutesTransportSettings, settings.listRoutesSettings(), clientContext); + this.listRoutesPagedCallable = + callableFactory.createPagedCallable( + listRoutesTransportSettings, settings.listRoutesSettings(), clientContext); + this.listRouteTablesCallable = + callableFactory.createUnaryCallable( + listRouteTablesTransportSettings, settings.listRouteTablesSettings(), clientContext); + this.listRouteTablesPagedCallable = + callableFactory.createPagedCallable( + listRouteTablesTransportSettings, settings.listRouteTablesSettings(), clientContext); + this.getGroupCallable = + callableFactory.createUnaryCallable( + getGroupTransportSettings, settings.getGroupSettings(), clientContext); + this.listGroupsCallable = + callableFactory.createUnaryCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.listGroupsPagedCallable = + callableFactory.createPagedCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -436,6 +841,17 @@ public UnaryCallable deleteHubCallable() { return deleteHubOperationCallable; } + @Override + public UnaryCallable listHubSpokesCallable() { + return listHubSpokesCallable; + } + + @Override + public UnaryCallable + listHubSpokesPagedCallable() { + return listHubSpokesPagedCallable; + } + @Override public UnaryCallable listSpokesCallable() { return listSpokesCallable; @@ -473,6 +889,28 @@ public UnaryCallable updateSpokeCallable() { return updateSpokeOperationCallable; } + @Override + public UnaryCallable rejectHubSpokeCallable() { + return rejectHubSpokeCallable; + } + + @Override + public OperationCallable + rejectHubSpokeOperationCallable() { + return rejectHubSpokeOperationCallable; + } + + @Override + public UnaryCallable acceptHubSpokeCallable() { + return acceptHubSpokeCallable; + } + + @Override + public OperationCallable + acceptHubSpokeOperationCallable() { + return acceptHubSpokeOperationCallable; + } + @Override public UnaryCallable deleteSpokeCallable() { return deleteSpokeCallable; @@ -484,6 +922,84 @@ public UnaryCallable deleteSpokeCallable() { return deleteSpokeOperationCallable; } + @Override + public UnaryCallable getRouteTableCallable() { + return getRouteTableCallable; + } + + @Override + public UnaryCallable getRouteCallable() { + return getRouteCallable; + } + + @Override + public UnaryCallable listRoutesCallable() { + return listRoutesCallable; + } + + @Override + public UnaryCallable listRoutesPagedCallable() { + return listRoutesPagedCallable; + } + + @Override + public UnaryCallable listRouteTablesCallable() { + return listRouteTablesCallable; + } + + @Override + public UnaryCallable + listRouteTablesPagedCallable() { + return listRouteTablesPagedCallable; + } + + @Override + public UnaryCallable getGroupCallable() { + return getGroupCallable; + } + + @Override + public UnaryCallable listGroupsCallable() { + return listGroupsCallable; + } + + @Override + public UnaryCallable listGroupsPagedCallable() { + return listGroupsPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + @Override public final void close() { try { diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcPolicyBasedRoutingServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcPolicyBasedRoutingServiceStub.java index e72f3c11781b..558166956089 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcPolicyBasedRoutingServiceStub.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/GrpcPolicyBasedRoutingServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkconnectivity.v1.stub; +import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -26,6 +27,10 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest; import com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest; import com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest; @@ -33,6 +38,11 @@ import com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse; import com.google.cloud.networkconnectivity.v1.OperationMetadata; import com.google.cloud.networkconnectivity.v1.PolicyBasedRoute; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -95,6 +105,52 @@ public class GrpcPolicyBasedRoutingServiceStub extends PolicyBasedRoutingService .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable listPolicyBasedRoutesCallable; private final UnaryCallable @@ -110,6 +166,14 @@ public class GrpcPolicyBasedRoutingServiceStub extends PolicyBasedRoutingService deletePolicyBasedRouteCallable; private final OperationCallable deletePolicyBasedRouteOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -201,6 +265,57 @@ protected GrpcPolicyBasedRoutingServiceStub( return builder.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); this.listPolicyBasedRoutesCallable = callableFactory.createUnaryCallable( @@ -239,6 +354,26 @@ protected GrpcPolicyBasedRoutingServiceStub( settings.deletePolicyBasedRouteOperationSettings(), clientContext, operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -287,6 +422,38 @@ public UnaryCallable deletePolicyBased return deletePolicyBasedRouteOperationCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + @Override public final void close() { try { diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStub.java index 688ebc1a52ab..43c7d6aa3a03 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStub.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStub.java @@ -16,27 +16,59 @@ package com.google.cloud.networkconnectivity.v1.stub; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubSpokesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRoutesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListSpokesPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse; import com.google.cloud.networkconnectivity.v1.CreateHubRequest; import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; import com.google.cloud.networkconnectivity.v1.DeleteHubRequest; import com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1.GetGroupRequest; import com.google.cloud.networkconnectivity.v1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1.GetRouteTableRequest; import com.google.cloud.networkconnectivity.v1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1.Group; import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1.ListGroupsResponse; +import com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse; import com.google.cloud.networkconnectivity.v1.ListHubsRequest; import com.google.cloud.networkconnectivity.v1.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1.ListRoutesResponse; import com.google.cloud.networkconnectivity.v1.ListSpokesRequest; import com.google.cloud.networkconnectivity.v1.ListSpokesResponse; import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1.Route; +import com.google.cloud.networkconnectivity.v1.RouteTable; import com.google.cloud.networkconnectivity.v1.Spoke; import com.google.cloud.networkconnectivity.v1.UpdateHubRequest; import com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -92,6 +124,15 @@ public UnaryCallable deleteHubCallable() { throw new UnsupportedOperationException("Not implemented: deleteHubCallable()"); } + public UnaryCallable + listHubSpokesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listHubSpokesPagedCallable()"); + } + + public UnaryCallable listHubSpokesCallable() { + throw new UnsupportedOperationException("Not implemented: listHubSpokesCallable()"); + } + public UnaryCallable listSpokesPagedCallable() { throw new UnsupportedOperationException("Not implemented: listSpokesPagedCallable()"); } @@ -122,6 +163,24 @@ public UnaryCallable updateSpokeCallable() { throw new UnsupportedOperationException("Not implemented: updateSpokeCallable()"); } + public OperationCallable + rejectHubSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: rejectHubSpokeOperationCallable()"); + } + + public UnaryCallable rejectHubSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: rejectHubSpokeCallable()"); + } + + public OperationCallable + acceptHubSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: acceptHubSpokeOperationCallable()"); + } + + public UnaryCallable acceptHubSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: acceptHubSpokeCallable()"); + } + public OperationCallable deleteSpokeOperationCallable() { throw new UnsupportedOperationException("Not implemented: deleteSpokeOperationCallable()"); @@ -131,6 +190,69 @@ public UnaryCallable deleteSpokeCallable() { throw new UnsupportedOperationException("Not implemented: deleteSpokeCallable()"); } + public UnaryCallable getRouteTableCallable() { + throw new UnsupportedOperationException("Not implemented: getRouteTableCallable()"); + } + + public UnaryCallable getRouteCallable() { + throw new UnsupportedOperationException("Not implemented: getRouteCallable()"); + } + + public UnaryCallable listRoutesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRoutesPagedCallable()"); + } + + public UnaryCallable listRoutesCallable() { + throw new UnsupportedOperationException("Not implemented: listRoutesCallable()"); + } + + public UnaryCallable + listRouteTablesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRouteTablesPagedCallable()"); + } + + public UnaryCallable listRouteTablesCallable() { + throw new UnsupportedOperationException("Not implemented: listRouteTablesCallable()"); + } + + public UnaryCallable getGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getGroupCallable()"); + } + + public UnaryCallable listGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listGroupsPagedCallable()"); + } + + public UnaryCallable listGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listGroupsCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + @Override public abstract void close(); } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStubSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStubSettings.java index 3aae205d4443..3ea33eb66f3a 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStubSettings.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/HubServiceStubSettings.java @@ -16,7 +16,12 @@ package com.google.cloud.networkconnectivity.v1.stub; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubSpokesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRoutesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListSpokesPagedResponse; import com.google.api.core.ApiFunction; @@ -45,18 +50,40 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse; import com.google.cloud.networkconnectivity.v1.CreateHubRequest; import com.google.cloud.networkconnectivity.v1.CreateSpokeRequest; import com.google.cloud.networkconnectivity.v1.DeleteHubRequest; import com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1.GetGroupRequest; import com.google.cloud.networkconnectivity.v1.GetHubRequest; +import com.google.cloud.networkconnectivity.v1.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1.GetRouteTableRequest; import com.google.cloud.networkconnectivity.v1.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1.Group; import com.google.cloud.networkconnectivity.v1.Hub; +import com.google.cloud.networkconnectivity.v1.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1.ListGroupsResponse; +import com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse; import com.google.cloud.networkconnectivity.v1.ListHubsRequest; import com.google.cloud.networkconnectivity.v1.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1.ListRoutesResponse; import com.google.cloud.networkconnectivity.v1.ListSpokesRequest; import com.google.cloud.networkconnectivity.v1.ListSpokesResponse; import com.google.cloud.networkconnectivity.v1.OperationMetadata; +import com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1.Route; +import com.google.cloud.networkconnectivity.v1.RouteTable; import com.google.cloud.networkconnectivity.v1.Spoke; import com.google.cloud.networkconnectivity.v1.UpdateHubRequest; import com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest; @@ -64,6 +91,11 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -126,6 +158,9 @@ public class HubServiceStubSettings extends StubSettings private final UnaryCallSettings deleteHubSettings; private final OperationCallSettings deleteHubOperationSettings; + private final PagedCallSettings< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings; private final PagedCallSettings listSpokesSettings; private final UnaryCallSettings getSpokeSettings; @@ -135,9 +170,35 @@ public class HubServiceStubSettings extends StubSettings private final UnaryCallSettings updateSpokeSettings; private final OperationCallSettings updateSpokeOperationSettings; + private final UnaryCallSettings rejectHubSpokeSettings; + private final OperationCallSettings< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings; + private final UnaryCallSettings acceptHubSpokeSettings; + private final OperationCallSettings< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings; private final UnaryCallSettings deleteSpokeSettings; private final OperationCallSettings deleteSpokeOperationSettings; + private final UnaryCallSettings getRouteTableSettings; + private final UnaryCallSettings getRouteSettings; + private final PagedCallSettings + listRoutesSettings; + private final PagedCallSettings< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings; + private final UnaryCallSettings getGroupSettings; + private final PagedCallSettings + listGroupsSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; private static final PagedListDescriptor LIST_HUBS_PAGE_STR_DESC = @@ -175,6 +236,42 @@ public Iterable extractResources(ListHubsResponse payload) { } }; + private static final PagedListDescriptor + LIST_HUB_SPOKES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListHubSpokesRequest injectToken(ListHubSpokesRequest payload, String token) { + return ListHubSpokesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListHubSpokesRequest injectPageSize(ListHubSpokesRequest payload, int pageSize) { + return ListHubSpokesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListHubSpokesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListHubSpokesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListHubSpokesResponse payload) { + return payload.getSpokesList() == null + ? ImmutableList.of() + : payload.getSpokesList(); + } + }; + private static final PagedListDescriptor LIST_SPOKES_PAGE_STR_DESC = new PagedListDescriptor() { @@ -211,6 +308,153 @@ public Iterable extractResources(ListSpokesResponse payload) { } }; + private static final PagedListDescriptor + LIST_ROUTES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRoutesRequest injectToken(ListRoutesRequest payload, String token) { + return ListRoutesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRoutesRequest injectPageSize(ListRoutesRequest payload, int pageSize) { + return ListRoutesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRoutesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRoutesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRoutesResponse payload) { + return payload.getRoutesList() == null + ? ImmutableList.of() + : payload.getRoutesList(); + } + }; + + private static final PagedListDescriptor< + ListRouteTablesRequest, ListRouteTablesResponse, RouteTable> + LIST_ROUTE_TABLES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRouteTablesRequest injectToken( + ListRouteTablesRequest payload, String token) { + return ListRouteTablesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRouteTablesRequest injectPageSize( + ListRouteTablesRequest payload, int pageSize) { + return ListRouteTablesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRouteTablesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRouteTablesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRouteTablesResponse payload) { + return payload.getRouteTablesList() == null + ? ImmutableList.of() + : payload.getRouteTablesList(); + } + }; + + private static final PagedListDescriptor + LIST_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListGroupsRequest injectToken(ListGroupsRequest payload, String token) { + return ListGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListGroupsRequest injectPageSize(ListGroupsRequest payload, int pageSize) { + return ListGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListGroupsResponse payload) { + return payload.getGroupsList() == null + ? ImmutableList.of() + : payload.getGroupsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + private static final PagedListResponseFactory< ListHubsRequest, ListHubsResponse, ListHubsPagedResponse> LIST_HUBS_PAGE_STR_FACT = @@ -227,6 +471,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + LIST_HUB_SPOKES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListHubSpokesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_HUB_SPOKES_PAGE_STR_DESC, request, context); + return ListHubSpokesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse> LIST_SPOKES_PAGE_STR_FACT = @@ -244,6 +505,74 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse> + LIST_ROUTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRoutesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ROUTES_PAGE_STR_DESC, request, context); + return ListRoutesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + LIST_ROUTE_TABLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRouteTablesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ROUTE_TABLES_PAGE_STR_DESC, request, context); + return ListRouteTablesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse> + LIST_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_GROUPS_PAGE_STR_DESC, request, context); + return ListGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listHubs. */ public PagedCallSettings listHubsSettings() { @@ -288,6 +617,12 @@ public UnaryCallSettings deleteHubSettings() { return deleteHubOperationSettings; } + /** Returns the object with the settings used for calls to listHubSpokes. */ + public PagedCallSettings + listHubSpokesSettings() { + return listHubSpokesSettings; + } + /** Returns the object with the settings used for calls to listSpokes. */ public PagedCallSettings listSpokesSettings() { @@ -321,6 +656,28 @@ public UnaryCallSettings updateSpokeSettings() { return updateSpokeOperationSettings; } + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings rejectHubSpokeSettings() { + return rejectHubSpokeSettings; + } + + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings + rejectHubSpokeOperationSettings() { + return rejectHubSpokeOperationSettings; + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings acceptHubSpokeSettings() { + return acceptHubSpokeSettings; + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings + acceptHubSpokeOperationSettings() { + return acceptHubSpokeOperationSettings; + } + /** Returns the object with the settings used for calls to deleteSpoke. */ public UnaryCallSettings deleteSpokeSettings() { return deleteSpokeSettings; @@ -332,6 +689,67 @@ public UnaryCallSettings deleteSpokeSettings() { return deleteSpokeOperationSettings; } + /** Returns the object with the settings used for calls to getRouteTable. */ + public UnaryCallSettings getRouteTableSettings() { + return getRouteTableSettings; + } + + /** Returns the object with the settings used for calls to getRoute. */ + public UnaryCallSettings getRouteSettings() { + return getRouteSettings; + } + + /** Returns the object with the settings used for calls to listRoutes. */ + public PagedCallSettings + listRoutesSettings() { + return listRoutesSettings; + } + + /** Returns the object with the settings used for calls to listRouteTables. */ + public PagedCallSettings< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return listRouteTablesSettings; + } + + /** Returns the object with the settings used for calls to getGroup. */ + public UnaryCallSettings getGroupSettings() { + return getGroupSettings; + } + + /** Returns the object with the settings used for calls to listGroups. */ + public PagedCallSettings + listGroupsSettings() { + return listGroupsSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + public HubServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -415,14 +833,30 @@ protected HubServiceStubSettings(Builder settingsBuilder) throws IOException { updateHubOperationSettings = settingsBuilder.updateHubOperationSettings().build(); deleteHubSettings = settingsBuilder.deleteHubSettings().build(); deleteHubOperationSettings = settingsBuilder.deleteHubOperationSettings().build(); + listHubSpokesSettings = settingsBuilder.listHubSpokesSettings().build(); listSpokesSettings = settingsBuilder.listSpokesSettings().build(); getSpokeSettings = settingsBuilder.getSpokeSettings().build(); createSpokeSettings = settingsBuilder.createSpokeSettings().build(); createSpokeOperationSettings = settingsBuilder.createSpokeOperationSettings().build(); updateSpokeSettings = settingsBuilder.updateSpokeSettings().build(); updateSpokeOperationSettings = settingsBuilder.updateSpokeOperationSettings().build(); + rejectHubSpokeSettings = settingsBuilder.rejectHubSpokeSettings().build(); + rejectHubSpokeOperationSettings = settingsBuilder.rejectHubSpokeOperationSettings().build(); + acceptHubSpokeSettings = settingsBuilder.acceptHubSpokeSettings().build(); + acceptHubSpokeOperationSettings = settingsBuilder.acceptHubSpokeOperationSettings().build(); deleteSpokeSettings = settingsBuilder.deleteSpokeSettings().build(); deleteSpokeOperationSettings = settingsBuilder.deleteSpokeOperationSettings().build(); + getRouteTableSettings = settingsBuilder.getRouteTableSettings().build(); + getRouteSettings = settingsBuilder.getRouteSettings().build(); + listRoutesSettings = settingsBuilder.listRoutesSettings().build(); + listRouteTablesSettings = settingsBuilder.listRouteTablesSettings().build(); + getGroupSettings = settingsBuilder.getGroupSettings().build(); + listGroupsSettings = settingsBuilder.listGroupsSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } /** Builder for HubServiceStubSettings. */ @@ -441,6 +875,9 @@ public static class Builder extends StubSettings.Builder deleteHubSettings; private final OperationCallSettings.Builder deleteHubOperationSettings; + private final PagedCallSettings.Builder< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings; private final PagedCallSettings.Builder< ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse> listSpokesSettings; @@ -451,9 +888,39 @@ public static class Builder extends StubSettings.Builder updateSpokeSettings; private final OperationCallSettings.Builder updateSpokeOperationSettings; + private final UnaryCallSettings.Builder + rejectHubSpokeSettings; + private final OperationCallSettings.Builder< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings; + private final UnaryCallSettings.Builder + acceptHubSpokeSettings; + private final OperationCallSettings.Builder< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings; private final UnaryCallSettings.Builder deleteSpokeSettings; private final OperationCallSettings.Builder deleteSpokeOperationSettings; + private final UnaryCallSettings.Builder getRouteTableSettings; + private final UnaryCallSettings.Builder getRouteSettings; + private final PagedCallSettings.Builder< + ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse> + listRoutesSettings; + private final PagedCallSettings.Builder< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings; + private final UnaryCallSettings.Builder getGroupSettings; + private final PagedCallSettings.Builder< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse> + listGroupsSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -510,14 +977,30 @@ protected Builder(ClientContext clientContext) { updateHubOperationSettings = OperationCallSettings.newBuilder(); deleteHubSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteHubOperationSettings = OperationCallSettings.newBuilder(); + listHubSpokesSettings = PagedCallSettings.newBuilder(LIST_HUB_SPOKES_PAGE_STR_FACT); listSpokesSettings = PagedCallSettings.newBuilder(LIST_SPOKES_PAGE_STR_FACT); getSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createSpokeOperationSettings = OperationCallSettings.newBuilder(); updateSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateSpokeOperationSettings = OperationCallSettings.newBuilder(); + rejectHubSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rejectHubSpokeOperationSettings = OperationCallSettings.newBuilder(); + acceptHubSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + acceptHubSpokeOperationSettings = OperationCallSettings.newBuilder(); deleteSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteSpokeOperationSettings = OperationCallSettings.newBuilder(); + getRouteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRoutesSettings = PagedCallSettings.newBuilder(LIST_ROUTES_PAGE_STR_FACT); + listRouteTablesSettings = PagedCallSettings.newBuilder(LIST_ROUTE_TABLES_PAGE_STR_FACT); + getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listGroupsSettings = PagedCallSettings.newBuilder(LIST_GROUPS_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -526,11 +1009,25 @@ protected Builder(ClientContext clientContext) { createHubSettings, updateHubSettings, deleteHubSettings, + listHubSpokesSettings, listSpokesSettings, getSpokeSettings, createSpokeSettings, updateSpokeSettings, - deleteSpokeSettings); + rejectHubSpokeSettings, + acceptHubSpokeSettings, + deleteSpokeSettings, + getRouteTableSettings, + getRouteSettings, + listRoutesSettings, + listRouteTablesSettings, + getGroupSettings, + listGroupsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); initDefaults(this); } @@ -545,14 +1042,30 @@ protected Builder(HubServiceStubSettings settings) { updateHubOperationSettings = settings.updateHubOperationSettings.toBuilder(); deleteHubSettings = settings.deleteHubSettings.toBuilder(); deleteHubOperationSettings = settings.deleteHubOperationSettings.toBuilder(); + listHubSpokesSettings = settings.listHubSpokesSettings.toBuilder(); listSpokesSettings = settings.listSpokesSettings.toBuilder(); getSpokeSettings = settings.getSpokeSettings.toBuilder(); createSpokeSettings = settings.createSpokeSettings.toBuilder(); createSpokeOperationSettings = settings.createSpokeOperationSettings.toBuilder(); updateSpokeSettings = settings.updateSpokeSettings.toBuilder(); updateSpokeOperationSettings = settings.updateSpokeOperationSettings.toBuilder(); + rejectHubSpokeSettings = settings.rejectHubSpokeSettings.toBuilder(); + rejectHubSpokeOperationSettings = settings.rejectHubSpokeOperationSettings.toBuilder(); + acceptHubSpokeSettings = settings.acceptHubSpokeSettings.toBuilder(); + acceptHubSpokeOperationSettings = settings.acceptHubSpokeOperationSettings.toBuilder(); deleteSpokeSettings = settings.deleteSpokeSettings.toBuilder(); deleteSpokeOperationSettings = settings.deleteSpokeOperationSettings.toBuilder(); + getRouteTableSettings = settings.getRouteTableSettings.toBuilder(); + getRouteSettings = settings.getRouteSettings.toBuilder(); + listRoutesSettings = settings.listRoutesSettings.toBuilder(); + listRouteTablesSettings = settings.listRouteTablesSettings.toBuilder(); + getGroupSettings = settings.getGroupSettings.toBuilder(); + listGroupsSettings = settings.listGroupsSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -561,11 +1074,25 @@ protected Builder(HubServiceStubSettings settings) { createHubSettings, updateHubSettings, deleteHubSettings, + listHubSpokesSettings, listSpokesSettings, getSpokeSettings, createSpokeSettings, updateSpokeSettings, - deleteSpokeSettings); + rejectHubSpokeSettings, + acceptHubSpokeSettings, + deleteSpokeSettings, + getRouteTableSettings, + getRouteSettings, + listRoutesSettings, + listRouteTablesSettings, + getGroupSettings, + listGroupsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); } private static Builder createDefault() { @@ -607,6 +1134,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .listHubSpokesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listSpokesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -627,11 +1159,76 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .rejectHubSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .acceptHubSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .deleteSpokeSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .getRouteTableSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRoutesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRouteTablesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createHubOperationSettings() .setInitialCallSettings( @@ -745,6 +1342,54 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .rejectHubSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RejectHubSpokeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .acceptHubSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AcceptHubSpokeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .deleteSpokeOperationSettings() .setInitialCallSettings( @@ -836,6 +1481,13 @@ public UnaryCallSettings.Builder deleteHubSettings( return deleteHubOperationSettings; } + /** Returns the builder for the settings used for calls to listHubSpokes. */ + public PagedCallSettings.Builder< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings() { + return listHubSpokesSettings; + } + /** Returns the builder for the settings used for calls to listSpokes. */ public PagedCallSettings.Builder listSpokesSettings() { @@ -873,6 +1525,34 @@ public UnaryCallSettings.Builder updateSpokeSetti return updateSpokeOperationSettings; } + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings.Builder rejectHubSpokeSettings() { + return rejectHubSpokeSettings; + } + + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings() { + return rejectHubSpokeOperationSettings; + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings.Builder acceptHubSpokeSettings() { + return acceptHubSpokeSettings; + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings() { + return acceptHubSpokeOperationSettings; + } + /** Returns the builder for the settings used for calls to deleteSpoke. */ public UnaryCallSettings.Builder deleteSpokeSettings() { return deleteSpokeSettings; @@ -886,6 +1566,68 @@ public UnaryCallSettings.Builder deleteSpokeSetti return deleteSpokeOperationSettings; } + /** Returns the builder for the settings used for calls to getRouteTable. */ + public UnaryCallSettings.Builder getRouteTableSettings() { + return getRouteTableSettings; + } + + /** Returns the builder for the settings used for calls to getRoute. */ + public UnaryCallSettings.Builder getRouteSettings() { + return getRouteSettings; + } + + /** Returns the builder for the settings used for calls to listRoutes. */ + public PagedCallSettings.Builder + listRoutesSettings() { + return listRoutesSettings; + } + + /** Returns the builder for the settings used for calls to listRouteTables. */ + public PagedCallSettings.Builder< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return listRouteTablesSettings; + } + + /** Returns the builder for the settings used for calls to getGroup. */ + public UnaryCallSettings.Builder getGroupSettings() { + return getGroupSettings; + } + + /** Returns the builder for the settings used for calls to listGroups. */ + public PagedCallSettings.Builder + listGroupsSettings() { + return listGroupsSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + @Override public HubServiceStubSettings build() throws IOException { return new HubServiceStubSettings(this); diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStub.java index 3eff27389c5f..44c7e0685cc3 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStub.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStub.java @@ -16,11 +16,16 @@ package com.google.cloud.networkconnectivity.v1.stub; +import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest; import com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest; import com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest; @@ -28,6 +33,11 @@ import com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse; import com.google.cloud.networkconnectivity.v1.OperationMetadata; import com.google.cloud.networkconnectivity.v1.PolicyBasedRoute; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -81,6 +91,32 @@ public UnaryCallable deletePolicyBased throw new UnsupportedOperationException("Not implemented: deletePolicyBasedRouteCallable()"); } + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + @Override public abstract void close(); } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStubSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStubSettings.java index 3b046450aa5f..7676597a3040 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStubSettings.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1/stub/PolicyBasedRoutingServiceStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.networkconnectivity.v1.stub; +import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; import com.google.api.core.ApiFunction; @@ -44,6 +45,10 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest; import com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest; import com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest; @@ -55,6 +60,11 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -124,6 +134,14 @@ public class PolicyBasedRoutingServiceStubSettings deletePolicyBasedRouteSettings; private final OperationCallSettings deletePolicyBasedRouteOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; private static final PagedListDescriptor< ListPolicyBasedRoutesRequest, ListPolicyBasedRoutesResponse, PolicyBasedRoute> @@ -166,6 +184,42 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + private static final PagedListResponseFactory< ListPolicyBasedRoutesRequest, ListPolicyBasedRoutesResponse, @@ -190,6 +244,23 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listPolicyBasedRoutes. */ public PagedCallSettings< ListPolicyBasedRoutesRequest, @@ -229,6 +300,33 @@ public ApiFuture getFuturePagedResponse( return deletePolicyBasedRouteOperationSettings; } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + public PolicyBasedRoutingServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -312,6 +410,11 @@ protected PolicyBasedRoutingServiceStubSettings(Builder settingsBuilder) throws deletePolicyBasedRouteSettings = settingsBuilder.deletePolicyBasedRouteSettings().build(); deletePolicyBasedRouteOperationSettings = settingsBuilder.deletePolicyBasedRouteOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } /** Builder for PolicyBasedRoutingServiceStubSettings. */ @@ -335,6 +438,14 @@ public static class Builder private final OperationCallSettings.Builder< DeletePolicyBasedRouteRequest, Empty, OperationMetadata> deletePolicyBasedRouteOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -390,13 +501,23 @@ protected Builder(ClientContext clientContext) { createPolicyBasedRouteOperationSettings = OperationCallSettings.newBuilder(); deletePolicyBasedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deletePolicyBasedRouteOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( listPolicyBasedRoutesSettings, getPolicyBasedRouteSettings, createPolicyBasedRouteSettings, - deletePolicyBasedRouteSettings); + deletePolicyBasedRouteSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); initDefaults(this); } @@ -411,13 +532,23 @@ protected Builder(PolicyBasedRoutingServiceStubSettings settings) { deletePolicyBasedRouteSettings = settings.deletePolicyBasedRouteSettings.toBuilder(); deletePolicyBasedRouteOperationSettings = settings.deletePolicyBasedRouteOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( listPolicyBasedRoutesSettings, getPolicyBasedRouteSettings, createPolicyBasedRouteSettings, - deletePolicyBasedRouteSettings); + deletePolicyBasedRouteSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); } private static Builder createDefault() { @@ -454,6 +585,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .createPolicyBasedRouteOperationSettings() .setInitialCallSettings( @@ -564,6 +720,34 @@ public Builder applyToAllUnaryMethods( return deletePolicyBasedRouteOperationSettings; } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + @Override public PolicyBasedRoutingServiceStubSettings build() throws IOException { return new PolicyBasedRoutingServiceStubSettings(this); diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1/reflect-config.json b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1/reflect-config.json index 978bcb5fa34b..23369d225b71 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1/reflect-config.json +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1/reflect-config.json @@ -377,6 +377,114 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkconnectivity.v1.CreateHubRequest", "queryAllDeclaredConstructors": true, @@ -387,7 +495,547 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.CreateHubRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.CreateHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.CreateSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.CreateSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.DeleteHubRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.DeleteHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetHubRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetRouteTableRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetRouteTableRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.GetSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.Group", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.Group$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.Hub", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.Hub$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListGroupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListGroupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListGroupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListGroupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest$SpokeView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListHubsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRoutesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRoutesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRoutesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListRoutesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1.ListSpokesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -396,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest", + "name": "com.google.cloud.networkconnectivity.v1.ListSpokesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -405,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.ListSpokesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -414,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.CreateSpokeRequest", + "name": "com.google.cloud.networkconnectivity.v1.ListSpokesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -423,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.CreateSpokeRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.LocationFeature", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -432,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.DeleteHubRequest", + "name": "com.google.cloud.networkconnectivity.v1.LocationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -441,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.DeleteHubRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.LocationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -450,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest", + "name": "com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -459,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -468,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest", + "name": "com.google.cloud.networkconnectivity.v1.OperationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -477,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.OperationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -486,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.GetHubRequest", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -495,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.GetHubRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -504,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Filter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -513,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Filter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -522,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.GetSpokeRequest", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Filter$ProtocolVersion", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -531,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.GetSpokeRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$InterconnectAttachment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -540,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.Hub", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$InterconnectAttachment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -549,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.Hub$Builder", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$OtherRoutes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -558,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$VirtualMachine", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -567,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments$Builder", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$VirtualMachine$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -576,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Warnings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -585,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances$Builder", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Warnings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -594,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels", + "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Warnings$Code", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -603,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels$Builder", + "name": "com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -612,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListHubsRequest", + "name": "com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -621,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListHubsRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -630,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListHubsResponse", + "name": "com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -639,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListHubsResponse$Builder", + "name": "com.google.cloud.networkconnectivity.v1.Route", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -648,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest", + "name": "com.google.cloud.networkconnectivity.v1.Route$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -657,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.RouteTable", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse", + "name": "com.google.cloud.networkconnectivity.v1.RouteTable$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse$Builder", + "name": "com.google.cloud.networkconnectivity.v1.RouteType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListSpokesRequest", + "name": "com.google.cloud.networkconnectivity.v1.RouterApplianceInstance", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListSpokesRequest$Builder", + "name": "com.google.cloud.networkconnectivity.v1.RouterApplianceInstance$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListSpokesResponse", + "name": "com.google.cloud.networkconnectivity.v1.RoutingVPC", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.ListSpokesResponse$Builder", + "name": "com.google.cloud.networkconnectivity.v1.RoutingVPC$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LocationFeature", + "name": "com.google.cloud.networkconnectivity.v1.Spoke", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LocationMetadata", + "name": "com.google.cloud.networkconnectivity.v1.Spoke$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.LocationMetadata$Builder", + "name": "com.google.cloud.networkconnectivity.v1.Spoke$StateReason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.OperationMetadata", + "name": "com.google.cloud.networkconnectivity.v1.Spoke$StateReason$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.OperationMetadata$Builder", + "name": "com.google.cloud.networkconnectivity.v1.Spoke$StateReason$Code", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Builder", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Filter", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$SpokeStateCount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Filter$Builder", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$SpokeStateCount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Filter$ProtocolVersion", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$SpokeStateReasonCount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$InterconnectAttachment", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$SpokeStateReasonCount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$InterconnectAttachment$Builder", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$SpokeTypeCount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$OtherRoutes", + "name": "com.google.cloud.networkconnectivity.v1.SpokeSummary$SpokeTypeCount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$VirtualMachine", + "name": "com.google.cloud.networkconnectivity.v1.SpokeType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$VirtualMachine$Builder", + "name": "com.google.cloud.networkconnectivity.v1.State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Warnings", + "name": "com.google.cloud.networkconnectivity.v1.UpdateHubRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Warnings$Builder", + "name": "com.google.cloud.networkconnectivity.v1.UpdateHubRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.PolicyBasedRoute$Warnings$Code", + "name": "com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.RouterApplianceInstance", + "name": "com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.RouterApplianceInstance$Builder", + "name": "com.google.iam.v1.AuditConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.RoutingVPC", + "name": "com.google.iam.v1.AuditConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.RoutingVPC$Builder", + "name": "com.google.iam.v1.AuditConfigDelta", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.Spoke", + "name": "com.google.iam.v1.AuditConfigDelta$Action", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.Spoke$Builder", + "name": "com.google.iam.v1.AuditConfigDelta$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.State", + "name": "com.google.iam.v1.AuditLogConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.UpdateHubRequest", + "name": "com.google.iam.v1.AuditLogConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.UpdateHubRequest$Builder", + "name": "com.google.iam.v1.AuditLogConfig$LogType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest", + "name": "com.google.iam.v1.Binding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +1620,160 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest$Builder", + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1825,5 +2626,23 @@ "allPublicMethods": true, "allDeclaredClasses": true, "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true } ] \ No newline at end of file diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/HubServiceClientTest.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/HubServiceClientTest.java index 14cf393685d0..b6582cabe8a5 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/HubServiceClientTest.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/HubServiceClientTest.java @@ -16,7 +16,12 @@ package com.google.cloud.networkconnectivity.v1; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubSpokesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListRoutesPagedResponse; import static com.google.cloud.networkconnectivity.v1.HubServiceClient.ListSpokesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -27,10 +32,23 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; @@ -53,6 +71,8 @@ @Generated("by gapic-generator-java") public class HubServiceClientTest { private static MockHubService mockHubService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private HubServiceClient client; @@ -60,9 +80,12 @@ public class HubServiceClientTest { @BeforeClass public static void startStaticServer() { mockHubService = new MockHubService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockHubService)); + UUID.randomUUID().toString(), + Arrays.asList(mockHubService, mockLocations, mockIAMPolicy)); mockServiceHelper.start(); } @@ -188,6 +211,8 @@ public void getHubTest() throws Exception { .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) .build(); mockHubService.addResponse(expectedResponse); @@ -233,6 +258,8 @@ public void getHubTest2() throws Exception { .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) .build(); mockHubService.addResponse(expectedResponse); @@ -278,6 +305,8 @@ public void createHubTest() throws Exception { .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -337,6 +366,8 @@ public void createHubTest2() throws Exception { .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -396,6 +427,8 @@ public void updateHubTest() throws Exception { .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -524,6 +557,94 @@ public void deleteHubExceptionTest2() throws Exception { } } + @Test + public void listHubSpokesTest() throws Exception { + Spoke responsesElement = Spoke.newBuilder().build(); + ListHubSpokesResponse expectedResponse = + ListHubSpokesResponse.newBuilder() + .setNextPageToken("") + .addAllSpokes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + + ListHubSpokesPagedResponse pagedListResponse = client.listHubSpokes(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpokesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHubSpokesRequest actualRequest = ((ListHubSpokesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHubSpokesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + client.listHubSpokes(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHubSpokesTest2() throws Exception { + Spoke responsesElement = Spoke.newBuilder().build(); + ListHubSpokesResponse expectedResponse = + ListHubSpokesResponse.newBuilder() + .setNextPageToken("") + .addAllSpokes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + ListHubSpokesPagedResponse pagedListResponse = client.listHubSpokes(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpokesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHubSpokesRequest actualRequest = ((ListHubSpokesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHubSpokesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.listHubSpokes(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listSpokesTest() throws Exception { Spoke responsesElement = Spoke.newBuilder().build(); @@ -622,11 +743,15 @@ public void getSpokeTest() throws Exception { .putAllLabels(new HashMap()) .setDescription("description-1724546052") .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) .build(); mockHubService.addResponse(expectedResponse); @@ -670,11 +795,15 @@ public void getSpokeTest2() throws Exception { .putAllLabels(new HashMap()) .setDescription("description-1724546052") .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) .build(); mockHubService.addResponse(expectedResponse); @@ -718,11 +847,15 @@ public void createSpokeTest() throws Exception { .putAllLabels(new HashMap()) .setDescription("description-1724546052") .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) .build(); Operation resultOperation = Operation.newBuilder() @@ -780,11 +913,15 @@ public void createSpokeTest2() throws Exception { .putAllLabels(new HashMap()) .setDescription("description-1724546052") .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) .build(); Operation resultOperation = Operation.newBuilder() @@ -842,11 +979,15 @@ public void updateSpokeTest() throws Exception { .putAllLabels(new HashMap()) .setDescription("description-1724546052") .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) .setUniqueId("uniqueId-294460212") .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) .build(); Operation resultOperation = Operation.newBuilder() @@ -892,25 +1033,29 @@ public void updateSpokeExceptionTest() throws Exception { } @Test - public void deleteSpokeTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void rejectHubSpokeTest() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); Operation resultOperation = Operation.newBuilder() - .setName("deleteSpokeTest") + .setName("rejectHubSpokeTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockHubService.addResponse(resultOperation); - SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); - client.deleteSpokeAsync(name).get(); + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockHubService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSpokeRequest actualRequest = ((DeleteSpokeRequest) actualRequests.get(0)); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -918,13 +1063,14 @@ public void deleteSpokeTest() throws Exception { } @Test - public void deleteSpokeExceptionTest() throws Exception { + public void rejectHubSpokeExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockHubService.addException(exception); try { - SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); - client.deleteSpokeAsync(name).get(); + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.rejectHubSpokeAsync(name, spokeUri).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -934,25 +1080,76 @@ public void deleteSpokeExceptionTest() throws Exception { } @Test - public void deleteSpokeTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void rejectHubSpokeTest2() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); Operation resultOperation = Operation.newBuilder() - .setName("deleteSpokeTest") + .setName("rejectHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectHubSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void rejectHubSpokeTest3() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectHubSpokeTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockHubService.addResponse(resultOperation); String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); - client.deleteSpokeAsync(name).get(); + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockHubService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSpokeRequest actualRequest = ((DeleteSpokeRequest) actualRequests.get(0)); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -960,13 +1157,155 @@ public void deleteSpokeTest2() throws Exception { } @Test - public void deleteSpokeExceptionTest2() throws Exception { + public void rejectHubSpokeExceptionTest3() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockHubService.addException(exception); try { String name = "name3373707"; - client.deleteSpokeAsync(name).get(); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void rejectHubSpokeTest4() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectHubSpokeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void acceptHubSpokeTest() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void acceptHubSpokeTest2() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + client.acceptHubSpokeAsync(name, spokeUri).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -974,4 +1313,969 @@ public void deleteSpokeExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void acceptHubSpokeTest3() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void acceptHubSpokeTest4() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSpokeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + client.deleteSpokeAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSpokeRequest actualRequest = ((DeleteSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.deleteSpokeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSpokeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSpokeAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSpokeRequest actualRequest = ((DeleteSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.deleteSpokeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getRouteTableTest() throws Exception { + RouteTable expectedResponse = + RouteTable.newBuilder() + .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .build(); + mockHubService.addResponse(expectedResponse); + + RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + + RouteTable actualResponse = client.getRouteTable(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteTableRequest actualRequest = ((GetRouteTableRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteTableExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + client.getRouteTable(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouteTableTest2() throws Exception { + RouteTable expectedResponse = + RouteTable.newBuilder() + .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + RouteTable actualResponse = client.getRouteTable(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteTableRequest actualRequest = ((GetRouteTableRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteTableExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getRouteTable(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouteTest() throws Exception { + Route expectedResponse = + Route.newBuilder() + .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setIpCidrRange("ipCidrRange-866375486") + .setType(RouteType.forNumber(0)) + .setNextHopVpcNetwork(NextHopVpcNetwork.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setSpoke(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setLocation("location1901043637") + .build(); + mockHubService.addResponse(expectedResponse); + + HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"); + + Route actualResponse = client.getRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteRequest actualRequest = ((GetRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"); + client.getRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouteTest2() throws Exception { + Route expectedResponse = + Route.newBuilder() + .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setIpCidrRange("ipCidrRange-866375486") + .setType(RouteType.forNumber(0)) + .setNextHopVpcNetwork(NextHopVpcNetwork.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setSpoke(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setLocation("location1901043637") + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + Route actualResponse = client.getRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteRequest actualRequest = ((GetRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRoutesTest() throws Exception { + Route responsesElement = Route.newBuilder().build(); + ListRoutesResponse expectedResponse = + ListRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllRoutes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + + ListRoutesPagedResponse pagedListResponse = client.listRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRoutesRequest actualRequest = ((ListRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRoutesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + client.listRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRoutesTest2() throws Exception { + Route responsesElement = Route.newBuilder().build(); + ListRoutesResponse expectedResponse = + ListRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllRoutes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRoutesPagedResponse pagedListResponse = client.listRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRoutesRequest actualRequest = ((ListRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRoutesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRouteTablesTest() throws Exception { + RouteTable responsesElement = RouteTable.newBuilder().build(); + ListRouteTablesResponse expectedResponse = + ListRouteTablesResponse.newBuilder() + .setNextPageToken("") + .addAllRouteTables(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + + ListRouteTablesPagedResponse pagedListResponse = client.listRouteTables(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRouteTablesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRouteTablesRequest actualRequest = ((ListRouteTablesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRouteTablesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + client.listRouteTables(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRouteTablesTest2() throws Exception { + RouteTable responsesElement = RouteTable.newBuilder().build(); + ListRouteTablesResponse expectedResponse = + ListRouteTablesResponse.newBuilder() + .setNextPageToken("") + .addAllRouteTables(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRouteTablesPagedResponse pagedListResponse = client.listRouteTables(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRouteTablesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRouteTablesRequest actualRequest = ((ListRouteTablesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRouteTablesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRouteTables(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .build(); + mockHubService.addResponse(expectedResponse); + + GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]"); + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGroupRequest actualRequest = ((GetGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]"); + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGroupRequest actualRequest = ((GetGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGroupsTest() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGroupsRequest actualRequest = ((ListGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGroupsTest2() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGroupsRequest actualRequest = ((ListGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockHubServiceImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockHubServiceImpl.java index c49c1fff3e86..382b39fc0389 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockHubServiceImpl.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockHubServiceImpl.java @@ -159,6 +159,27 @@ public void deleteHub(DeleteHubRequest request, StreamObserver respon } } + @Override + public void listHubSpokes( + ListHubSpokesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListHubSpokesResponse) { + requests.add(request); + responseObserver.onNext(((ListHubSpokesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListHubSpokes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListHubSpokesResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void listSpokes( ListSpokesRequest request, StreamObserver responseObserver) { @@ -240,6 +261,48 @@ public void updateSpoke(UpdateSpokeRequest request, StreamObserver re } } + @Override + public void rejectHubSpoke( + RejectHubSpokeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RejectHubSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void acceptHubSpoke( + AcceptHubSpokeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AcceptHubSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void deleteSpoke(DeleteSpokeRequest request, StreamObserver responseObserver) { Object response = responses.poll(); @@ -259,4 +322,128 @@ public void deleteSpoke(DeleteSpokeRequest request, StreamObserver re Exception.class.getName()))); } } + + @Override + public void getRouteTable( + GetRouteTableRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RouteTable) { + requests.add(request); + responseObserver.onNext(((RouteTable) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRouteTable, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RouteTable.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRoute(GetRouteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Route) { + requests.add(request); + responseObserver.onNext(((Route) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRoute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Route.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRoutes( + ListRoutesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRoutesResponse) { + requests.add(request); + responseObserver.onNext(((ListRoutesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRoutes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRoutesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRouteTables( + ListRouteTablesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRouteTablesResponse) { + requests.add(request); + responseObserver.onNext(((ListRouteTablesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRouteTables, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRouteTablesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getGroup(GetGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Group) { + requests.add(request); + responseObserver.onNext(((Group) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Group.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listGroups( + ListGroupsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListGroupsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicy.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicy.java new file mode 100644 index 000000000000..e9aa598c25e1 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicyImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..a76d6766273b --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * Copyright 2023 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; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocations.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocations.java new file mode 100644 index 000000000000..a1ecd63bb18a --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocationsImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..8fc5346068aa --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClientTest.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClientTest.java index 15b261a810d0..951028cc158d 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClientTest.java +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1/PolicyBasedRoutingServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.networkconnectivity.v1; +import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; import static com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -26,11 +27,25 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; @@ -50,6 +65,8 @@ @Generated("by gapic-generator-java") public class PolicyBasedRoutingServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; private static MockPolicyBasedRoutingService mockPolicyBasedRoutingService; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; @@ -58,10 +75,13 @@ public class PolicyBasedRoutingServiceClientTest { @BeforeClass public static void startStaticServer() { mockPolicyBasedRoutingService = new MockPolicyBasedRoutingService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); mockServiceHelper = new MockServiceHelper( UUID.randomUUID().toString(), - Arrays.asList(mockPolicyBasedRoutingService)); + Arrays.asList( + mockPolicyBasedRoutingService, mockLocations, mockIAMPolicy)); mockServiceHelper.start(); } @@ -486,4 +506,253 @@ public void deletePolicyBasedRouteExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceGrpc.java b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceGrpc.java index 1709c5fbc073..f2eb63daf886 100644 --- a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceGrpc.java +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubServiceGrpc.java @@ -264,6 +264,52 @@ private HubServiceGrpc() {} return getDeleteHubMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse> + getListHubSpokesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListHubSpokes", + requestType = com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse> + getListHubSpokesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse> + getListHubSpokesMethod; + if ((getListHubSpokesMethod = HubServiceGrpc.getListHubSpokesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListHubSpokesMethod = HubServiceGrpc.getListHubSpokesMethod) == null) { + HubServiceGrpc.getListHubSpokesMethod = + getListHubSpokesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHubSpokes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListHubSpokes")) + .build(); + } + } + } + return getListHubSpokesMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.networkconnectivity.v1.ListSpokesRequest, com.google.cloud.networkconnectivity.v1.ListSpokesResponse> @@ -445,6 +491,96 @@ private HubServiceGrpc() {} return getUpdateSpokeMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest, + com.google.longrunning.Operation> + getRejectHubSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RejectHubSpoke", + requestType = com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest, + com.google.longrunning.Operation> + getRejectHubSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest, + com.google.longrunning.Operation> + getRejectHubSpokeMethod; + if ((getRejectHubSpokeMethod = HubServiceGrpc.getRejectHubSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getRejectHubSpokeMethod = HubServiceGrpc.getRejectHubSpokeMethod) == null) { + HubServiceGrpc.getRejectHubSpokeMethod = + getRejectHubSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RejectHubSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("RejectHubSpoke")) + .build(); + } + } + } + return getRejectHubSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest, + com.google.longrunning.Operation> + getAcceptHubSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AcceptHubSpoke", + requestType = com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest, + com.google.longrunning.Operation> + getAcceptHubSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest, + com.google.longrunning.Operation> + getAcceptHubSpokeMethod; + if ((getAcceptHubSpokeMethod = HubServiceGrpc.getAcceptHubSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getAcceptHubSpokeMethod = HubServiceGrpc.getAcceptHubSpokeMethod) == null) { + HubServiceGrpc.getAcceptHubSpokeMethod = + getAcceptHubSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcceptHubSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("AcceptHubSpoke")) + .build(); + } + } + } + return getAcceptHubSpokeMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest, com.google.longrunning.Operation> @@ -490,6 +626,281 @@ private HubServiceGrpc() {} return getDeleteSpokeMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1.RouteTable> + getGetRouteTableMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRouteTable", + requestType = com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.RouteTable.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1.RouteTable> + getGetRouteTableMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1.RouteTable> + getGetRouteTableMethod; + if ((getGetRouteTableMethod = HubServiceGrpc.getGetRouteTableMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetRouteTableMethod = HubServiceGrpc.getGetRouteTableMethod) == null) { + HubServiceGrpc.getGetRouteTableMethod = + getGetRouteTableMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRouteTable")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.RouteTable + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetRouteTable")) + .build(); + } + } + } + return getGetRouteTableMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetRouteRequest, + com.google.cloud.networkconnectivity.v1.Route> + getGetRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRoute", + requestType = com.google.cloud.networkconnectivity.v1.GetRouteRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.Route.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetRouteRequest, + com.google.cloud.networkconnectivity.v1.Route> + getGetRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetRouteRequest, + com.google.cloud.networkconnectivity.v1.Route> + getGetRouteMethod; + if ((getGetRouteMethod = HubServiceGrpc.getGetRouteMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetRouteMethod = HubServiceGrpc.getGetRouteMethod) == null) { + HubServiceGrpc.getGetRouteMethod = + getGetRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.GetRouteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.Route.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetRoute")) + .build(); + } + } + } + return getGetRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1.ListRoutesResponse> + getListRoutesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRoutes", + requestType = com.google.cloud.networkconnectivity.v1.ListRoutesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.ListRoutesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1.ListRoutesResponse> + getListRoutesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1.ListRoutesResponse> + getListRoutesMethod; + if ((getListRoutesMethod = HubServiceGrpc.getListRoutesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListRoutesMethod = HubServiceGrpc.getListRoutesMethod) == null) { + HubServiceGrpc.getListRoutesMethod = + getListRoutesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRoutes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListRoutesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListRoutes")) + .build(); + } + } + } + return getListRoutesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse> + getListRouteTablesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRouteTables", + requestType = com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse> + getListRouteTablesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse> + getListRouteTablesMethod; + if ((getListRouteTablesMethod = HubServiceGrpc.getListRouteTablesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListRouteTablesMethod = HubServiceGrpc.getListRouteTablesMethod) == null) { + HubServiceGrpc.getListRouteTablesMethod = + getListRouteTablesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRouteTables")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("ListRouteTables")) + .build(); + } + } + } + return getListRouteTablesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetGroupRequest, + com.google.cloud.networkconnectivity.v1.Group> + getGetGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGroup", + requestType = com.google.cloud.networkconnectivity.v1.GetGroupRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.Group.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetGroupRequest, + com.google.cloud.networkconnectivity.v1.Group> + getGetGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.GetGroupRequest, + com.google.cloud.networkconnectivity.v1.Group> + getGetGroupMethod; + if ((getGetGroupMethod = HubServiceGrpc.getGetGroupMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetGroupMethod = HubServiceGrpc.getGetGroupMethod) == null) { + HubServiceGrpc.getGetGroupMethod = + getGetGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.GetGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.Group.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetGroup")) + .build(); + } + } + } + return getGetGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1.ListGroupsResponse> + getListGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGroups", + requestType = com.google.cloud.networkconnectivity.v1.ListGroupsRequest.class, + responseType = com.google.cloud.networkconnectivity.v1.ListGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1.ListGroupsResponse> + getListGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1.ListGroupsResponse> + getListGroupsMethod; + if ((getListGroupsMethod = HubServiceGrpc.getListGroupsMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListGroupsMethod = HubServiceGrpc.getListGroupsMethod) == null) { + HubServiceGrpc.getListGroupsMethod = + getListGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1.ListGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListGroups")) + .build(); + } + } + } + return getListGroupsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static HubServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -608,6 +1019,23 @@ default void deleteHub( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteHubMethod(), responseObserver); } + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + default void listHubSpokes( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListHubSpokesMethod(), responseObserver); + } + /** * * @@ -665,6 +1093,38 @@ default void updateSpoke( getUpdateSpokeMethod(), responseObserver); } + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + default void rejectHubSpoke( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRejectHubSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + default void acceptHubSpoke( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcceptHubSpokeMethod(), responseObserver); + } + /** * * @@ -678,6 +1138,92 @@ default void deleteSpoke( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteSpokeMethod(), responseObserver); } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + default void getRouteTable( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRouteTableMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + default void getRoute( + com.google.cloud.networkconnectivity.v1.GetRouteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists routes in a given project.
+     * 
+ */ + default void listRoutes( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListRoutesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists route tables in a given project.
+     * 
+ */ + default void listRouteTables( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRouteTablesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + default void getGroup( + com.google.cloud.networkconnectivity.v1.GetGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + default void listGroups( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListGroupsMethod(), responseObserver); + } } /** @@ -785,52 +1331,203 @@ public void deleteHub( com.google.cloud.networkconnectivity.v1.DeleteHubRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteHubMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getDeleteHubMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public void listHubSpokes( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListHubSpokesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes in a specified project and
+     * location.
+     * 
+ */ + public void listSpokes( + com.google.cloud.networkconnectivity.v1.ListSpokesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSpokesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center spoke.
+     * 
+ */ + public void getSpoke( + com.google.cloud.networkconnectivity.v1.GetSpokeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSpokeMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a Network Connectivity Center spoke.
+     * 
+ */ + public void createSpoke( + com.google.cloud.networkconnectivity.v1.CreateSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center spoke.
+     * 
+ */ + public void updateSpoke( + com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public void rejectHubSpoke( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRejectHubSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public void acceptHubSpoke( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcceptHubSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center spoke.
+     * 
+ */ + public void deleteSpoke( + com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public void getRouteTable( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRouteTableMethod(), getCallOptions()), + request, + responseObserver); } /** * * *
-     * Lists the Network Connectivity Center spokes in a specified project and
-     * location.
+     * Gets details about the specified route.
      * 
*/ - public void listSpokes( - com.google.cloud.networkconnectivity.v1.ListSpokesRequest request, - io.grpc.stub.StreamObserver + public void getRoute( + com.google.cloud.networkconnectivity.v1.GetRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSpokesMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetRouteMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Gets details about a Network Connectivity Center spoke.
+     * Lists routes in a given project.
      * 
*/ - public void getSpoke( - com.google.cloud.networkconnectivity.v1.GetSpokeRequest request, - io.grpc.stub.StreamObserver + public void listRoutes( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSpokeMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getListRoutesMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Creates a Network Connectivity Center spoke.
+     * Lists route tables in a given project.
      * 
*/ - public void createSpoke( - com.google.cloud.networkconnectivity.v1.CreateSpokeRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listRouteTables( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateSpokeMethod(), getCallOptions()), + getChannel().newCall(getListRouteTablesMethod(), getCallOptions()), request, responseObserver); } @@ -839,32 +1536,30 @@ public void createSpoke( * * *
-     * Updates the parameters of a Network Connectivity Center spoke.
+     * Gets details about a Network Connectivity Center group.
      * 
*/ - public void updateSpoke( - com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getGroup( + com.google.cloud.networkconnectivity.v1.GetGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSpokeMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetGroupMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Deletes a Network Connectivity Center spoke.
+     * Lists groups in a given hub.
      * 
*/ - public void deleteSpoke( - com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listGroups( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSpokeMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request, responseObserver); } } @@ -955,6 +1650,21 @@ public com.google.longrunning.Operation deleteHub( getChannel(), getDeleteHubMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse listHubSpokes( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListHubSpokesMethod(), getCallOptions(), request); + } + /** * * @@ -1008,6 +1718,36 @@ public com.google.longrunning.Operation updateSpoke( getChannel(), getUpdateSpokeMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public com.google.longrunning.Operation rejectHubSpoke( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRejectHubSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public com.google.longrunning.Operation acceptHubSpoke( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcceptHubSpokeMethod(), getCallOptions(), request); + } + /** * * @@ -1020,6 +1760,84 @@ public com.google.longrunning.Operation deleteSpoke( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteSpokeMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.RouteTable getRouteTable( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRouteTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.Route getRoute( + com.google.cloud.networkconnectivity.v1.GetRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists routes in a given project.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.ListRoutesResponse listRoutes( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists route tables in a given project.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse listRouteTables( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRouteTablesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.Group getGroup( + com.google.cloud.networkconnectivity.v1.GetGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1.ListGroupsResponse listGroups( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGroupsMethod(), getCallOptions(), request); + } } /** @@ -1110,6 +1928,22 @@ protected HubServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption getChannel().newCall(getDeleteHubMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse> + listHubSpokes(com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListHubSpokesMethod(), getCallOptions()), request); + } + /** * * @@ -1165,6 +1999,36 @@ protected HubServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption getChannel().newCall(getUpdateSpokeMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rejectHubSpoke(com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRejectHubSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + acceptHubSpoke(com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcceptHubSpokeMethod(), getCallOptions()), request); + } + /** * * @@ -1177,6 +2041,90 @@ protected HubServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteSpokeMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.RouteTable> + getRouteTable(com.google.cloud.networkconnectivity.v1.GetRouteTableRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRouteTableMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.Route> + getRoute(com.google.cloud.networkconnectivity.v1.GetRouteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists routes in a given project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.ListRoutesResponse> + listRoutes(com.google.cloud.networkconnectivity.v1.ListRoutesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRoutesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists route tables in a given project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse> + listRouteTables(com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRouteTablesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.Group> + getGroup(com.google.cloud.networkconnectivity.v1.GetGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1.ListGroupsResponse> + listGroups(com.google.cloud.networkconnectivity.v1.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_HUBS = 0; @@ -1184,11 +2132,20 @@ protected HubServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption private static final int METHODID_CREATE_HUB = 2; private static final int METHODID_UPDATE_HUB = 3; private static final int METHODID_DELETE_HUB = 4; - private static final int METHODID_LIST_SPOKES = 5; - private static final int METHODID_GET_SPOKE = 6; - private static final int METHODID_CREATE_SPOKE = 7; - private static final int METHODID_UPDATE_SPOKE = 8; - private static final int METHODID_DELETE_SPOKE = 9; + private static final int METHODID_LIST_HUB_SPOKES = 5; + private static final int METHODID_LIST_SPOKES = 6; + private static final int METHODID_GET_SPOKE = 7; + private static final int METHODID_CREATE_SPOKE = 8; + private static final int METHODID_UPDATE_SPOKE = 9; + private static final int METHODID_REJECT_HUB_SPOKE = 10; + private static final int METHODID_ACCEPT_HUB_SPOKE = 11; + private static final int METHODID_DELETE_SPOKE = 12; + private static final int METHODID_GET_ROUTE_TABLE = 13; + private static final int METHODID_GET_ROUTE = 14; + private static final int METHODID_LIST_ROUTES = 15; + private static final int METHODID_LIST_ROUTE_TABLES = 16; + private static final int METHODID_GET_GROUP = 17; + private static final int METHODID_LIST_GROUPS = 18; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1235,6 +2192,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.networkconnectivity.v1.DeleteHubRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_HUB_SPOKES: + serviceImpl.listHubSpokes( + (com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse>) + responseObserver); + break; case METHODID_LIST_SPOKES: serviceImpl.listSpokes( (com.google.cloud.networkconnectivity.v1.ListSpokesRequest) request, @@ -1258,11 +2222,60 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_REJECT_HUB_SPOKE: + serviceImpl.rejectHubSpoke( + (com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ACCEPT_HUB_SPOKE: + serviceImpl.acceptHubSpoke( + (com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_DELETE_SPOKE: serviceImpl.deleteSpoke( (com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_ROUTE_TABLE: + serviceImpl.getRouteTable( + (com.google.cloud.networkconnectivity.v1.GetRouteTableRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ROUTE: + serviceImpl.getRoute( + (com.google.cloud.networkconnectivity.v1.GetRouteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ROUTES: + serviceImpl.listRoutes( + (com.google.cloud.networkconnectivity.v1.ListRoutesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1.ListRoutesResponse>) + responseObserver); + break; + case METHODID_LIST_ROUTE_TABLES: + serviceImpl.listRouteTables( + (com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse>) + responseObserver); + break; + case METHODID_GET_GROUP: + serviceImpl.getGroup( + (com.google.cloud.networkconnectivity.v1.GetGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_GROUPS: + serviceImpl.listGroups( + (com.google.cloud.networkconnectivity.v1.ListGroupsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1.ListGroupsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1312,6 +2325,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.networkconnectivity.v1.DeleteHubRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_HUB))) + .addMethod( + getListHubSpokesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse>( + service, METHODID_LIST_HUB_SPOKES))) .addMethod( getListSpokesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1337,12 +2357,64 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.networkconnectivity.v1.UpdateSpokeRequest, com.google.longrunning.Operation>(service, METHODID_UPDATE_SPOKE))) + .addMethod( + getRejectHubSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_REJECT_HUB_SPOKE))) + .addMethod( + getAcceptHubSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_ACCEPT_HUB_SPOKE))) .addMethod( getDeleteSpokeMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.networkconnectivity.v1.DeleteSpokeRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_SPOKE))) + .addMethod( + getGetRouteTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1.RouteTable>( + service, METHODID_GET_ROUTE_TABLE))) + .addMethod( + getGetRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.GetRouteRequest, + com.google.cloud.networkconnectivity.v1.Route>(service, METHODID_GET_ROUTE))) + .addMethod( + getListRoutesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1.ListRoutesResponse>( + service, METHODID_LIST_ROUTES))) + .addMethod( + getListRouteTablesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse>( + service, METHODID_LIST_ROUTE_TABLES))) + .addMethod( + getGetGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.GetGroupRequest, + com.google.cloud.networkconnectivity.v1.Group>(service, METHODID_GET_GROUP))) + .addMethod( + getListGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1.ListGroupsResponse>( + service, METHODID_LIST_GROUPS))) .build(); } @@ -1399,11 +2471,20 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateHubMethod()) .addMethod(getUpdateHubMethod()) .addMethod(getDeleteHubMethod()) + .addMethod(getListHubSpokesMethod()) .addMethod(getListSpokesMethod()) .addMethod(getGetSpokeMethod()) .addMethod(getCreateSpokeMethod()) .addMethod(getUpdateSpokeMethod()) + .addMethod(getRejectHubSpokeMethod()) + .addMethod(getAcceptHubSpokeMethod()) .addMethod(getDeleteSpokeMethod()) + .addMethod(getGetRouteTableMethod()) + .addMethod(getGetRouteMethod()) + .addMethod(getListRoutesMethod()) + .addMethod(getListRouteTablesMethod()) + .addMethod(getGetGroupMethod()) + .addMethod(getListGroupsMethod()) .build(); } } diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequest.java new file mode 100644 index 000000000000..fd295fc60c4e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequest.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The request for
+ * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest} + */ +public final class AcceptHubSpokeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) + AcceptHubSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcceptHubSpokeRequest.newBuilder() to construct. + private AcceptHubSpokeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcceptHubSpokeRequest() { + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcceptHubSpokeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPOKE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeUri_ = ""; + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + @java.lang.Override + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spokeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spokeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest other = + (com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeUri().equals(other.getSpokeUri())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SPOKE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSpokeUri().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest build() { + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest result = + new com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeUri_ = spokeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeUri().isEmpty()) { + spokeUri_ = other.spokeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + spokeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the hub into which to accept the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hub into which to accept the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hub into which to accept the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hub into which to accept the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hub into which to accept the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object spokeUri_ = ""; + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeUri() { + spokeUri_ = getDefaultInstance().getSpokeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptHubSpokeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..a5b29b05a61c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface AcceptHubSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + java.lang.String getSpokeUri(); + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + com.google.protobuf.ByteString getSpokeUriBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponse.java new file mode 100644 index 000000000000..33e264704eaf --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponse.java @@ -0,0 +1,714 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The response for
+ * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse} + */ +public final class AcceptHubSpokeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) + AcceptHubSpokeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcceptHubSpokeResponse.newBuilder() to construct. + private AcceptHubSpokeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcceptHubSpokeResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcceptHubSpokeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.Builder.class); + } + + public static final int SPOKE_FIELD_NUMBER = 1; + private com.google.cloud.networkconnectivity.v1.Spoke spoke_; + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return spoke_ != null; + } + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (spoke_ != null) { + output.writeMessage(1, getSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (spoke_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpoke()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse other = + (com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) obj; + + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response for
+   * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse build() { + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse buildPartial() { + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse result = + new com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse.getDefaultInstance()) + return this; + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkconnectivity.v1.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder> + spokeBuilder_; + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000001); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSpokeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder> + getSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) + private static final com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse(); + } + + public static com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptHubSpokeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponseOrBuilder.java new file mode 100644 index 000000000000..5cb02866a729 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/AcceptHubSpokeResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface AcceptHubSpokeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1.Spoke getSpoke(); + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequest.java index ab2e054d99b6..f2146672230d 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequest.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequest.java @@ -232,11 +232,11 @@ public com.google.cloud.networkconnectivity.v1.HubOrBuilder getHubOrBuilder() { * * *
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -268,11 +268,11 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -1153,11 +1153,11 @@ public com.google.cloud.networkconnectivity.v1.HubOrBuilder getHubOrBuilder() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1188,11 +1188,11 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1223,11 +1223,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1257,11 +1257,11 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1287,11 +1287,11 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequestOrBuilder.java
index 938af7cf867c..c2f6831570ae 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequestOrBuilder.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateHubRequestOrBuilder.java
@@ -122,11 +122,11 @@ public interface CreateHubRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -147,11 +147,11 @@ public interface CreateHubRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequest.java
index 699ce7390ed5..43dcca098494 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequest.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequest.java
@@ -235,11 +235,11 @@ public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder(
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -271,11 +271,11 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -1155,11 +1155,11 @@ public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder(
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1190,11 +1190,11 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1225,11 +1225,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1259,11 +1259,11 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1289,11 +1289,11 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequestOrBuilder.java
index 235a22ac8c12..854b97c92af6 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequestOrBuilder.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/CreateSpokeRequestOrBuilder.java
@@ -122,11 +122,11 @@ public interface CreateSpokeRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -147,11 +147,11 @@ public interface CreateSpokeRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequest.java
index 9b01198b9a96..17dca2f7f1f5 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequest.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequest.java
@@ -127,11 +127,11 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -163,11 +163,11 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -685,11 +685,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -720,11 +720,11 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -755,11 +755,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -789,11 +789,11 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -819,11 +819,11 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequestOrBuilder.java
index 59e8b5c430a8..a1ba45023236 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequestOrBuilder.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteHubRequestOrBuilder.java
@@ -56,11 +56,11 @@ public interface DeleteHubRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -81,11 +81,11 @@ public interface DeleteHubRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequest.java
index 7f9f7cdbf8e3..d442eebaeb6c 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequest.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequest.java
@@ -127,11 +127,11 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -163,11 +163,11 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -685,11 +685,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -720,11 +720,11 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -755,11 +755,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -789,11 +789,11 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -819,11 +819,11 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequestOrBuilder.java
index 797c6a9340c6..9588fe796fc0 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequestOrBuilder.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/DeleteSpokeRequestOrBuilder.java
@@ -56,11 +56,11 @@ public interface DeleteSpokeRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -81,11 +81,11 @@ public interface DeleteSpokeRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequest.java
new file mode 100644
index 000000000000..44c7608c30a9
--- /dev/null
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequest.java
@@ -0,0 +1,641 @@
+/*
+ * Copyright 2023 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.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/networkconnectivity/v1/hub.proto
+
+package com.google.cloud.networkconnectivity.v1;
+
+/**
+ *
+ *
+ * 
+ * The request for
+ * [HubService.GetGroup][google.cloud.networkconnectivity.v1.HubService.GetGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.GetGroupRequest} + */ +public final class GetGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.GetGroupRequest) + GetGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGroupRequest.newBuilder() to construct. + private GetGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.GetGroupRequest.class, + com.google.cloud.networkconnectivity.v1.GetGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.GetGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.GetGroupRequest other = + (com.google.cloud.networkconnectivity.v1.GetGroupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.GetGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [HubService.GetGroup][google.cloud.networkconnectivity.v1.HubService.GetGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.GetGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.GetGroupRequest) + com.google.cloud.networkconnectivity.v1.GetGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.GetGroupRequest.class, + com.google.cloud.networkconnectivity.v1.GetGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.GetGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetGroupRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.GetGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetGroupRequest build() { + com.google.cloud.networkconnectivity.v1.GetGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetGroupRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.GetGroupRequest result = + new com.google.cloud.networkconnectivity.v1.GetGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.GetGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.GetGroupRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.GetGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.GetGroupRequest other) { + if (other == com.google.cloud.networkconnectivity.v1.GetGroupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.GetGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.GetGroupRequest) + private static final com.google.cloud.networkconnectivity.v1.GetGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.GetGroupRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.GetGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequestOrBuilder.java new file mode 100644 index 000000000000..4814795d70c1 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetGroupRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface GetGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.GetGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequest.java new file mode 100644 index 000000000000..d278e081604d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequest.java @@ -0,0 +1,641 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The request for
+ * [HubService.GetRoute][google.cloud.networkconnectivity.v1.HubService.GetRoute].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.GetRouteRequest} + */ +public final class GetRouteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.GetRouteRequest) + GetRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRouteRequest.newBuilder() to construct. + private GetRouteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRouteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRouteRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.GetRouteRequest.class, + com.google.cloud.networkconnectivity.v1.GetRouteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the route resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the route resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.GetRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.GetRouteRequest other = + (com.google.cloud.networkconnectivity.v1.GetRouteRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.GetRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [HubService.GetRoute][google.cloud.networkconnectivity.v1.HubService.GetRoute].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.GetRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.GetRouteRequest) + com.google.cloud.networkconnectivity.v1.GetRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.GetRouteRequest.class, + com.google.cloud.networkconnectivity.v1.GetRouteRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.GetRouteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.GetRouteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteRequest build() { + com.google.cloud.networkconnectivity.v1.GetRouteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.GetRouteRequest result = + new com.google.cloud.networkconnectivity.v1.GetRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.GetRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.GetRouteRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.GetRouteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.GetRouteRequest other) { + if (other == com.google.cloud.networkconnectivity.v1.GetRouteRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the route resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the route resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the route resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the route resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the route resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.GetRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.GetRouteRequest) + private static final com.google.cloud.networkconnectivity.v1.GetRouteRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.GetRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRouteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequestOrBuilder.java new file mode 100644 index 000000000000..5ba2a7a3b8e0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface GetRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.GetRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the route resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the route resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequest.java new file mode 100644 index 000000000000..de8d99b7d703 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The request for
+ * [HubService.GetRouteTable][google.cloud.networkconnectivity.v1.HubService.GetRouteTable].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.GetRouteTableRequest} + */ +public final class GetRouteTableRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.GetRouteTableRequest) + GetRouteTableRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRouteTableRequest.newBuilder() to construct. + private GetRouteTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRouteTableRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRouteTableRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.class, + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.GetRouteTableRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest other = + (com.google.cloud.networkconnectivity.v1.GetRouteTableRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [HubService.GetRouteTable][google.cloud.networkconnectivity.v1.HubService.GetRouteTable].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.GetRouteTableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.GetRouteTableRequest) + com.google.cloud.networkconnectivity.v1.GetRouteTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.class, + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteTableRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteTableRequest build() { + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteTableRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest result = + new com.google.cloud.networkconnectivity.v1.GetRouteTableRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.GetRouteTableRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.GetRouteTableRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.GetRouteTableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.GetRouteTableRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1.GetRouteTableRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the route table resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.GetRouteTableRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.GetRouteTableRequest) + private static final com.google.cloud.networkconnectivity.v1.GetRouteTableRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.GetRouteTableRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.GetRouteTableRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRouteTableRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GetRouteTableRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequestOrBuilder.java new file mode 100644 index 000000000000..60aff860e2a0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GetRouteTableRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface GetRouteTableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.GetRouteTableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the route table resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Group.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Group.java new file mode 100644 index 000000000000..51a463b1ae7d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Group.java @@ -0,0 +1,2100 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * A group represents a subset of spokes attached to a hub.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.Group} + */ +public final class Group extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.Group) + GroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use Group.newBuilder() to construct. + private Group(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Group() { + name_ = ""; + description_ = ""; + uid_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Group(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Group_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Group.class, + com.google.cloud.networkconnectivity.v1.Group.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Group_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.Group)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.Group other = + (com.google.cloud.networkconnectivity.v1.Group) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Group parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1.Group prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A group represents a subset of spokes attached to a hub.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.Group} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.Group) + com.google.cloud.networkconnectivity.v1.GroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Group_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Group.class, + com.google.cloud.networkconnectivity.v1.Group.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.Group.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uid_ = ""; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Group_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Group getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.Group.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Group build() { + com.google.cloud.networkconnectivity.v1.Group result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Group buildPartial() { + com.google.cloud.networkconnectivity.v1.Group result = + new com.google.cloud.networkconnectivity.v1.Group(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.Group result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.Group) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.Group) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.Group other) { + if (other == com.google.cloud.networkconnectivity.v1.Group.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.Group) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.Group) + private static final com.google.cloud.networkconnectivity.v1.Group DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.Group(); + } + + public static com.google.cloud.networkconnectivity.v1.Group getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Group parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Group getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupName.java new file mode 100644 index 000000000000..28e9b68c677e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2023 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class GroupName implements ResourceName { + private static final PathTemplate PROJECT_HUB_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/hubs/{hub}/groups/{group}"); + private volatile Map fieldValuesMap; + private final String project; + private final String hub; + private final String group; + + @Deprecated + protected GroupName() { + project = null; + hub = null; + group = null; + } + + private GroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + group = Preconditions.checkNotNull(builder.getGroup()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getGroup() { + return group; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static GroupName of(String project, String hub, String group) { + return newBuilder().setProject(project).setHub(hub).setGroup(group).build(); + } + + public static String format(String project, String hub, String group) { + return newBuilder().setProject(project).setHub(hub).setGroup(group).build().toString(); + } + + public static GroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB_GROUP.validatedMatch( + formattedString, "GroupName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("hub"), matchMap.get("group")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (GroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB_GROUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (hub != null) { + fieldMapBuilder.put("hub", hub); + } + if (group != null) { + fieldMapBuilder.put("group", group); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB_GROUP.instantiate("project", project, "hub", hub, "group", group); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + GroupName that = ((GroupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.hub, that.hub) + && Objects.equals(this.group, that.group); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + h *= 1000003; + h ^= Objects.hashCode(group); + return h; + } + + /** Builder for projects/{project}/locations/global/hubs/{hub}/groups/{group}. */ + public static class Builder { + private String project; + private String hub; + private String group; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getGroup() { + return group; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + public Builder setGroup(String group) { + this.group = group; + return this; + } + + private Builder(GroupName groupName) { + this.project = groupName.project; + this.hub = groupName.hub; + this.group = groupName.group; + } + + public GroupName build() { + return new GroupName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupOrBuilder.java new file mode 100644 index 000000000000..46d6e53d1e4b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/GroupOrBuilder.java @@ -0,0 +1,283 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface GroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.Group) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1.State getState(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Hub.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Hub.java index e9558241ebf6..73b3d3d6a261 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Hub.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Hub.java @@ -22,11 +22,12 @@ * * *
- * A Network Connectivity Center hub is a collection of spokes. A single hub
- * can contain spokes from multiple regions. However, if any of a hub's spokes
- * use the data transfer feature, the resources associated with those spokes
- * must all reside in the same VPC network. Spokes that do not use data
- * transfer can be associated with any VPC network in your project.
+ * A Network Connectivity Center hub is a global management resource to which
+ * you attach spokes. A single hub can contain spokes from multiple regions.
+ * However, if any of a hub's spokes use the site-to-site data transfer feature,
+ * the resources associated with those spokes must all be in the same VPC
+ * network. Spokes that do not use site-to-site data transfer can be associated
+ * with any VPC network in your project.
  * 
* * Protobuf type {@code google.cloud.networkconnectivity.v1.Hub} @@ -47,6 +48,7 @@ private Hub() { uniqueId_ = ""; state_ = 0; routingVpcs_ = java.util.Collections.emptyList(); + routeTables_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -264,8 +266,8 @@ public int getLabelsCount() { * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -288,8 +290,8 @@ public java.util.Map getLabels() { * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -303,8 +305,8 @@ public java.util.Map getLabelsMap() { * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -325,8 +327,8 @@ public java.util.Map getLabelsMap() { * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -576,6 +578,158 @@ public com.google.cloud.networkconnectivity.v1.RoutingVPCOrBuilder getRoutingVpc return routingVpcs_.get(index); } + public static final int ROUTE_TABLES_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList routeTables_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the routeTables. + */ + public com.google.protobuf.ProtocolStringList getRouteTablesList() { + return routeTables_; + } + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of routeTables. + */ + public int getRouteTablesCount() { + return routeTables_.size(); + } + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The routeTables at the given index. + */ + public java.lang.String getRouteTables(int index) { + return routeTables_.get(index); + } + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the routeTables at the given index. + */ + public com.google.protobuf.ByteString getRouteTablesBytes(int index) { + return routeTables_.getByteString(index); + } + + public static final int SPOKE_SUMMARY_FIELD_NUMBER = 12; + private com.google.cloud.networkconnectivity.v1.SpokeSummary spokeSummary_; + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the spokeSummary field is set. + */ + @java.lang.Override + public boolean hasSpokeSummary() { + return spokeSummary_ != null; + } + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeSummary. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary getSpokeSummary() { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder getSpokeSummaryOrBuilder() { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -613,6 +767,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < routingVpcs_.size(); i++) { output.writeMessage(10, routingVpcs_.get(i)); } + for (int i = 0; i < routeTables_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, routeTables_.getRaw(i)); + } + if (spokeSummary_ != null) { + output.writeMessage(12, getSpokeSummary()); + } getUnknownFields().writeTo(output); } @@ -653,6 +813,17 @@ public int getSerializedSize() { for (int i = 0; i < routingVpcs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, routingVpcs_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < routeTables_.size(); i++) { + dataSize += computeStringSizeNoTag(routeTables_.getRaw(i)); + } + size += dataSize; + size += 1 * getRouteTablesList().size(); + } + if (spokeSummary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getSpokeSummary()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -683,6 +854,11 @@ public boolean equals(final java.lang.Object obj) { if (!getUniqueId().equals(other.getUniqueId())) return false; if (state_ != other.state_) return false; if (!getRoutingVpcsList().equals(other.getRoutingVpcsList())) return false; + if (!getRouteTablesList().equals(other.getRouteTablesList())) return false; + if (hasSpokeSummary() != other.hasSpokeSummary()) return false; + if (hasSpokeSummary()) { + if (!getSpokeSummary().equals(other.getSpokeSummary())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -718,6 +894,14 @@ public int hashCode() { hash = (37 * hash) + ROUTING_VPCS_FIELD_NUMBER; hash = (53 * hash) + getRoutingVpcsList().hashCode(); } + if (getRouteTablesCount() > 0) { + hash = (37 * hash) + ROUTE_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getRouteTablesList().hashCode(); + } + if (hasSpokeSummary()) { + hash = (37 * hash) + SPOKE_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSpokeSummary().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -822,11 +1006,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A Network Connectivity Center hub is a collection of spokes. A single hub
-   * can contain spokes from multiple regions. However, if any of a hub's spokes
-   * use the data transfer feature, the resources associated with those spokes
-   * must all reside in the same VPC network. Spokes that do not use data
-   * transfer can be associated with any VPC network in your project.
+   * A Network Connectivity Center hub is a global management resource to which
+   * you attach spokes. A single hub can contain spokes from multiple regions.
+   * However, if any of a hub's spokes use the site-to-site data transfer feature,
+   * the resources associated with those spokes must all be in the same VPC
+   * network. Spokes that do not use site-to-site data transfer can be associated
+   * with any VPC network in your project.
    * 
* * Protobuf type {@code google.cloud.networkconnectivity.v1.Hub} @@ -903,6 +1088,12 @@ public Builder clear() { routingVpcsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); + routeTables_ = com.google.protobuf.LazyStringArrayList.emptyList(); + spokeSummary_ = null; + if (spokeSummaryBuilder_ != null) { + spokeSummaryBuilder_.dispose(); + spokeSummaryBuilder_ = null; + } return this; } @@ -974,6 +1165,14 @@ private void buildPartial0(com.google.cloud.networkconnectivity.v1.Hub result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.state_ = state_; } + if (((from_bitField0_ & 0x00000100) != 0)) { + routeTables_.makeImmutable(); + result.routeTables_ = routeTables_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.spokeSummary_ = + spokeSummaryBuilder_ == null ? spokeSummary_ : spokeSummaryBuilder_.build(); + } } @java.lang.Override @@ -1074,6 +1273,19 @@ public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.Hub other) { } } } + if (!other.routeTables_.isEmpty()) { + if (routeTables_.isEmpty()) { + routeTables_ = other.routeTables_; + bitField0_ |= 0x00000100; + } else { + ensureRouteTablesIsMutable(); + routeTables_.addAll(other.routeTables_); + } + onChanged(); + } + if (other.hasSpokeSummary()) { + mergeSpokeSummary(other.getSpokeSummary()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1162,6 +1374,19 @@ public Builder mergeFrom( } break; } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRouteTablesIsMutable(); + routeTables_.add(s); + break; + } // case 90 + case 98: + { + input.readMessage(getSpokeSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1728,8 +1953,8 @@ public int getLabelsCount() { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -1752,8 +1977,8 @@ public java.util.Map getLabels() { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -1767,8 +1992,8 @@ public java.util.Map getLabelsMap() { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -1789,8 +2014,8 @@ public java.util.Map getLabelsMap() { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -1817,8 +2042,8 @@ public Builder clearLabels() { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -1841,8 +2066,8 @@ public java.util.Map getMutableLabels() { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -1863,8 +2088,8 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
      * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
      * 
* @@ -2610,6 +2835,465 @@ public com.google.cloud.networkconnectivity.v1.RoutingVPC.Builder addRoutingVpcs return routingVpcsBuilder_; } + private com.google.protobuf.LazyStringArrayList routeTables_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRouteTablesIsMutable() { + if (!routeTables_.isModifiable()) { + routeTables_ = new com.google.protobuf.LazyStringArrayList(routeTables_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the routeTables. + */ + public com.google.protobuf.ProtocolStringList getRouteTablesList() { + routeTables_.makeImmutable(); + return routeTables_; + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of routeTables. + */ + public int getRouteTablesCount() { + return routeTables_.size(); + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The routeTables at the given index. + */ + public java.lang.String getRouteTables(int index) { + return routeTables_.get(index); + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the routeTables at the given index. + */ + public com.google.protobuf.ByteString getRouteTablesBytes(int index) { + return routeTables_.getByteString(index); + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The routeTables to set. + * @return This builder for chaining. + */ + public Builder setRouteTables(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The routeTables to add. + * @return This builder for chaining. + */ + public Builder addRouteTables(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The routeTables to add. + * @return This builder for chaining. + */ + public Builder addAllRouteTables(java.lang.Iterable values) { + ensureRouteTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routeTables_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRouteTables() { + routeTables_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the routeTables to add. + * @return This builder for chaining. + */ + public Builder addRouteTablesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRouteTablesIsMutable(); + routeTables_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1.SpokeSummary spokeSummary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary, + com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder> + spokeSummaryBuilder_; + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the spokeSummary field is set. + */ + public boolean hasSpokeSummary() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeSummary. + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary getSpokeSummary() { + if (spokeSummaryBuilder_ == null) { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } else { + return spokeSummaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeSummary(com.google.cloud.networkconnectivity.v1.SpokeSummary value) { + if (spokeSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spokeSummary_ = value; + } else { + spokeSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeSummary( + com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder builderForValue) { + if (spokeSummaryBuilder_ == null) { + spokeSummary_ = builderForValue.build(); + } else { + spokeSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSpokeSummary(com.google.cloud.networkconnectivity.v1.SpokeSummary value) { + if (spokeSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && spokeSummary_ != null + && spokeSummary_ + != com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance()) { + getSpokeSummaryBuilder().mergeFrom(value); + } else { + spokeSummary_ = value; + } + } else { + spokeSummaryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeSummary() { + bitField0_ = (bitField0_ & ~0x00000200); + spokeSummary_ = null; + if (spokeSummaryBuilder_ != null) { + spokeSummaryBuilder_.dispose(); + spokeSummaryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder getSpokeSummaryBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getSpokeSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder + getSpokeSummaryOrBuilder() { + if (spokeSummaryBuilder_ != null) { + return spokeSummaryBuilder_.getMessageOrBuilder(); + } else { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } + } + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary, + com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder> + getSpokeSummaryFieldBuilder() { + if (spokeSummaryBuilder_ == null) { + spokeSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary, + com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder>( + getSpokeSummary(), getParentForChildren(), isClean()); + spokeSummary_ = null; + } + return spokeSummaryBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubOrBuilder.java index 2ecb5667b4cf..05831b3840d7 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubOrBuilder.java @@ -132,8 +132,8 @@ public interface HubOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -144,8 +144,8 @@ public interface HubOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -159,8 +159,8 @@ public interface HubOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -171,8 +171,8 @@ public interface HubOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -187,8 +187,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -345,4 +345,128 @@ java.lang.String getLabelsOrDefault( * repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; */ com.google.cloud.networkconnectivity.v1.RoutingVPCOrBuilder getRoutingVpcsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the routeTables. + */ + java.util.List getRouteTablesList(); + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of routeTables. + */ + int getRouteTablesCount(); + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The routeTables at the given index. + */ + java.lang.String getRouteTables(int index); + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   *    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the routeTables at the given index. + */ + com.google.protobuf.ByteString getRouteTablesBytes(int index); + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the spokeSummary field is set. + */ + boolean hasSpokeSummary(); + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeSummary. + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary getSpokeSummary(); + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder getSpokeSummaryOrBuilder(); } diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubProto.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubProto.java index 4bfffb438ff3..106c128327ee 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubProto.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/HubProto.java @@ -43,10 +43,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_networkconnectivity_v1_Spoke_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkconnectivity_v1_Spoke_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_networkconnectivity_v1_Spoke_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkconnectivity_v1_Spoke_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_RouteTable_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_RouteTable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_RouteTable_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_RouteTable_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_Route_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_Route_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_Route_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_Route_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_Group_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_Group_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_Group_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_Group_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_networkconnectivity_v1_ListHubsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -71,6 +99,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_networkconnectivity_v1_DeleteHubRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkconnectivity_v1_DeleteHubRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_networkconnectivity_v1_ListSpokesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -95,6 +131,54 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_networkconnectivity_v1_DeleteSpokeRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkconnectivity_v1_DeleteSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_AcceptHubSpokeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_GetRouteTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_GetRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_networkconnectivity_v1_LinkedVpnTunnels_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -107,6 +191,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_networkconnectivity_v1_LinkedRouterApplianceInstances_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkconnectivity_v1_LinkedRouterApplianceInstances_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_networkconnectivity_v1_RouterApplianceInstance_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -115,6 +203,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_networkconnectivity_v1_LocationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkconnectivity_v1_LocationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1_GetGroupRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -129,176 +241,369 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "y.v1\032\034google/api/annotations.proto\032\027goog" + "le/api/client.proto\032\037google/api/field_be" + "havior.proto\032\031google/api/resource.proto\032" - + "#google/longrunning/operations.proto\032 go" - + "ogle/protobuf/field_mask.proto\032\037google/p" - + "rotobuf/timestamp.proto\"\217\004\n\003Hub\022\022\n\004name\030" - + "\001 \001(\tB\004\342A\001\005\0225\n\013create_time\030\002 \001(\0132\032.googl" - + "e.protobuf.TimestampB\004\342A\001\003\0225\n\013update_tim" - + "e\030\003 \001(\0132\032.google.protobuf.TimestampB\004\342A\001" - + "\003\022D\n\006labels\030\004 \003(\01324.google.cloud.network" - + "connectivity.v1.Hub.LabelsEntry\022\023\n\013descr" - + "iption\030\005 \001(\t\022\027\n\tunique_id\030\010 \001(\tB\004\342A\001\003\022?\n" - + "\005state\030\t \001(\0162*.google.cloud.networkconne" - + "ctivity.v1.StateB\004\342A\001\003\022E\n\014routing_vpcs\030\n" - + " \003(\0132/.google.cloud.networkconnectivity." - + "v1.RoutingVPC\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001:[\352AX\n&networkconnec" - + "tivity.googleapis.com/Hub\022.projects/{pro" - + "ject}/locations/global/hubs/{hub}\"\200\001\n\nRo" - + "utingVPC\0220\n\003uri\030\001 \001(\tB#\372A \n\036compute.goog" - + "leapis.com/Network\022@\n2required_for_new_s" - + "ite_to_site_data_transfer_spokes\030\002 \001(\010B\004" - + "\342A\001\003\"\304\006\n\005Spoke\022\022\n\004name\030\001 \001(\tB\004\342A\001\005\0225\n\013cr" - + "eate_time\030\002 \001(\0132\032.google.protobuf.Timest" - + "ampB\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032.google." - + "protobuf.TimestampB\004\342A\001\003\022F\n\006labels\030\004 \003(\013" - + "26.google.cloud.networkconnectivity.v1.S" - + "poke.LabelsEntry\022\023\n\013description\030\005 \001(\t\022<\n" - + "\003hub\030\006 \001(\tB/\342A\001\005\372A(\n&networkconnectivity" - + ".googleapis.com/Hub\022Q\n\022linked_vpn_tunnel" - + "s\030\021 \001(\01325.google.cloud.networkconnectivi" - + "ty.v1.LinkedVpnTunnels\022k\n\037linked_interco" - + "nnect_attachments\030\022 \001(\0132B.google.cloud.n" - + "etworkconnectivity.v1.LinkedInterconnect" - + "Attachments\022n\n!linked_router_appliance_i" - + "nstances\030\023 \001(\0132C.google.cloud.networkcon" - + "nectivity.v1.LinkedRouterApplianceInstan" - + "ces\022\027\n\tunique_id\030\013 \001(\tB\004\342A\001\003\022?\n\005state\030\017 " - + "\001(\0162*.google.cloud.networkconnectivity.v" - + "1.StateB\004\342A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001:e\352Ab\n(networkconnec" - + "tivity.googleapis.com/Spoke\0226projects/{p" - + "roject}/locations/{location}/spokes/{spo" - + "ke}\"\226\001\n\017ListHubsRequest\022:\n\006parent\030\001 \001(\tB" - + "*\342A\001\002\372A#\n!locations.googleapis.com/Locat" - + "ion\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" - + "(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"x\n\020" - + "ListHubsResponse\0226\n\004hubs\030\001 \003(\0132(.google." - + "cloud.networkconnectivity.v1.Hub\022\027\n\017next" - + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"N" - + "\n\rGetHubRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&" - + "networkconnectivity.googleapis.com/Hub\"\273" - + "\001\n\020CreateHubRequest\022:\n\006parent\030\001 \001(\tB*\342A\001" - + "\002\372A#\n!locations.googleapis.com/Location\022" - + "\024\n\006hub_id\030\002 \001(\tB\004\342A\001\002\022;\n\003hub\030\003 \001(\0132(.goo" + + "0google/cloud/networkconnectivity/v1/com" + + "mon.proto\032#google/longrunning/operations" + + ".proto\032\033google/protobuf/empty.proto\032 goo" + + "gle/protobuf/field_mask.proto\032\037google/pr" + + "otobuf/timestamp.proto\"\373\004\n\003Hub\022\022\n\004name\030\001" + + " \001(\tB\004\342A\001\005\0225\n\013create_time\030\002 \001(\0132\032.google" + + ".protobuf.TimestampB\004\342A\001\003\0225\n\013update_time" + + "\030\003 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\022D\n\006labels\030\004 \003(\01324.google.cloud.networkc" + + "onnectivity.v1.Hub.LabelsEntry\022\023\n\013descri" + + "ption\030\005 \001(\t\022\027\n\tunique_id\030\010 \001(\tB\004\342A\001\003\022?\n\005" + + "state\030\t \001(\0162*.google.cloud.networkconnec" + + "tivity.v1.StateB\004\342A\001\003\022E\n\014routing_vpcs\030\n " + + "\003(\0132/.google.cloud.networkconnectivity.v" + + "1.RoutingVPC\022\032\n\014route_tables\030\013 \003(\tB\004\342A\001\003" + + "\022N\n\rspoke_summary\030\014 \001(\01321.google.cloud.n" + + "etworkconnectivity.v1.SpokeSummaryB\004\342A\001\003" + + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001:[\352AX\n&networkconnectivity.google" + + "apis.com/Hub\022.projects/{project}/locatio" + + "ns/global/hubs/{hub}\"\200\001\n\nRoutingVPC\0220\n\003u" + + "ri\030\001 \001(\tB#\372A \n\036compute.googleapis.com/Ne" + + "twork\022@\n2required_for_new_site_to_site_d" + + "ata_transfer_spokes\030\002 \001(\010B\004\342A\001\003\"\322\n\n\005Spok" + + "e\022\022\n\004name\030\001 \001(\tB\004\342A\001\005\0225\n\013create_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013" + + "update_time\030\003 \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\022F\n\006labels\030\004 \003(\01326.google.clo" + + "ud.networkconnectivity.v1.Spoke.LabelsEn" + + "try\022\023\n\013description\030\005 \001(\t\022<\n\003hub\030\006 \001(\tB/\342" + + "A\001\005\372A(\n&networkconnectivity.googleapis.c" + + "om/Hub\022@\n\005group\030\027 \001(\tB1\342A\001\001\372A*\n(networkc" + + "onnectivity.googleapis.com/Group\022Q\n\022link" + + "ed_vpn_tunnels\030\021 \001(\01325.google.cloud.netw" + + "orkconnectivity.v1.LinkedVpnTunnels\022k\n\037l" + + "inked_interconnect_attachments\030\022 \001(\0132B.g" + + "oogle.cloud.networkconnectivity.v1.Linke" + + "dInterconnectAttachments\022n\n!linked_route" + + "r_appliance_instances\030\023 \001(\0132C.google.clo" + + "ud.networkconnectivity.v1.LinkedRouterAp" + + "plianceInstances\022W\n\022linked_vpc_network\030\024" + + " \001(\01325.google.cloud.networkconnectivity." + + "v1.LinkedVpcNetworkB\004\342A\001\001\022\027\n\tunique_id\030\013" + + " \001(\tB\004\342A\001\003\022?\n\005state\030\017 \001(\0162*.google.cloud" + + ".networkconnectivity.v1.StateB\004\342A\001\003\022M\n\007r" + + "easons\030\025 \003(\01326.google.cloud.networkconne" + + "ctivity.v1.Spoke.StateReasonB\004\342A\001\003\022H\n\nsp" + + "oke_type\030\026 \001(\0162..google.cloud.networkcon" + + "nectivity.v1.SpokeTypeB\004\342A\001\003\032\327\001\n\013StateRe" + + "ason\022I\n\004code\030\001 \001(\0162;.google.cloud.networ" + + "kconnectivity.v1.Spoke.StateReason.Code\022" + + "\017\n\007message\030\002 \001(\t\022\024\n\014user_details\030\003 \001(\t\"V" + + "\n\004Code\022\024\n\020CODE_UNSPECIFIED\020\000\022\022\n\016PENDING_" + + "REVIEW\020\001\022\014\n\010REJECTED\020\002\022\n\n\006PAUSED\020\003\022\n\n\006FA" + + "ILED\020\004\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001:e\352Ab\n(networkconnectivity." + + "googleapis.com/Spoke\0226projects/{project}" + + "/locations/{location}/spokes/{spoke}\"\361\003\n" + + "\nRouteTable\022\022\n\004name\030\001 \001(\tB\004\342A\001\005\0225\n\013creat" + + "e_time\030\002 \001(\0132\032.google.protobuf.Timestamp" + + "B\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032.google.pro" + + "tobuf.TimestampB\004\342A\001\003\022K\n\006labels\030\004 \003(\0132;." + + "google.cloud.networkconnectivity.v1.Rout" + + "eTable.LabelsEntry\022\023\n\013description\030\005 \001(\t\022" + + "\021\n\003uid\030\006 \001(\tB\004\342A\001\003\022?\n\005state\030\007 \001(\0162*.goog" + + "le.cloud.networkconnectivity.v1.StateB\004\342" + + "A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001:|\352Ay\n-networkconnectivity.goo" + + "gleapis.com/RouteTable\022Hprojects/{projec" + + "t}/locations/global/hubs/{hub}/routeTabl" + + "es/{route_table}\"\207\006\n\005Route\022\022\n\004name\030\003 \001(\t" + + "B\004\342A\001\005\0225\n\013create_time\030\004 \001(\0132\032.google.pro" + + "tobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030\005 \001" + + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\025\n\r" + + "ip_cidr_range\030\001 \001(\t\022B\n\004type\030\n \001(\0162..goog" + + "le.cloud.networkconnectivity.v1.RouteTyp" + + "eB\004\342A\001\003\022Z\n\024next_hop_vpc_network\030\002 \001(\01326." + + "google.cloud.networkconnectivity.v1.Next" + + "HopVpcNetworkB\004\342A\001\005\022F\n\006labels\030\006 \003(\01326.go" + + "ogle.cloud.networkconnectivity.v1.Route." + + "LabelsEntry\022\023\n\013description\030\007 \001(\t\022\021\n\003uid\030" + + "\010 \001(\tB\004\342A\001\003\022?\n\005state\030\t \001(\0162*.google.clou" + + "d.networkconnectivity.v1.StateB\004\342A\001\003\022@\n\005" + + "spoke\030\013 \001(\tB1\342A\001\005\372A*\n(networkconnectivit" + + "y.googleapis.com/Spoke\022\026\n\010location\030\014 \001(\t" + + "B\004\342A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001:\212\001\352A\206\001\n+networkconnectivit" + + "y.googleapis.com/HubRoute\022Wprojects/{pro" + + "ject}/locations/global/hubs/{hub}/routeT" + + "ables/{route_table}/routes/{route}\"\343\003\n\005G" + + "roup\022\022\n\004name\030\001 \001(\tB\004\342A\001\005\0225\n\013create_time\030" + + "\002 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" + + "5\n\013update_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestampB\004\342A\001\003\022L\n\006labels\030\004 \003(\01326.google." + + "cloud.networkconnectivity.v1.Group.Label" + + "sEntryB\004\342A\001\001\022\031\n\013description\030\005 \001(\tB\004\342A\001\001\022" + + "\021\n\003uid\030\006 \001(\tB\004\342A\001\003\022?\n\005state\030\007 \001(\0162*.goog" + + "le.cloud.networkconnectivity.v1.StateB\004\342" + + "A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" + + "\030\002 \001(\t:\0028\001:l\352Ai\n(networkconnectivity.goo" + + "gleapis.com/Group\022=projects/{project}/lo" + + "cations/global/hubs/{hub}/groups/{group}" + + "\"\226\001\n\017ListHubsRequest\022:\n\006parent\030\001 \001(\tB*\342A" + + "\001\002\372A#\n!locations.googleapis.com/Location" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" + + "\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"x\n\020Lis" + + "tHubsResponse\0226\n\004hubs\030\001 \003(\0132(.google.clo" + + "ud.networkconnectivity.v1.Hub\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"N\n\rG" + + "etHubRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&net" + + "workconnectivity.googleapis.com/Hub\"\273\001\n\020" + + "CreateHubRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A" + + "#\n!locations.googleapis.com/Location\022\024\n\006" + + "hub_id\030\002 \001(\tB\004\342A\001\002\022;\n\003hub\030\003 \001(\0132(.google" + + ".cloud.networkconnectivity.v1.HubB\004\342A\001\002\022" + + "\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\240\001\n\020UpdateHubR" + + "equest\0225\n\013update_mask\030\001 \001(\0132\032.google.pro" + + "tobuf.FieldMaskB\004\342A\001\001\022;\n\003hub\030\002 \001(\0132(.goo" + "gle.cloud.networkconnectivity.v1.HubB\004\342A" - + "\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\240\001\n\020UpdateH" - + "ubRequest\0225\n\013update_mask\030\001 \001(\0132\032.google." - + "protobuf.FieldMaskB\004\342A\001\001\022;\n\003hub\030\002 \001(\0132(." - + "google.cloud.networkconnectivity.v1.HubB" - + "\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"k\n\020Delet" - + "eHubRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&netw" - + "orkconnectivity.googleapis.com/Hub\022\030\n\nre" - + "quest_id\030\002 \001(\tB\004\342A\001\001\"\230\001\n\021ListSpokesReque" - + "st\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!locations.g" - + "oogleapis.com/Location\022\021\n\tpage_size\030\002 \001(" + + "\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"k\n\020DeleteHu" + + "bRequest\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&network" + + "connectivity.googleapis.com/Hub\022\030\n\nreque" + + "st_id\030\002 \001(\tB\004\342A\001\001\"\314\002\n\024ListHubSpokesReque" + + "st\022=\n\004name\030\001 \001(\tB/\342A\001\002\372A(\n&networkconnec" + + "tivity.googleapis.com/Hub\022\027\n\017spoke_locat" + + "ions\030\002 \003(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_to" + + "ken\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022\020\n\010order_by\030\006 " + + "\001(\t\022Q\n\004view\030\007 \001(\0162C.google.cloud.network" + + "connectivity.v1.ListHubSpokesRequest.Spo" + + "keView\"@\n\tSpokeView\022\032\n\026SPOKE_VIEW_UNSPEC" + + "IFIED\020\000\022\t\n\005BASIC\020\001\022\014\n\010DETAILED\020\002\"\201\001\n\025Lis" + + "tHubSpokesResponse\022:\n\006spokes\030\001 \003(\0132*.goo" + + "gle.cloud.networkconnectivity.v1.Spoke\022\027" + + "\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003" + + " \003(\t\"\230\001\n\021ListSpokesRequest\022:\n\006parent\030\001 \001" + + "(\tB*\342A\001\002\372A#\n!locations.googleapis.com/Lo" + + "cation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" + + "\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"" + + "~\n\022ListSpokesResponse\022:\n\006spokes\030\001 \003(\0132*." + + "google.cloud.networkconnectivity.v1.Spok" + + "e\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" + + "e\030\003 \003(\t\"R\n\017GetSpokeRequest\022?\n\004name\030\001 \001(\t" + + "B1\342A\001\002\372A*\n(networkconnectivity.googleapi" + + "s.com/Spoke\"\303\001\n\022CreateSpokeRequest\022:\n\006pa" + + "rent\030\001 \001(\tB*\342A\001\002\372A#\n!locations.googleapi" + + "s.com/Location\022\026\n\010spoke_id\030\002 \001(\tB\004\342A\001\002\022?" + + "\n\005spoke\030\003 \001(\0132*.google.cloud.networkconn" + + "ectivity.v1.SpokeB\004\342A\001\002\022\030\n\nrequest_id\030\004 " + + "\001(\tB\004\342A\001\001\"\246\001\n\022UpdateSpokeRequest\0225\n\013upda" + + "te_mask\030\001 \001(\0132\032.google.protobuf.FieldMas" + + "kB\004\342A\001\001\022?\n\005spoke\030\002 \001(\0132*.google.cloud.ne" + + "tworkconnectivity.v1.SpokeB\004\342A\001\002\022\030\n\nrequ" + + "est_id\030\003 \001(\tB\004\342A\001\001\"o\n\022DeleteSpokeRequest" + + "\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(networkconnecti" + + "vity.googleapis.com/Spoke\022\030\n\nrequest_id\030" + + "\002 \001(\tB\004\342A\001\001\"\266\001\n\025AcceptHubSpokeRequest\022=\n" + + "\004name\030\001 \001(\tB/\342A\001\002\372A(\n&networkconnectivit" + + "y.googleapis.com/Hub\022D\n\tspoke_uri\030\002 \001(\tB" + + "1\342A\001\002\372A*\n(networkconnectivity.googleapis" + + ".com/Spoke\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"S\n\026" + + "AcceptHubSpokeResponse\0229\n\005spoke\030\001 \001(\0132*." + + "google.cloud.networkconnectivity.v1.Spok" + + "e\"\315\001\n\025RejectHubSpokeRequest\022=\n\004name\030\001 \001(" + + "\tB/\342A\001\002\372A(\n&networkconnectivity.googleap" + + "is.com/Hub\022D\n\tspoke_uri\030\002 \001(\tB1\342A\001\002\372A*\n(" + + "networkconnectivity.googleapis.com/Spoke" + + "\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\022\025\n\007details\030\004 " + + "\001(\tB\004\342A\001\001\"S\n\026RejectHubSpokeResponse\0229\n\005s" + + "poke\030\001 \001(\0132*.google.cloud.networkconnect" + + "ivity.v1.Spoke\"\\\n\024GetRouteTableRequest\022D" + + "\n\004name\030\001 \001(\tB6\342A\001\002\372A/\n-networkconnectivi" + + "ty.googleapis.com/RouteTable\"U\n\017GetRoute" + + "Request\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+networkc" + + "onnectivity.googleapis.com/HubRoute\"\244\001\n\021" + + "ListRoutesRequest\022F\n\006parent\030\001 \001(\tB6\342A\001\002\372" + + "A/\n-networkconnectivity.googleapis.com/R" + + "outeTable\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_tok" + + "en\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001" + + "(\t\"~\n\022ListRoutesResponse\022:\n\006routes\030\001 \003(\013" + + "2*.google.cloud.networkconnectivity.v1.R" + + "oute\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreach" + + "able\030\003 \003(\t\"\242\001\n\026ListRouteTablesRequest\022?\n" + + "\006parent\030\001 \001(\tB/\342A\001\002\372A(\n&networkconnectiv" + + "ity.googleapis.com/Hub\022\021\n\tpage_size\030\002 \001(" + "\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n" - + "\010order_by\030\005 \001(\t\"~\n\022ListSpokesResponse\022:\n" - + "\006spokes\030\001 \003(\0132*.google.cloud.networkconn" - + "ectivity.v1.Spoke\022\027\n\017next_page_token\030\002 \001" - + "(\t\022\023\n\013unreachable\030\003 \003(\t\"R\n\017GetSpokeReque" - + "st\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(networkconnec" - + "tivity.googleapis.com/Spoke\"\303\001\n\022CreateSp" - + "okeRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!loc" - + "ations.googleapis.com/Location\022\026\n\010spoke_" - + "id\030\002 \001(\tB\004\342A\001\002\022?\n\005spoke\030\003 \001(\0132*.google.c" - + "loud.networkconnectivity.v1.SpokeB\004\342A\001\002\022" - + "\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\246\001\n\022UpdateSpok" - + "eRequest\0225\n\013update_mask\030\001 \001(\0132\032.google.p" - + "rotobuf.FieldMaskB\004\342A\001\001\022?\n\005spoke\030\002 \001(\0132*" - + ".google.cloud.networkconnectivity.v1.Spo" - + "keB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"o\n\022De" - + "leteSpokeRequest\022?\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n" - + "(networkconnectivity.googleapis.com/Spok" - + "e\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\251\001\n\020LinkedVp" - + "nTunnels\0223\n\004uris\030\001 \003(\tB%\372A\"\n compute.goo" - + "gleapis.com/VpnTunnel\022\"\n\032site_to_site_da" - + "ta_transfer\030\002 \001(\010\022<\n\013vpc_network\030\003 \001(\tB\'" - + "\342A\001\003\372A \n\036compute.googleapis.com/Network\"" - + "\303\001\n\035LinkedInterconnectAttachments\022@\n\004uri" - + "s\030\001 \003(\tB2\372A/\n-compute.googleapis.com/Int" - + "erconnectAttachment\022\"\n\032site_to_site_data" - + "_transfer\030\002 \001(\010\022<\n\013vpc_network\030\003 \001(\tB\'\342A" - + "\001\003\372A \n\036compute.googleapis.com/Network\"\323\001" - + "\n\036LinkedRouterApplianceInstances\022O\n\tinst" - + "ances\030\001 \003(\0132<.google.cloud.networkconnec" - + "tivity.v1.RouterApplianceInstance\022\"\n\032sit" - + "e_to_site_data_transfer\030\002 \001(\010\022<\n\013vpc_net" - + "work\030\003 \001(\tB\'\342A\001\003\372A \n\036compute.googleapis." - + "com/Network\"l\n\027RouterApplianceInstance\022=" - + "\n\017virtual_machine\030\001 \001(\tB$\372A!\n\037compute.go" - + "ogleapis.com/Instance\022\022\n\nip_address\030\003 \001(" - + "\t\"c\n\020LocationMetadata\022O\n\021location_featur" - + "es\030\001 \003(\01624.google.cloud.networkconnectiv" - + "ity.v1.LocationFeature*f\n\017LocationFeatur" - + "e\022 \n\034LOCATION_FEATURE_UNSPECIFIED\020\000\022\030\n\024S" - + "ITE_TO_CLOUD_SPOKES\020\001\022\027\n\023SITE_TO_SITE_SP" - + "OKES\020\002*T\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014" - + "\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010DELETING\020\003\022\014" - + "\n\010UPDATING\020\0062\235\020\n\nHubService\022\267\001\n\010ListHubs" - + "\0224.google.cloud.networkconnectivity.v1.L" - + "istHubsRequest\0325.google.cloud.networkcon" - + "nectivity.v1.ListHubsResponse\">\332A\006parent" - + "\202\323\344\223\002/\022-/v1/{parent=projects/*/locations" - + "/global}/hubs\022\244\001\n\006GetHub\0222.google.cloud." - + "networkconnectivity.v1.GetHubRequest\032(.g" - + "oogle.cloud.networkconnectivity.v1.Hub\"<" - + "\332A\004name\202\323\344\223\002/\022-/v1/{name=projects/*/loca" - + "tions/global/hubs/*}\022\314\001\n\tCreateHub\0225.goo" - + "gle.cloud.networkconnectivity.v1.CreateH" - + "ubRequest\032\035.google.longrunning.Operation" - + "\"i\312A\030\n\003Hub\022\021OperationMetadata\332A\021parent,h" - + "ub,hub_id\202\323\344\223\0024\"-/v1/{parent=projects/*/" - + "locations/global}/hubs:\003hub\022\316\001\n\tUpdateHu" - + "b\0225.google.cloud.networkconnectivity.v1." - + "UpdateHubRequest\032\035.google.longrunning.Op" - + "eration\"k\312A\030\n\003Hub\022\021OperationMetadata\332A\017h" - + "ub,update_mask\202\323\344\223\002821/v1/{hub.name=proj" - + "ects/*/locations/global/hubs/*}:\003hub\022\314\001\n" - + "\tDeleteHub\0225.google.cloud.networkconnect" - + "ivity.v1.DeleteHubRequest\032\035.google.longr" - + "unning.Operation\"i\312A*\n\025google.protobuf.E" - + "mpty\022\021OperationMetadata\332A\004name\202\323\344\223\002/*-/v" - + "1/{name=projects/*/locations/global/hubs" - + "/*}\022\272\001\n\nListSpokes\0226.google.cloud.networ" - + "kconnectivity.v1.ListSpokesRequest\0327.goo" - + "gle.cloud.networkconnectivity.v1.ListSpo" - + "kesResponse\";\332A\006parent\202\323\344\223\002,\022*/v1/{paren" - + "t=projects/*/locations/*}/spokes\022\247\001\n\010Get" - + "Spoke\0224.google.cloud.networkconnectivity" - + ".v1.GetSpokeRequest\032*.google.cloud.netwo" - + "rkconnectivity.v1.Spoke\"9\332A\004name\202\323\344\223\002,\022*" - + "/v1/{name=projects/*/locations/*/spokes/" - + "*}\022\325\001\n\013CreateSpoke\0227.google.cloud.networ" - + "kconnectivity.v1.CreateSpokeRequest\032\035.go" - + "ogle.longrunning.Operation\"n\312A\032\n\005Spoke\022\021" - + "OperationMetadata\332A\025parent,spoke,spoke_i" - + "d\202\323\344\223\0023\"*/v1/{parent=projects/*/location" - + "s/*}/spokes:\005spoke\022\327\001\n\013UpdateSpoke\0227.goo" - + "gle.cloud.networkconnectivity.v1.UpdateS" - + "pokeRequest\032\035.google.longrunning.Operati" - + "on\"p\312A\032\n\005Spoke\022\021OperationMetadata\332A\021spok" - + "e,update_mask\202\323\344\223\002920/v1/{spoke.name=pro" - + "jects/*/locations/*/spokes/*}:\005spoke\022\315\001\n" - + "\013DeleteSpoke\0227.google.cloud.networkconne" - + "ctivity.v1.DeleteSpokeRequest\032\035.google.l" - + "ongrunning.Operation\"f\312A*\n\025google.protob" - + "uf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002," - + "**/v1/{name=projects/*/locations/*/spoke" - + "s/*}\032V\312A\"networkconnectivity.googleapis." - + "com\322A.https://www.googleapis.com/auth/cl" - + "oud-platformB\302\003\n\'com.google.cloud.networ" - + "kconnectivity.v1B\010HubProtoP\001ZYcloud.goog" - + "le.com/go/networkconnectivity/apiv1/netw" - + "orkconnectivitypb;networkconnectivitypb\252" - + "\002#Google.Cloud.NetworkConnectivity.V1\312\002#" - + "Google\\Cloud\\NetworkConnectivity\\V1\352\002&Go" - + "ogle::Cloud::NetworkConnectivity::V1\352A`\n" - + " compute.googleapis.com/VpnTunnel\022\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projects" + + "/*/locations/global}/hubs\022\244\001\n\006GetHub\0222.g" + + "oogle.cloud.networkconnectivity.v1.GetHu" + + "bRequest\032(.google.cloud.networkconnectiv" + + "ity.v1.Hub\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=pro" + + "jects/*/locations/global/hubs/*}\022\314\001\n\tCre" + + "ateHub\0225.google.cloud.networkconnectivit" + + "y.v1.CreateHubRequest\032\035.google.longrunni" + + "ng.Operation\"i\312A\030\n\003Hub\022\021OperationMetadat" + + "a\332A\021parent,hub,hub_id\202\323\344\223\0024\"-/v1/{parent" + + "=projects/*/locations/global}/hubs:\003hub\022" + + "\316\001\n\tUpdateHub\0225.google.cloud.networkconn" + + "ectivity.v1.UpdateHubRequest\032\035.google.lo" + + "ngrunning.Operation\"k\312A\030\n\003Hub\022\021Operation" + + "Metadata\332A\017hub,update_mask\202\323\344\223\002821/v1/{h" + + "ub.name=projects/*/locations/global/hubs" + + "/*}:\003hub\022\314\001\n\tDeleteHub\0225.google.cloud.ne" + + "tworkconnectivity.v1.DeleteHubRequest\032\035." + + "google.longrunning.Operation\"i\312A*\n\025googl" + + "e.protobuf.Empty\022\021OperationMetadata\332A\004na" + + "me\202\323\344\223\002/*-/v1/{name=projects/*/locations" + + "/global/hubs/*}\022\317\001\n\rListHubSpokes\0229.goog" + + "le.cloud.networkconnectivity.v1.ListHubS" + + "pokesRequest\032:.google.cloud.networkconne" + + "ctivity.v1.ListHubSpokesResponse\"G\332A\004nam" + + "e\202\323\344\223\002:\0228/v1/{name=projects/*/locations/" + + "global/hubs/*}:listSpokes\022\272\001\n\nListSpokes" + + "\0226.google.cloud.networkconnectivity.v1.L" + + "istSpokesRequest\0327.google.cloud.networkc" + + "onnectivity.v1.ListSpokesResponse\";\332A\006pa" + + "rent\202\323\344\223\002,\022*/v1/{parent=projects/*/locat" + + "ions/*}/spokes\022\247\001\n\010GetSpoke\0224.google.clo" + + "ud.networkconnectivity.v1.GetSpokeReques" + + "t\032*.google.cloud.networkconnectivity.v1." + + "Spoke\"9\332A\004name\202\323\344\223\002,\022*/v1/{name=projects" + + "/*/locations/*/spokes/*}\022\325\001\n\013CreateSpoke" + + "\0227.google.cloud.networkconnectivity.v1.C" + + "reateSpokeRequest\032\035.google.longrunning.O" + + "peration\"n\312A\032\n\005Spoke\022\021OperationMetadata\332" + + "A\025parent,spoke,spoke_id\202\323\344\223\0023\"*/v1/{pare" + + "nt=projects/*/locations/*}/spokes:\005spoke" + + "\022\327\001\n\013UpdateSpoke\0227.google.cloud.networkc" + + "onnectivity.v1.UpdateSpokeRequest\032\035.goog" + + "le.longrunning.Operation\"p\312A\032\n\005Spoke\022\021Op" + + "erationMetadata\332A\021spoke,update_mask\202\323\344\223\002" + + "920/v1/{spoke.name=projects/*/locations/" + + "*/spokes/*}:\005spoke\022\361\001\n\016RejectHubSpoke\022:." + + "google.cloud.networkconnectivity.v1.Reje" + + "ctHubSpokeRequest\032\035.google.longrunning.O" + + "peration\"\203\001\312A+\n\026RejectHubSpokeResponse\022\021" + + "OperationMetadata\332A\016name,spoke_uri\202\323\344\223\002>" + + "\"9/v1/{name=projects/*/locations/global/" + + "hubs/*}:rejectSpoke:\001*\022\361\001\n\016AcceptHubSpok" + + "e\022:.google.cloud.networkconnectivity.v1." + + "AcceptHubSpokeRequest\032\035.google.longrunni" + + "ng.Operation\"\203\001\312A+\n\026AcceptHubSpokeRespon" + + "se\022\021OperationMetadata\332A\016name,spoke_uri\202\323" + + "\344\223\002>\"9/v1/{name=projects/*/locations/glo" + + "bal/hubs/*}:acceptSpoke:\001*\022\315\001\n\013DeleteSpo" + + "ke\0227.google.cloud.networkconnectivity.v1" + + ".DeleteSpokeRequest\032\035.google.longrunning" + + ".Operation\"f\312A*\n\025google.protobuf.Empty\022\021" + + "OperationMetadata\332A\004name\202\323\344\223\002,**/v1/{nam" + + "e=projects/*/locations/*/spokes/*}\022\307\001\n\rG" + + "etRouteTable\0229.google.cloud.networkconne" + + "ctivity.v1.GetRouteTableRequest\032/.google" + + ".cloud.networkconnectivity.v1.RouteTable" + + "\"J\332A\004name\202\323\344\223\002=\022;/v1/{name=projects/*/lo" + + "cations/global/hubs/*/routeTables/*}\022\301\001\n" + + "\010GetRoute\0224.google.cloud.networkconnecti" + + "vity.v1.GetRouteRequest\032*.google.cloud.n" + + "etworkconnectivity.v1.Route\"S\332A\004name\202\323\344\223" + + "\002F\022D/v1/{name=projects/*/locations/globa" + + "l/hubs/*/routeTables/*/routes/*}\022\324\001\n\nLis" + + "tRoutes\0226.google.cloud.networkconnectivi" + + "ty.v1.ListRoutesRequest\0327.google.cloud.n" + + "etworkconnectivity.v1.ListRoutesResponse" + + "\"U\332A\006parent\202\323\344\223\002F\022D/v1/{parent=projects/" + + "*/locations/global/hubs/*/routeTables/*}" + + "/routes\022\332\001\n\017ListRouteTables\022;.google.clo" + + "ud.networkconnectivity.v1.ListRouteTable" + + "sRequest\032<.google.cloud.networkconnectiv" + + "ity.v1.ListRouteTablesResponse\"L\332A\006paren" + + "t\202\323\344\223\002=\022;/v1/{parent=projects/*/location" + + "s/global/hubs/*}/routeTables\022\263\001\n\010GetGrou" + + "p\0224.google.cloud.networkconnectivity.v1." + + "GetGroupRequest\032*.google.cloud.networkco" + + "nnectivity.v1.Group\"E\332A\004name\202\323\344\223\0028\0226/v1/" + + "{name=projects/*/locations/global/hubs/*" + + "/groups/*}\022\306\001\n\nListGroups\0226.google.cloud" + + ".networkconnectivity.v1.ListGroupsReques" + + "t\0327.google.cloud.networkconnectivity.v1." + + "ListGroupsResponse\"G\332A\006parent\202\323\344\223\0028\0226/v1" + + "/{parent=projects/*/locations/global/hub" + + "s/*}/groups\032V\312A\"networkconnectivity.goog" + + "leapis.com\322A.https://www.googleapis.com/" + + "auth/cloud-platformB\302\003\n\'com.google.cloud" + + ".networkconnectivity.v1B\010HubProtoP\001ZYclo" + + "ud.google.com/go/networkconnectivity/api" + + "v1/networkconnectivitypb;networkconnecti" + + "vitypb\252\002#Google.Cloud.NetworkConnectivit" + + "y.V1\312\002#Google\\Cloud\\NetworkConnectivity\\" + + "V1\352\002&Google::Cloud::NetworkConnectivity:" + + ":V1\352A`\n compute.googleapis.com/VpnTunnel" + + "\022 fieldValuesMap; + private final String project; + private final String hub; + private final String routeTable; + private final String route; + + @Deprecated + protected HubRouteName() { + project = null; + hub = null; + routeTable = null; + route = null; + } + + private HubRouteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + routeTable = Preconditions.checkNotNull(builder.getRouteTable()); + route = Preconditions.checkNotNull(builder.getRoute()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public String getRoute() { + return route; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static HubRouteName of(String project, String hub, String routeTable, String route) { + return newBuilder() + .setProject(project) + .setHub(hub) + .setRouteTable(routeTable) + .setRoute(route) + .build(); + } + + public static String format(String project, String hub, String routeTable, String route) { + return newBuilder() + .setProject(project) + .setHub(hub) + .setRouteTable(routeTable) + .setRoute(route) + .build() + .toString(); + } + + public static HubRouteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB_ROUTE_TABLE_ROUTE.validatedMatch( + formattedString, "HubRouteName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("hub"), + matchMap.get("route_table"), + matchMap.get("route")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (HubRouteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB_ROUTE_TABLE_ROUTE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (hub != null) { + fieldMapBuilder.put("hub", hub); + } + if (routeTable != null) { + fieldMapBuilder.put("route_table", routeTable); + } + if (route != null) { + fieldMapBuilder.put("route", route); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB_ROUTE_TABLE_ROUTE.instantiate( + "project", project, "hub", hub, "route_table", routeTable, "route", route); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + HubRouteName that = ((HubRouteName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.hub, that.hub) + && Objects.equals(this.routeTable, that.routeTable) + && Objects.equals(this.route, that.route); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + h *= 1000003; + h ^= Objects.hashCode(routeTable); + h *= 1000003; + h ^= Objects.hashCode(route); + return h; + } + + /** + * Builder for + * projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}. + */ + public static class Builder { + private String project; + private String hub; + private String routeTable; + private String route; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public String getRoute() { + return route; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + public Builder setRouteTable(String routeTable) { + this.routeTable = routeTable; + return this; + } + + public Builder setRoute(String route) { + this.route = route; + return this; + } + + private Builder(HubRouteName hubRouteName) { + this.project = hubRouteName.project; + this.hub = hubRouteName.hub; + this.routeTable = hubRouteName.routeTable; + this.route = hubRouteName.route; + } + + public HubRouteName build() { + return new HubRouteName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetwork.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetwork.java new file mode 100644 index 000000000000..aae91c17fd8e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetwork.java @@ -0,0 +1,929 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * An existing VPC network.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.LinkedVpcNetwork} + */ +public final class LinkedVpcNetwork extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.LinkedVpcNetwork) + LinkedVpcNetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use LinkedVpcNetwork.newBuilder() to construct. + private LinkedVpcNetwork(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkedVpcNetwork() { + uri_ = ""; + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LinkedVpcNetwork(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.class, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXCLUDE_EXPORT_RANGES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getExcludeExportRangesList() { + return excludeExportRanges_; + } + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + public int getExcludeExportRangesCount() { + return excludeExportRanges_.size(); + } + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + public java.lang.String getExcludeExportRanges(int index) { + return excludeExportRanges_.get(index); + } + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getExcludeExportRangesBytes(int index) { + return excludeExportRanges_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + for (int i = 0; i < excludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, excludeExportRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + { + int dataSize = 0; + for (int i = 0; i < excludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeExportRangesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork other = + (com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getExcludeExportRangesList().equals(other.getExcludeExportRangesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getExcludeExportRangesCount() > 0) { + hash = (37 * hash) + EXCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getExcludeExportRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An existing VPC network.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.LinkedVpcNetwork} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.LinkedVpcNetwork) + com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.class, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_LinkedVpcNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork build() { + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork buildPartial() { + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork result = + new com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + excludeExportRanges_.makeImmutable(); + result.excludeExportRanges_ = excludeExportRanges_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork other) { + if (other == com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.excludeExportRanges_.isEmpty()) { + if (excludeExportRanges_.isEmpty()) { + excludeExportRanges_ = other.excludeExportRanges_; + bitField0_ |= 0x00000002; + } else { + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.addAll(other.excludeExportRanges_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludeExportRangesIsMutable() { + if (!excludeExportRanges_.isModifiable()) { + excludeExportRanges_ = new com.google.protobuf.LazyStringArrayList(excludeExportRanges_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getExcludeExportRangesList() { + excludeExportRanges_.makeImmutable(); + return excludeExportRanges_; + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + public int getExcludeExportRangesCount() { + return excludeExportRanges_.size(); + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + public java.lang.String getExcludeExportRanges(int index) { + return excludeExportRanges_.get(index); + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getExcludeExportRangesBytes(int index) { + return excludeExportRanges_.getByteString(index); + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setExcludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addExcludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeExportRanges(java.lang.Iterable values) { + ensureExcludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeExportRanges_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeExportRanges() { + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addExcludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.LinkedVpcNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.LinkedVpcNetwork) + private static final com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork(); + } + + public static com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkedVpcNetwork parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetworkOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetworkOrBuilder.java new file mode 100644 index 000000000000..dc3be459fec0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/LinkedVpcNetworkOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface LinkedVpcNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.LinkedVpcNetwork) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + java.util.List getExcludeExportRangesList(); + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + int getExcludeExportRangesCount(); + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + java.lang.String getExcludeExportRanges(int index); + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getExcludeExportRangesBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequest.java new file mode 100644 index 000000000000..6383470866c2 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Request for
+ * [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListGroupsRequest} + */ +public final class ListGroupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListGroupsRequest) + ListGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGroupsRequest.newBuilder() to construct. + private ListGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGroupsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest.class, + com.google.cloud.networkconnectivity.v1.ListGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListGroupsRequest other = + (com.google.cloud.networkconnectivity.v1.ListGroupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListGroupsRequest) + com.google.cloud.networkconnectivity.v1.ListGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListGroupsRequest.class, + com.google.cloud.networkconnectivity.v1.ListGroupsRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListGroupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsRequest build() { + com.google.cloud.networkconnectivity.v1.ListGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.ListGroupsRequest result = + new com.google.cloud.networkconnectivity.v1.ListGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.ListGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListGroupsRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListGroupsRequest other) { + if (other == com.google.cloud.networkconnectivity.v1.ListGroupsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListGroupsRequest) + private static final com.google.cloud.networkconnectivity.v1.ListGroupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListGroupsRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..afd990bc07b5 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponse.java new file mode 100644 index 000000000000..850766860cf8 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponse.java @@ -0,0 +1,1414 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Response for
+ * [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListGroupsResponse} + */ +public final class ListGroupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListGroupsResponse) + ListGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGroupsResponse.newBuilder() to construct. + private ListGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGroupsResponse() { + groups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGroupsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListGroupsResponse.class, + com.google.cloud.networkconnectivity.v1.ListGroupsResponse.Builder.class); + } + + public static final int GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List groups_; + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + @java.lang.Override + public java.util.List getGroupsList() { + return groups_; + } + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + @java.lang.Override + public java.util.List + getGroupsOrBuilderList() { + return groups_; + } + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + @java.lang.Override + public int getGroupsCount() { + return groups_.size(); + } + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Group getGroups(int index) { + return groups_.get(index); + } + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.GroupOrBuilder getGroupsOrBuilder(int index) { + return groups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < groups_.size(); i++) { + output.writeMessage(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListGroupsResponse other = + (com.google.cloud.networkconnectivity.v1.ListGroupsResponse) obj; + + if (!getGroupsList().equals(other.getGroupsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGroupsCount() > 0) { + hash = (37 * hash) + GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getGroupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for
+   * [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListGroupsResponse) + com.google.cloud.networkconnectivity.v1.ListGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListGroupsResponse.class, + com.google.cloud.networkconnectivity.v1.ListGroupsResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + } else { + groups_ = null; + groupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsResponse getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListGroupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsResponse build() { + com.google.cloud.networkconnectivity.v1.ListGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsResponse buildPartial() { + com.google.cloud.networkconnectivity.v1.ListGroupsResponse result = + new com.google.cloud.networkconnectivity.v1.ListGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1.ListGroupsResponse result) { + if (groupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groups_ = java.util.Collections.unmodifiableList(groups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groups_ = groups_; + } else { + result.groups_ = groupsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.ListGroupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListGroupsResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListGroupsResponse other) { + if (other == com.google.cloud.networkconnectivity.v1.ListGroupsResponse.getDefaultInstance()) + return this; + if (groupsBuilder_ == null) { + if (!other.groups_.isEmpty()) { + if (groups_.isEmpty()) { + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupsIsMutable(); + groups_.addAll(other.groups_); + } + onChanged(); + } + } else { + if (!other.groups_.isEmpty()) { + if (groupsBuilder_.isEmpty()) { + groupsBuilder_.dispose(); + groupsBuilder_ = null; + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + groupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupsFieldBuilder() + : null; + } else { + groupsBuilder_.addAllMessages(other.groups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1.Group m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.Group.parser(), extensionRegistry); + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(m); + } else { + groupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List groups_ = + java.util.Collections.emptyList(); + + private void ensureGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groups_ = new java.util.ArrayList(groups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Group, + com.google.cloud.networkconnectivity.v1.Group.Builder, + com.google.cloud.networkconnectivity.v1.GroupOrBuilder> + groupsBuilder_; + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public java.util.List getGroupsList() { + if (groupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groups_); + } else { + return groupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public int getGroupsCount() { + if (groupsBuilder_ == null) { + return groups_.size(); + } else { + return groupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1.Group getGroups(int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder setGroups(int index, com.google.cloud.networkconnectivity.v1.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.set(index, value); + onChanged(); + } else { + groupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder setGroups( + int index, com.google.cloud.networkconnectivity.v1.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.set(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder addGroups(com.google.cloud.networkconnectivity.v1.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(value); + onChanged(); + } else { + groupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder addGroups(int index, com.google.cloud.networkconnectivity.v1.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(index, value); + onChanged(); + } else { + groupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder addGroups( + com.google.cloud.networkconnectivity.v1.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder addGroups( + int index, com.google.cloud.networkconnectivity.v1.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder addAllGroups( + java.lang.Iterable values) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groups_); + onChanged(); + } else { + groupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder clearGroups() { + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public Builder removeGroups(int index) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.remove(index); + onChanged(); + } else { + groupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1.Group.Builder getGroupsBuilder(int index) { + return getGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1.GroupOrBuilder getGroupsOrBuilder(int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public java.util.List + getGroupsOrBuilderList() { + if (groupsBuilder_ != null) { + return groupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groups_); + } + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1.Group.Builder addGroupsBuilder() { + return getGroupsFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1.Group.getDefaultInstance()); + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1.Group.Builder addGroupsBuilder(int index) { + return getGroupsFieldBuilder() + .addBuilder(index, com.google.cloud.networkconnectivity.v1.Group.getDefaultInstance()); + } + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + public java.util.List + getGroupsBuilderList() { + return getGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Group, + com.google.cloud.networkconnectivity.v1.Group.Builder, + com.google.cloud.networkconnectivity.v1.GroupOrBuilder> + getGroupsFieldBuilder() { + if (groupsBuilder_ == null) { + groupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Group, + com.google.cloud.networkconnectivity.v1.Group.Builder, + com.google.cloud.networkconnectivity.v1.GroupOrBuilder>( + groups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + groups_ = null; + } + return groupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListGroupsResponse) + private static final com.google.cloud.networkconnectivity.v1.ListGroupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListGroupsResponse(); + } + + public static com.google.cloud.networkconnectivity.v1.ListGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..0ffe2567d307 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListGroupsResponseOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + java.util.List getGroupsList(); + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + com.google.cloud.networkconnectivity.v1.Group getGroups(int index); + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + int getGroupsCount(); + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + java.util.List + getGroupsOrBuilderList(); + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + com.google.cloud.networkconnectivity.v1.GroupOrBuilder getGroupsOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequest.java new file mode 100644 index 000000000000..67d5cbbd8091 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequest.java @@ -0,0 +1,1992 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The request for
+ * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListHubSpokesRequest} + */ +public final class ListHubSpokesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListHubSpokesRequest) + ListHubSpokesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHubSpokesRequest.newBuilder() to construct. + private ListHubSpokesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHubSpokesRequest() { + name_ = ""; + spokeLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListHubSpokesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.class, + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.Builder.class); + } + + /** + * + * + *
+   * Enum that controls which spoke fields are included in the response.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView} + */ + public enum SpokeView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The spoke view is unspecified. When the spoke view is unspecified, the
+     * API returns the same fields as the `BASIC` view.
+     * 
+ * + * SPOKE_VIEW_UNSPECIFIED = 0; + */ + SPOKE_VIEW_UNSPECIFIED(0), + /** + * + * + *
+     * Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
+     * and `spoke_type`. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Includes all spoke fields except `labels`.
+     * You can use the `DETAILED` view only when you set the `spoke_locations`
+     * field to `[global]`.
+     * 
+ * + * DETAILED = 2; + */ + DETAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The spoke view is unspecified. When the spoke view is unspecified, the
+     * API returns the same fields as the `BASIC` view.
+     * 
+ * + * SPOKE_VIEW_UNSPECIFIED = 0; + */ + public static final int SPOKE_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
+     * and `spoke_type`. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Includes all spoke fields except `labels`.
+     * You can use the `DETAILED` view only when you set the `spoke_locations`
+     * field to `[global]`.
+     * 
+ * + * DETAILED = 2; + */ + public static final int DETAILED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SpokeView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SpokeView forNumber(int value) { + switch (value) { + case 0: + return SPOKE_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return DETAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SpokeView findValueByNumber(int number) { + return SpokeView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SpokeView[] VALUES = values(); + + public static SpokeView valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SpokeView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPOKE_LOCATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList spokeLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return A list containing the spokeLocations. + */ + public com.google.protobuf.ProtocolStringList getSpokeLocationsList() { + return spokeLocations_; + } + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return The count of spokeLocations. + */ + public int getSpokeLocationsCount() { + return spokeLocations_.size(); + } + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the element to return. + * @return The spokeLocations at the given index. + */ + public java.lang.String getSpokeLocations(int index) { + return spokeLocations_.get(index); + } + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the spokeLocations at the given index. + */ + public com.google.protobuf.ByteString getSpokeLocationsBytes(int index) { + return spokeLocations_.getByteString(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 7; + private int view_ = 0; + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView getView() { + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView result = + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView.forNumber(view_); + return result == null + ? com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < spokeLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, spokeLocations_.getRaw(i)); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + if (view_ + != com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView + .SPOKE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < spokeLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(spokeLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getSpokeLocationsList().size(); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + if (view_ + != com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView + .SPOKE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, view_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest other = + (com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeLocationsList().equals(other.getSpokeLocationsList())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getSpokeLocationsCount() > 0) { + hash = (37 * hash) + SPOKE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeLocationsList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListHubSpokesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListHubSpokesRequest) + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.class, + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest build() { + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest result = + new com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + spokeLocations_.makeImmutable(); + result.spokeLocations_ = spokeLocations_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.spokeLocations_.isEmpty()) { + if (spokeLocations_.isEmpty()) { + spokeLocations_ = other.spokeLocations_; + bitField0_ |= 0x00000002; + } else { + ensureSpokeLocationsIsMutable(); + spokeLocations_.addAll(other.spokeLocations_); + } + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSpokeLocationsIsMutable(); + spokeLocations_.add(s); + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList spokeLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSpokeLocationsIsMutable() { + if (!spokeLocations_.isModifiable()) { + spokeLocations_ = new com.google.protobuf.LazyStringArrayList(spokeLocations_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @return A list containing the spokeLocations. + */ + public com.google.protobuf.ProtocolStringList getSpokeLocationsList() { + spokeLocations_.makeImmutable(); + return spokeLocations_; + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @return The count of spokeLocations. + */ + public int getSpokeLocationsCount() { + return spokeLocations_.size(); + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the element to return. + * @return The spokeLocations at the given index. + */ + public java.lang.String getSpokeLocations(int index) { + return spokeLocations_.get(index); + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the spokeLocations at the given index. + */ + public com.google.protobuf.ByteString getSpokeLocationsBytes(int index) { + return spokeLocations_.getByteString(index); + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index to set the value at. + * @param value The spokeLocations to set. + * @return This builder for chaining. + */ + public Builder setSpokeLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeLocationsIsMutable(); + spokeLocations_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param value The spokeLocations to add. + * @return This builder for chaining. + */ + public Builder addSpokeLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeLocationsIsMutable(); + spokeLocations_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param values The spokeLocations to add. + * @return This builder for chaining. + */ + public Builder addAllSpokeLocations(java.lang.Iterable values) { + ensureSpokeLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeLocations_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @return This builder for chaining. + */ + public Builder clearSpokeLocations() { + spokeLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param value The bytes of the spokeLocations to add. + * @return This builder for chaining. + */ + public Builder addSpokeLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSpokeLocationsIsMutable(); + spokeLocations_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView getView() { + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView result = + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView.forNumber(view_); + return result == null + ? com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView( + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000040); + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListHubSpokesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListHubSpokesRequest) + private static final com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHubSpokesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequestOrBuilder.java new file mode 100644 index 000000000000..245494b4ddae --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesRequestOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListHubSpokesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListHubSpokesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return A list containing the spokeLocations. + */ + java.util.List getSpokeLocationsList(); + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return The count of spokeLocations. + */ + int getSpokeLocationsCount(); + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the element to return. + * @return The spokeLocations at the given index. + */ + java.lang.String getSpokeLocations(int index); + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the spokeLocations at the given index. + */ + com.google.protobuf.ByteString getSpokeLocationsBytes(int index); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The view. + */ + com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView getView(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponse.java new file mode 100644 index 000000000000..04f90763a3bd --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponse.java @@ -0,0 +1,1462 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The response for
+ * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListHubSpokesResponse} + */ +public final class ListHubSpokesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListHubSpokesResponse) + ListHubSpokesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHubSpokesResponse.newBuilder() to construct. + private ListHubSpokesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHubSpokesResponse() { + spokes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListHubSpokesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.class, + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.Builder.class); + } + + public static final int SPOKES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List spokes_; + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + @java.lang.Override + public java.util.List getSpokesList() { + return spokes_; + } + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + @java.lang.Override + public java.util.List + getSpokesOrBuilderList() { + return spokes_; + } + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + @java.lang.Override + public int getSpokesCount() { + return spokes_.size(); + } + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke getSpokes(int index) { + return spokes_.get(index); + } + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokesOrBuilder(int index) { + return spokes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < spokes_.size(); i++) { + output.writeMessage(1, spokes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < spokes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, spokes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse other = + (com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse) obj; + + if (!getSpokesList().equals(other.getSpokesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSpokesCount() > 0) { + hash = (37 * hash) + SPOKES_FIELD_NUMBER; + hash = (53 * hash) + getSpokesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response for
+   * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListHubSpokesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListHubSpokesResponse) + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.class, + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (spokesBuilder_ == null) { + spokes_ = java.util.Collections.emptyList(); + } else { + spokes_ = null; + spokesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListHubSpokesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse build() { + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse result = + new com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse result) { + if (spokesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + spokes_ = java.util.Collections.unmodifiableList(spokes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.spokes_ = spokes_; + } else { + result.spokes_ = spokesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse.getDefaultInstance()) + return this; + if (spokesBuilder_ == null) { + if (!other.spokes_.isEmpty()) { + if (spokes_.isEmpty()) { + spokes_ = other.spokes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpokesIsMutable(); + spokes_.addAll(other.spokes_); + } + onChanged(); + } + } else { + if (!other.spokes_.isEmpty()) { + if (spokesBuilder_.isEmpty()) { + spokesBuilder_.dispose(); + spokesBuilder_ = null; + spokes_ = other.spokes_; + bitField0_ = (bitField0_ & ~0x00000001); + spokesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpokesFieldBuilder() + : null; + } else { + spokesBuilder_.addAllMessages(other.spokes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1.Spoke m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.Spoke.parser(), extensionRegistry); + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(m); + } else { + spokesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List spokes_ = + java.util.Collections.emptyList(); + + private void ensureSpokesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + spokes_ = new java.util.ArrayList(spokes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder> + spokesBuilder_; + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public java.util.List getSpokesList() { + if (spokesBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokes_); + } else { + return spokesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public int getSpokesCount() { + if (spokesBuilder_ == null) { + return spokes_.size(); + } else { + return spokesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Spoke getSpokes(int index) { + if (spokesBuilder_ == null) { + return spokes_.get(index); + } else { + return spokesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder setSpokes(int index, com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.set(index, value); + onChanged(); + } else { + spokesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder setSpokes( + int index, com.google.cloud.networkconnectivity.v1.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.set(index, builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder addSpokes(com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.add(value); + onChanged(); + } else { + spokesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder addSpokes(int index, com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.add(index, value); + onChanged(); + } else { + spokesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder addSpokes( + com.google.cloud.networkconnectivity.v1.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder addSpokes( + int index, com.google.cloud.networkconnectivity.v1.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(index, builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder addAllSpokes( + java.lang.Iterable values) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokes_); + onChanged(); + } else { + spokesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder clearSpokes() { + if (spokesBuilder_ == null) { + spokes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + spokesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public Builder removeSpokes(int index) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.remove(index); + onChanged(); + } else { + spokesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Spoke.Builder getSpokesBuilder(int index) { + return getSpokesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokesOrBuilder(int index) { + if (spokesBuilder_ == null) { + return spokes_.get(index); + } else { + return spokesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public java.util.List + getSpokesOrBuilderList() { + if (spokesBuilder_ != null) { + return spokesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokes_); + } + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Spoke.Builder addSpokesBuilder() { + return getSpokesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance()); + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Spoke.Builder addSpokesBuilder(int index) { + return getSpokesFieldBuilder() + .addBuilder(index, com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance()); + } + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + public java.util.List + getSpokesBuilderList() { + return getSpokesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder> + getSpokesFieldBuilder() { + if (spokesBuilder_ == null) { + spokesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder>( + spokes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + spokes_ = null; + } + return spokesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListHubSpokesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListHubSpokesResponse) + private static final com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHubSpokesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponseOrBuilder.java new file mode 100644 index 000000000000..9aac1f65f80f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubSpokesResponseOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListHubSpokesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListHubSpokesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + java.util.List getSpokesList(); + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + com.google.cloud.networkconnectivity.v1.Spoke getSpokes(int index); + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + int getSpokesCount(); + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + java.util.List + getSpokesOrBuilderList(); + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequest.java index e55e9277ed1f..2e6e1a357651 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequest.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequest.java @@ -128,7 +128,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The maximum number of results per page that should be returned.
+   * The maximum number of results per page to return.
    * 
* * int32 page_size = 2; @@ -199,7 +199,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; @@ -222,7 +222,7 @@ public java.lang.String getFilter() { * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; @@ -853,7 +853,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The maximum number of results per page that should be returned.
+     * The maximum number of results per page to return.
      * 
* * int32 page_size = 2; @@ -868,7 +868,7 @@ public int getPageSize() { * * *
-     * The maximum number of results per page that should be returned.
+     * The maximum number of results per page to return.
      * 
* * int32 page_size = 2; @@ -887,7 +887,7 @@ public Builder setPageSize(int value) { * * *
-     * The maximum number of results per page that should be returned.
+     * The maximum number of results per page to return.
      * 
* * int32 page_size = 2; @@ -1012,7 +1012,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1034,7 +1034,7 @@ public java.lang.String getFilter() { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1056,7 +1056,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1077,7 +1077,7 @@ public Builder setFilter(java.lang.String value) { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1094,7 +1094,7 @@ public Builder clearFilter() { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequestOrBuilder.java index 7b19b90f8c75..451b0c0e4ee8 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequestOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsRequestOrBuilder.java @@ -56,7 +56,7 @@ public interface ListHubsRequestOrBuilder * * *
-   * The maximum number of results per page that should be returned.
+   * The maximum number of results per page to return.
    * 
* * int32 page_size = 2; @@ -94,7 +94,7 @@ public interface ListHubsRequestOrBuilder * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; @@ -106,7 +106,7 @@ public interface ListHubsRequestOrBuilder * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponse.java index 48d10f9ad7f8..6d57ef58797c 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponse.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponse.java @@ -145,8 +145,9 @@ public com.google.cloud.networkconnectivity.v1.HubOrBuilder getHubsOrBuilder(int * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; @@ -169,8 +170,9 @@ public java.lang.String getNextPageToken() { * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; @@ -1063,8 +1065,9 @@ public com.google.cloud.networkconnectivity.v1.Hub.Builder addHubsBuilder(int in * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1086,8 +1089,9 @@ public java.lang.String getNextPageToken() { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1109,8 +1113,9 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1131,8 +1136,9 @@ public Builder setNextPageToken(java.lang.String value) { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1149,8 +1155,9 @@ public Builder clearNextPageToken() { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponseOrBuilder.java index f5a5413c36d9..4ecb18696642 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponseOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListHubsResponseOrBuilder.java @@ -79,8 +79,9 @@ public interface ListHubsResponseOrBuilder * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; @@ -92,8 +93,9 @@ public interface ListHubsResponseOrBuilder * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequest.java new file mode 100644 index 000000000000..24de12124f2f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequest.java @@ -0,0 +1,1288 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Request for
+ * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRouteTablesRequest} + */ +public final class ListRouteTablesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListRouteTablesRequest) + ListRouteTablesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRouteTablesRequest.newBuilder() to construct. + private ListRouteTablesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRouteTablesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRouteTablesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.class, + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest other = + (com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRouteTablesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListRouteTablesRequest) + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.class, + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest build() { + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest result = + new com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListRouteTablesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListRouteTablesRequest) + private static final com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRouteTablesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequestOrBuilder.java new file mode 100644 index 000000000000..709ea6b257c6 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListRouteTablesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListRouteTablesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponse.java new file mode 100644 index 000000000000..e1b8dbe2d05e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponse.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Response for
+ * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRouteTablesResponse} + */ +public final class ListRouteTablesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListRouteTablesResponse) + ListRouteTablesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRouteTablesResponse.newBuilder() to construct. + private ListRouteTablesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRouteTablesResponse() { + routeTables_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRouteTablesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.class, + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.Builder.class); + } + + public static final int ROUTE_TABLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List routeTables_; + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + @java.lang.Override + public java.util.List getRouteTablesList() { + return routeTables_; + } + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + @java.lang.Override + public java.util.List + getRouteTablesOrBuilderList() { + return routeTables_; + } + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + @java.lang.Override + public int getRouteTablesCount() { + return routeTables_.size(); + } + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteTable getRouteTables(int index) { + return routeTables_.get(index); + } + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder getRouteTablesOrBuilder( + int index) { + return routeTables_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < routeTables_.size(); i++) { + output.writeMessage(1, routeTables_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < routeTables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, routeTables_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse other = + (com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse) obj; + + if (!getRouteTablesList().equals(other.getRouteTablesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRouteTablesCount() > 0) { + hash = (37 * hash) + ROUTE_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getRouteTablesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for
+   * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRouteTablesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListRouteTablesResponse) + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.class, + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (routeTablesBuilder_ == null) { + routeTables_ = java.util.Collections.emptyList(); + } else { + routeTables_ = null; + routeTablesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRouteTablesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse build() { + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse result = + new com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse result) { + if (routeTablesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + routeTables_ = java.util.Collections.unmodifiableList(routeTables_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.routeTables_ = routeTables_; + } else { + result.routeTables_ = routeTablesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse.getDefaultInstance()) + return this; + if (routeTablesBuilder_ == null) { + if (!other.routeTables_.isEmpty()) { + if (routeTables_.isEmpty()) { + routeTables_ = other.routeTables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRouteTablesIsMutable(); + routeTables_.addAll(other.routeTables_); + } + onChanged(); + } + } else { + if (!other.routeTables_.isEmpty()) { + if (routeTablesBuilder_.isEmpty()) { + routeTablesBuilder_.dispose(); + routeTablesBuilder_ = null; + routeTables_ = other.routeTables_; + bitField0_ = (bitField0_ & ~0x00000001); + routeTablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRouteTablesFieldBuilder() + : null; + } else { + routeTablesBuilder_.addAllMessages(other.routeTables_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1.RouteTable m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.RouteTable.parser(), + extensionRegistry); + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.add(m); + } else { + routeTablesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List routeTables_ = + java.util.Collections.emptyList(); + + private void ensureRouteTablesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + routeTables_ = + new java.util.ArrayList( + routeTables_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.RouteTable, + com.google.cloud.networkconnectivity.v1.RouteTable.Builder, + com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder> + routeTablesBuilder_; + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public java.util.List getRouteTablesList() { + if (routeTablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(routeTables_); + } else { + return routeTablesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public int getRouteTablesCount() { + if (routeTablesBuilder_ == null) { + return routeTables_.size(); + } else { + return routeTablesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1.RouteTable getRouteTables(int index) { + if (routeTablesBuilder_ == null) { + return routeTables_.get(index); + } else { + return routeTablesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder setRouteTables( + int index, com.google.cloud.networkconnectivity.v1.RouteTable value) { + if (routeTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.set(index, value); + onChanged(); + } else { + routeTablesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder setRouteTables( + int index, com.google.cloud.networkconnectivity.v1.RouteTable.Builder builderForValue) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.set(index, builderForValue.build()); + onChanged(); + } else { + routeTablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder addRouteTables(com.google.cloud.networkconnectivity.v1.RouteTable value) { + if (routeTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.add(value); + onChanged(); + } else { + routeTablesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder addRouteTables( + int index, com.google.cloud.networkconnectivity.v1.RouteTable value) { + if (routeTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.add(index, value); + onChanged(); + } else { + routeTablesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder addRouteTables( + com.google.cloud.networkconnectivity.v1.RouteTable.Builder builderForValue) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.add(builderForValue.build()); + onChanged(); + } else { + routeTablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder addRouteTables( + int index, com.google.cloud.networkconnectivity.v1.RouteTable.Builder builderForValue) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.add(index, builderForValue.build()); + onChanged(); + } else { + routeTablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder addAllRouteTables( + java.lang.Iterable values) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routeTables_); + onChanged(); + } else { + routeTablesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder clearRouteTables() { + if (routeTablesBuilder_ == null) { + routeTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + routeTablesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public Builder removeRouteTables(int index) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.remove(index); + onChanged(); + } else { + routeTablesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1.RouteTable.Builder getRouteTablesBuilder( + int index) { + return getRouteTablesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder getRouteTablesOrBuilder( + int index) { + if (routeTablesBuilder_ == null) { + return routeTables_.get(index); + } else { + return routeTablesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public java.util.List + getRouteTablesOrBuilderList() { + if (routeTablesBuilder_ != null) { + return routeTablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routeTables_); + } + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1.RouteTable.Builder addRouteTablesBuilder() { + return getRouteTablesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1.RouteTable.getDefaultInstance()); + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1.RouteTable.Builder addRouteTablesBuilder( + int index) { + return getRouteTablesFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1.RouteTable.getDefaultInstance()); + } + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + public java.util.List + getRouteTablesBuilderList() { + return getRouteTablesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.RouteTable, + com.google.cloud.networkconnectivity.v1.RouteTable.Builder, + com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder> + getRouteTablesFieldBuilder() { + if (routeTablesBuilder_ == null) { + routeTablesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.RouteTable, + com.google.cloud.networkconnectivity.v1.RouteTable.Builder, + com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder>( + routeTables_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + routeTables_ = null; + } + return routeTablesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListRouteTablesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListRouteTablesResponse) + private static final com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRouteTablesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponseOrBuilder.java new file mode 100644 index 000000000000..a367dd308d06 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRouteTablesResponseOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListRouteTablesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListRouteTablesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + java.util.List getRouteTablesList(); + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + com.google.cloud.networkconnectivity.v1.RouteTable getRouteTables(int index); + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + int getRouteTablesCount(); + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + java.util.List + getRouteTablesOrBuilderList(); + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder getRouteTablesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequest.java new file mode 100644 index 000000000000..8937af184d69 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Request for
+ * [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRoutesRequest} + */ +public final class ListRoutesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListRoutesRequest) + ListRoutesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRoutesRequest.newBuilder() to construct. + private ListRoutesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRoutesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRoutesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest.class, + com.google.cloud.networkconnectivity.v1.ListRoutesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListRoutesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListRoutesRequest other = + (com.google.cloud.networkconnectivity.v1.ListRoutesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRoutesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListRoutesRequest) + com.google.cloud.networkconnectivity.v1.ListRoutesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRoutesRequest.class, + com.google.cloud.networkconnectivity.v1.ListRoutesRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListRoutesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListRoutesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesRequest build() { + com.google.cloud.networkconnectivity.v1.ListRoutesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.ListRoutesRequest result = + new com.google.cloud.networkconnectivity.v1.ListRoutesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.ListRoutesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListRoutesRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListRoutesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListRoutesRequest other) { + if (other == com.google.cloud.networkconnectivity.v1.ListRoutesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListRoutesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListRoutesRequest) + private static final com.google.cloud.networkconnectivity.v1.ListRoutesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListRoutesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRoutesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequestOrBuilder.java new file mode 100644 index 000000000000..124120bced6d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListRoutesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListRoutesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponse.java new file mode 100644 index 000000000000..bd66e97c1bee --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponse.java @@ -0,0 +1,1414 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Response for
+ * [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRoutesResponse} + */ +public final class ListRoutesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.ListRoutesResponse) + ListRoutesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRoutesResponse.newBuilder() to construct. + private ListRoutesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRoutesResponse() { + routes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRoutesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRoutesResponse.class, + com.google.cloud.networkconnectivity.v1.ListRoutesResponse.Builder.class); + } + + public static final int ROUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List routes_; + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + @java.lang.Override + public java.util.List getRoutesList() { + return routes_; + } + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + @java.lang.Override + public java.util.List + getRoutesOrBuilderList() { + return routes_; + } + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + @java.lang.Override + public int getRoutesCount() { + return routes_.size(); + } + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Route getRoutes(int index) { + return routes_.get(index); + } + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteOrBuilder getRoutesOrBuilder(int index) { + return routes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < routes_.size(); i++) { + output.writeMessage(1, routes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < routes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, routes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.ListRoutesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.ListRoutesResponse other = + (com.google.cloud.networkconnectivity.v1.ListRoutesResponse) obj; + + if (!getRoutesList().equals(other.getRoutesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRoutesCount() > 0) { + hash = (37 * hash) + ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getRoutesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.ListRoutesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for
+   * [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.ListRoutesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.ListRoutesResponse) + com.google.cloud.networkconnectivity.v1.ListRoutesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.ListRoutesResponse.class, + com.google.cloud.networkconnectivity.v1.ListRoutesResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.ListRoutesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (routesBuilder_ == null) { + routes_ = java.util.Collections.emptyList(); + } else { + routes_ = null; + routesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_ListRoutesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesResponse getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.ListRoutesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesResponse build() { + com.google.cloud.networkconnectivity.v1.ListRoutesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1.ListRoutesResponse result = + new com.google.cloud.networkconnectivity.v1.ListRoutesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1.ListRoutesResponse result) { + if (routesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + routes_ = java.util.Collections.unmodifiableList(routes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.routes_ = routes_; + } else { + result.routes_ = routesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.ListRoutesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.ListRoutesResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.ListRoutesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.ListRoutesResponse other) { + if (other == com.google.cloud.networkconnectivity.v1.ListRoutesResponse.getDefaultInstance()) + return this; + if (routesBuilder_ == null) { + if (!other.routes_.isEmpty()) { + if (routes_.isEmpty()) { + routes_ = other.routes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRoutesIsMutable(); + routes_.addAll(other.routes_); + } + onChanged(); + } + } else { + if (!other.routes_.isEmpty()) { + if (routesBuilder_.isEmpty()) { + routesBuilder_.dispose(); + routesBuilder_ = null; + routes_ = other.routes_; + bitField0_ = (bitField0_ & ~0x00000001); + routesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRoutesFieldBuilder() + : null; + } else { + routesBuilder_.addAllMessages(other.routes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1.Route m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.Route.parser(), extensionRegistry); + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.add(m); + } else { + routesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List routes_ = + java.util.Collections.emptyList(); + + private void ensureRoutesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + routes_ = new java.util.ArrayList(routes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Route, + com.google.cloud.networkconnectivity.v1.Route.Builder, + com.google.cloud.networkconnectivity.v1.RouteOrBuilder> + routesBuilder_; + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public java.util.List getRoutesList() { + if (routesBuilder_ == null) { + return java.util.Collections.unmodifiableList(routes_); + } else { + return routesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public int getRoutesCount() { + if (routesBuilder_ == null) { + return routes_.size(); + } else { + return routesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Route getRoutes(int index) { + if (routesBuilder_ == null) { + return routes_.get(index); + } else { + return routesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder setRoutes(int index, com.google.cloud.networkconnectivity.v1.Route value) { + if (routesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutesIsMutable(); + routes_.set(index, value); + onChanged(); + } else { + routesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder setRoutes( + int index, com.google.cloud.networkconnectivity.v1.Route.Builder builderForValue) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.set(index, builderForValue.build()); + onChanged(); + } else { + routesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder addRoutes(com.google.cloud.networkconnectivity.v1.Route value) { + if (routesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutesIsMutable(); + routes_.add(value); + onChanged(); + } else { + routesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder addRoutes(int index, com.google.cloud.networkconnectivity.v1.Route value) { + if (routesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutesIsMutable(); + routes_.add(index, value); + onChanged(); + } else { + routesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder addRoutes( + com.google.cloud.networkconnectivity.v1.Route.Builder builderForValue) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.add(builderForValue.build()); + onChanged(); + } else { + routesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder addRoutes( + int index, com.google.cloud.networkconnectivity.v1.Route.Builder builderForValue) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.add(index, builderForValue.build()); + onChanged(); + } else { + routesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder addAllRoutes( + java.lang.Iterable values) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routes_); + onChanged(); + } else { + routesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder clearRoutes() { + if (routesBuilder_ == null) { + routes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + routesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public Builder removeRoutes(int index) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.remove(index); + onChanged(); + } else { + routesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Route.Builder getRoutesBuilder(int index) { + return getRoutesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1.RouteOrBuilder getRoutesOrBuilder(int index) { + if (routesBuilder_ == null) { + return routes_.get(index); + } else { + return routesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public java.util.List + getRoutesOrBuilderList() { + if (routesBuilder_ != null) { + return routesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routes_); + } + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Route.Builder addRoutesBuilder() { + return getRoutesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1.Route.getDefaultInstance()); + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1.Route.Builder addRoutesBuilder(int index) { + return getRoutesFieldBuilder() + .addBuilder(index, com.google.cloud.networkconnectivity.v1.Route.getDefaultInstance()); + } + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + public java.util.List + getRoutesBuilderList() { + return getRoutesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Route, + com.google.cloud.networkconnectivity.v1.Route.Builder, + com.google.cloud.networkconnectivity.v1.RouteOrBuilder> + getRoutesFieldBuilder() { + if (routesBuilder_ == null) { + routesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Route, + com.google.cloud.networkconnectivity.v1.Route.Builder, + com.google.cloud.networkconnectivity.v1.RouteOrBuilder>( + routes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + routes_ = null; + } + return routesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.ListRoutesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.ListRoutesResponse) + private static final com.google.cloud.networkconnectivity.v1.ListRoutesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.ListRoutesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1.ListRoutesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRoutesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.ListRoutesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponseOrBuilder.java new file mode 100644 index 000000000000..13cc68348fe1 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListRoutesResponseOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface ListRoutesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.ListRoutesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + java.util.List getRoutesList(); + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + com.google.cloud.networkconnectivity.v1.Route getRoutes(int index); + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + int getRoutesCount(); + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + java.util.List + getRoutesOrBuilderList(); + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + com.google.cloud.networkconnectivity.v1.RouteOrBuilder getRoutesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequest.java index 5a4d755a4a83..c081765456ad 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequest.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequest.java @@ -127,7 +127,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The maximum number of results per page that should be returned.
+   * The maximum number of results to return per page.
    * 
* * int32 page_size = 2; @@ -198,7 +198,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; @@ -221,7 +221,7 @@ public java.lang.String getFilter() { * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; @@ -851,7 +851,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The maximum number of results per page that should be returned.
+     * The maximum number of results to return per page.
      * 
* * int32 page_size = 2; @@ -866,7 +866,7 @@ public int getPageSize() { * * *
-     * The maximum number of results per page that should be returned.
+     * The maximum number of results to return per page.
      * 
* * int32 page_size = 2; @@ -885,7 +885,7 @@ public Builder setPageSize(int value) { * * *
-     * The maximum number of results per page that should be returned.
+     * The maximum number of results to return per page.
      * 
* * int32 page_size = 2; @@ -1010,7 +1010,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1032,7 +1032,7 @@ public java.lang.String getFilter() { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1054,7 +1054,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1075,7 +1075,7 @@ public Builder setFilter(java.lang.String value) { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; @@ -1092,7 +1092,7 @@ public Builder clearFilter() { * * *
-     * An expression that filters the results listed in the response.
+     * An expression that filters the list of results.
      * 
* * string filter = 4; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequestOrBuilder.java index 4a4c3a6cc226..36bbd7866d79 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequestOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesRequestOrBuilder.java @@ -56,7 +56,7 @@ public interface ListSpokesRequestOrBuilder * * *
-   * The maximum number of results per page that should be returned.
+   * The maximum number of results to return per page.
    * 
* * int32 page_size = 2; @@ -94,7 +94,7 @@ public interface ListSpokesRequestOrBuilder * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; @@ -106,7 +106,7 @@ public interface ListSpokesRequestOrBuilder * * *
-   * An expression that filters the results listed in the response.
+   * An expression that filters the list of results.
    * 
* * string filter = 4; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponse.java index ae471b929aa5..0f52a84aa2e3 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponse.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponse.java @@ -144,8 +144,9 @@ public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokesOrBuilder * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; @@ -168,8 +169,9 @@ public java.lang.String getNextPageToken() { * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; @@ -1062,8 +1064,9 @@ public com.google.cloud.networkconnectivity.v1.Spoke.Builder addSpokesBuilder(in * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1085,8 +1088,9 @@ public java.lang.String getNextPageToken() { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1108,8 +1112,9 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1130,8 +1135,9 @@ public Builder setNextPageToken(java.lang.String value) { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; @@ -1148,8 +1154,9 @@ public Builder clearNextPageToken() { * * *
-     * The next pagination token in the List response. It should be used as
-     * page_token for the following request. An empty value means no more result.
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
      * 
* * string next_page_token = 2; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponseOrBuilder.java index 077d9b8d848c..c002342baf66 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponseOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/ListSpokesResponseOrBuilder.java @@ -79,8 +79,9 @@ public interface ListSpokesResponseOrBuilder * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; @@ -92,8 +93,9 @@ public interface ListSpokesResponseOrBuilder * * *
-   * The next pagination token in the List response. It should be used as
-   * page_token for the following request. An empty value means no more result.
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
    * 
* * string next_page_token = 2; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetwork.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetwork.java new file mode 100644 index 000000000000..6fa5965c5373 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetwork.java @@ -0,0 +1,609 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** Protobuf type {@code google.cloud.networkconnectivity.v1.NextHopVpcNetwork} */ +public final class NextHopVpcNetwork extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.NextHopVpcNetwork) + NextHopVpcNetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use NextHopVpcNetwork.newBuilder() to construct. + private NextHopVpcNetwork(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NextHopVpcNetwork() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NextHopVpcNetwork(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.class, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork other = + (com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.networkconnectivity.v1.NextHopVpcNetwork} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.NextHopVpcNetwork) + com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.class, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_NextHopVpcNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork build() { + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork buildPartial() { + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork result = + new com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork other) { + if (other == com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.NextHopVpcNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.NextHopVpcNetwork) + private static final com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork(); + } + + public static com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NextHopVpcNetwork parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetworkOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetworkOrBuilder.java new file mode 100644 index 000000000000..e4d020b1be68 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/NextHopVpcNetworkOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface NextHopVpcNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.NextHopVpcNetwork) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadata.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadata.java index b22be1986ab9..6022caebd604 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadata.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadata.java @@ -324,8 +324,9 @@ public com.google.protobuf.ByteString getStatusMessageBytes() { *
    * Output only. Identifies whether the user has requested cancellation
    * of the operation. Operations that have been cancelled successfully
-   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-   * corresponding to `Code.CANCELLED`.
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
    * 
* * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1601,8 +1602,9 @@ public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { *
      * Output only. Identifies whether the user has requested cancellation
      * of the operation. Operations that have been cancelled successfully
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1619,8 +1621,9 @@ public boolean getRequestedCancellation() { *
      * Output only. Identifies whether the user has requested cancellation
      * of the operation. Operations that have been cancelled successfully
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1641,8 +1644,9 @@ public Builder setRequestedCancellation(boolean value) { *
      * Output only. Identifies whether the user has requested cancellation
      * of the operation. Operations that have been cancelled successfully
-     * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-     * corresponding to `Code.CANCELLED`.
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
      * 
* * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadataOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadataOrBuilder.java index 144a08cfc4b6..39ae36bafdef 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadataOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/OperationMetadataOrBuilder.java @@ -180,8 +180,9 @@ public interface OperationMetadataOrBuilder *
    * Output only. Identifies whether the user has requested cancellation
    * of the operation. Operations that have been cancelled successfully
-   * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-   * corresponding to `Code.CANCELLED`.
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
    * 
* * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequest.java new file mode 100644 index 000000000000..cfd226aaa466 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequest.java @@ -0,0 +1,1296 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The request for
+ * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.RejectHubSpokeRequest} + */ +public final class RejectHubSpokeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) + RejectHubSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RejectHubSpokeRequest.newBuilder() to construct. + private RejectHubSpokeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RejectHubSpokeRequest() { + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RejectHubSpokeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPOKE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeUri_ = ""; + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + @java.lang.Override + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAILS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spokeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spokeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest other = + (com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeUri().equals(other.getSpokeUri())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getDetails().equals(other.getDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SPOKE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSpokeUri().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for
+   * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.RejectHubSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest build() { + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest result = + new com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeUri_ = spokeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeUri().isEmpty()) { + spokeUri_ = other.spokeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + spokeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the hub from which to reject the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hub from which to reject the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hub from which to reject the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hub from which to reject the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hub from which to reject the spoke.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object spokeUri_ = ""; + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeUri() { + spokeUri_ = getDefaultInstance().getSpokeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RejectHubSpokeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..cdd45fa49f4d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface RejectHubSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.RejectHubSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + java.lang.String getSpokeUri(); + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + com.google.protobuf.ByteString getSpokeUriBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + java.lang.String getDetails(); + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponse.java new file mode 100644 index 000000000000..5e7d3703e62e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponse.java @@ -0,0 +1,714 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The response for
+ * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.RejectHubSpokeResponse} + */ +public final class RejectHubSpokeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) + RejectHubSpokeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RejectHubSpokeResponse.newBuilder() to construct. + private RejectHubSpokeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RejectHubSpokeResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RejectHubSpokeResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.Builder.class); + } + + public static final int SPOKE_FIELD_NUMBER = 1; + private com.google.cloud.networkconnectivity.v1.Spoke spoke_; + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return spoke_ != null; + } + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (spoke_ != null) { + output.writeMessage(1, getSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (spoke_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpoke()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse other = + (com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) obj; + + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response for
+   * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.RejectHubSpokeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RejectHubSpokeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse build() { + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse buildPartial() { + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse result = + new com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse.getDefaultInstance()) + return this; + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkconnectivity.v1.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder> + spokeBuilder_; + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000001); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSpokeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance() + : spoke_; + } + } + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder> + getSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke, + com.google.cloud.networkconnectivity.v1.Spoke.Builder, + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) + private static final com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse(); + } + + public static com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RejectHubSpokeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponseOrBuilder.java new file mode 100644 index 000000000000..4f00699d46eb --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RejectHubSpokeResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface RejectHubSpokeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.RejectHubSpokeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1.Spoke getSpoke(); + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Route.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Route.java new file mode 100644 index 000000000000..521b1802b81c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Route.java @@ -0,0 +1,3155 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * A route defines a path from VM instances within a spoke to a specific
+ * destination resource. Only VPC spokes have routes.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.Route} + */ +public final class Route extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.Route) + RouteOrBuilder { + private static final long serialVersionUID = 0L; + // Use Route.newBuilder() to construct. + private Route(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Route() { + name_ = ""; + ipCidrRange_ = ""; + type_ = 0; + description_ = ""; + uid_ = ""; + state_ = 0; + spoke_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Route(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Route_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Route_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Route.class, + com.google.cloud.networkconnectivity.v1.Route.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int IP_CIDR_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipCidrRange_ = ""; + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The ipCidrRange. + */ + @java.lang.Override + public java.lang.String getIpCidrRange() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipCidrRange_ = s; + return s; + } + } + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The bytes for ipCidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpCidrRangeBytes() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipCidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 10; + private int type_ = 0; + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteType getType() { + com.google.cloud.networkconnectivity.v1.RouteType result = + com.google.cloud.networkconnectivity.v1.RouteType.forNumber(type_); + return result == null ? com.google.cloud.networkconnectivity.v1.RouteType.UNRECOGNIZED : result; + } + + public static final int NEXT_HOP_VPC_NETWORK_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork nextHopVpcNetwork_; + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpcNetwork field is set. + */ + @java.lang.Override + public boolean hasNextHopVpcNetwork() { + return nextHopVpcNetwork_ != null; + } + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpcNetwork. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork getNextHopVpcNetwork() { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder + getNextHopVpcNetworkOrBuilder() { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Route_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + + public static final int SPOKE_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object spoke_ = ""; + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The spoke. + */ + @java.lang.Override + public java.lang.String getSpoke() { + java.lang.Object ref = spoke_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spoke_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spoke. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeBytes() { + java.lang.Object ref = spoke_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Output only. The location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipCidrRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ipCidrRange_); + } + if (nextHopVpcNetwork_ != null) { + output.writeMessage(2, getNextHopVpcNetwork()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (type_ + != com.google.cloud.networkconnectivity.v1.RouteType.ROUTE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spoke_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, spoke_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipCidrRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ipCidrRange_); + } + if (nextHopVpcNetwork_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNextHopVpcNetwork()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (type_ + != com.google.cloud.networkconnectivity.v1.RouteType.ROUTE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(spoke_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, spoke_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, location_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.Route)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.Route other = + (com.google.cloud.networkconnectivity.v1.Route) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getIpCidrRange().equals(other.getIpCidrRange())) return false; + if (type_ != other.type_) return false; + if (hasNextHopVpcNetwork() != other.hasNextHopVpcNetwork()) return false; + if (hasNextHopVpcNetwork()) { + if (!getNextHopVpcNetwork().equals(other.getNextHopVpcNetwork())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) return false; + if (state_ != other.state_) return false; + if (!getSpoke().equals(other.getSpoke())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + IP_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpCidrRange().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasNextHopVpcNetwork()) { + hash = (37 * hash) + NEXT_HOP_VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNextHopVpcNetwork().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Route parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1.Route prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A route defines a path from VM instances within a spoke to a specific
+   * destination resource. Only VPC spokes have routes.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.Route} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.Route) + com.google.cloud.networkconnectivity.v1.RouteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Route_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Route_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Route.class, + com.google.cloud.networkconnectivity.v1.Route.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.Route.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + ipCidrRange_ = ""; + type_ = 0; + nextHopVpcNetwork_ = null; + if (nextHopVpcNetworkBuilder_ != null) { + nextHopVpcNetworkBuilder_.dispose(); + nextHopVpcNetworkBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uid_ = ""; + state_ = 0; + spoke_ = ""; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Route_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Route getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.Route.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Route build() { + com.google.cloud.networkconnectivity.v1.Route result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Route buildPartial() { + com.google.cloud.networkconnectivity.v1.Route result = + new com.google.cloud.networkconnectivity.v1.Route(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.Route result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ipCidrRange_ = ipCidrRange_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.nextHopVpcNetwork_ = + nextHopVpcNetworkBuilder_ == null + ? nextHopVpcNetwork_ + : nextHopVpcNetworkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.spoke_ = spoke_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.location_ = location_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.Route) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.Route) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.Route other) { + if (other == com.google.cloud.networkconnectivity.v1.Route.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getIpCidrRange().isEmpty()) { + ipCidrRange_ = other.ipCidrRange_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasNextHopVpcNetwork()) { + mergeNextHopVpcNetwork(other.getNextHopVpcNetwork()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getSpoke().isEmpty()) { + spoke_ = other.spoke_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000800; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + input.readMessage( + getNextHopVpcNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 80: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 80 + case 90: + { + spoke_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object ipCidrRange_ = ""; + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @return The ipCidrRange. + */ + public java.lang.String getIpCidrRange() { + java.lang.Object ref = ipCidrRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipCidrRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @return The bytes for ipCidrRange. + */ + public com.google.protobuf.ByteString getIpCidrRangeBytes() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipCidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @param value The ipCidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpCidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRange_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpCidrRange() { + ipCidrRange_ = getDefaultInstance().getIpCidrRange(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @param value The bytes for ipCidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpCidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRange_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteType getType() { + com.google.cloud.networkconnectivity.v1.RouteType result = + com.google.cloud.networkconnectivity.v1.RouteType.forNumber(type_); + return result == null + ? com.google.cloud.networkconnectivity.v1.RouteType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.networkconnectivity.v1.RouteType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork nextHopVpcNetwork_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder> + nextHopVpcNetworkBuilder_; + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpcNetwork field is set. + */ + public boolean hasNextHopVpcNetwork() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpcNetwork. + */ + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork getNextHopVpcNetwork() { + if (nextHopVpcNetworkBuilder_ == null) { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } else { + return nextHopVpcNetworkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopVpcNetwork( + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork value) { + if (nextHopVpcNetworkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextHopVpcNetwork_ = value; + } else { + nextHopVpcNetworkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopVpcNetwork( + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder builderForValue) { + if (nextHopVpcNetworkBuilder_ == null) { + nextHopVpcNetwork_ = builderForValue.build(); + } else { + nextHopVpcNetworkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeNextHopVpcNetwork( + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork value) { + if (nextHopVpcNetworkBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && nextHopVpcNetwork_ != null + && nextHopVpcNetwork_ + != com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance()) { + getNextHopVpcNetworkBuilder().mergeFrom(value); + } else { + nextHopVpcNetwork_ = value; + } + } else { + nextHopVpcNetworkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearNextHopVpcNetwork() { + bitField0_ = (bitField0_ & ~0x00000020); + nextHopVpcNetwork_ = null; + if (nextHopVpcNetworkBuilder_ != null) { + nextHopVpcNetworkBuilder_.dispose(); + nextHopVpcNetworkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder + getNextHopVpcNetworkBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getNextHopVpcNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder + getNextHopVpcNetworkOrBuilder() { + if (nextHopVpcNetworkBuilder_ != null) { + return nextHopVpcNetworkBuilder_.getMessageOrBuilder(); + } else { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } + } + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder> + getNextHopVpcNetworkFieldBuilder() { + if (nextHopVpcNetworkBuilder_ == null) { + nextHopVpcNetworkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder>( + getNextHopVpcNetwork(), getParentForChildren(), isClean()); + nextHopVpcNetwork_ = null; + } + return nextHopVpcNetworkBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object spoke_ = ""; + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The spoke. + */ + public java.lang.String getSpoke() { + java.lang.Object ref = spoke_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spoke_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spoke. + */ + public com.google.protobuf.ByteString getSpokeBytes() { + java.lang.Object ref = spoke_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The spoke to set. + * @return This builder for chaining. + */ + public Builder setSpoke(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpoke() { + spoke_ = getDefaultInstance().getSpoke(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spoke to set. + * @return This builder for chaining. + */ + public Builder setSpokeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spoke_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Output only. The location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.Route) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.Route) + private static final com.google.cloud.networkconnectivity.v1.Route DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.Route(); + } + + public static com.google.cloud.networkconnectivity.v1.Route getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Route parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Route getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteOrBuilder.java new file mode 100644 index 000000000000..358e33fcd70f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteOrBuilder.java @@ -0,0 +1,441 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface RouteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.Route) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The ipCidrRange. + */ + java.lang.String getIpCidrRange(); + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The bytes for ipCidrRange. + */ + com.google.protobuf.ByteString getIpCidrRangeBytes(); + + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.networkconnectivity.v1.RouteType getType(); + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpcNetwork field is set. + */ + boolean hasNextHopVpcNetwork(); + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpcNetwork. + */ + com.google.cloud.networkconnectivity.v1.NextHopVpcNetwork getNextHopVpcNetwork(); + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.networkconnectivity.v1.NextHopVpcNetworkOrBuilder + getNextHopVpcNetworkOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1.State getState(); + + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The spoke. + */ + java.lang.String getSpoke(); + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spoke. + */ + com.google.protobuf.ByteString getSpokeBytes(); + + /** + * + * + *
+   * Output only. The location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Output only. The location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTable.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTable.java new file mode 100644 index 000000000000..bd4e43a93dfc --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTable.java @@ -0,0 +1,2085 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** Protobuf type {@code google.cloud.networkconnectivity.v1.RouteTable} */ +public final class RouteTable extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.RouteTable) + RouteTableOrBuilder { + private static final long serialVersionUID = 0L; + // Use RouteTable.newBuilder() to construct. + private RouteTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RouteTable() { + name_ = ""; + description_ = ""; + uid_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RouteTable(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RouteTable_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RouteTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.RouteTable.class, + com.google.cloud.networkconnectivity.v1.RouteTable.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RouteTable_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.RouteTable)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.RouteTable other = + (com.google.cloud.networkconnectivity.v1.RouteTable) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1.RouteTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.networkconnectivity.v1.RouteTable} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.RouteTable) + com.google.cloud.networkconnectivity.v1.RouteTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RouteTable_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RouteTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.RouteTable.class, + com.google.cloud.networkconnectivity.v1.RouteTable.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.RouteTable.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uid_ = ""; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_RouteTable_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteTable getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.RouteTable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteTable build() { + com.google.cloud.networkconnectivity.v1.RouteTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteTable buildPartial() { + com.google.cloud.networkconnectivity.v1.RouteTable result = + new com.google.cloud.networkconnectivity.v1.RouteTable(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.RouteTable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.RouteTable) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.RouteTable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.RouteTable other) { + if (other == com.google.cloud.networkconnectivity.v1.RouteTable.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.RouteTable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.RouteTable) + private static final com.google.cloud.networkconnectivity.v1.RouteTable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.RouteTable(); + } + + public static com.google.cloud.networkconnectivity.v1.RouteTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouteTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.RouteTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableName.java new file mode 100644 index 000000000000..1572640226f2 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2023 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RouteTableName implements ResourceName { + private static final PathTemplate PROJECT_HUB_ROUTE_TABLE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}"); + private volatile Map fieldValuesMap; + private final String project; + private final String hub; + private final String routeTable; + + @Deprecated + protected RouteTableName() { + project = null; + hub = null; + routeTable = null; + } + + private RouteTableName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + routeTable = Preconditions.checkNotNull(builder.getRouteTable()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RouteTableName of(String project, String hub, String routeTable) { + return newBuilder().setProject(project).setHub(hub).setRouteTable(routeTable).build(); + } + + public static String format(String project, String hub, String routeTable) { + return newBuilder() + .setProject(project) + .setHub(hub) + .setRouteTable(routeTable) + .build() + .toString(); + } + + public static RouteTableName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB_ROUTE_TABLE.validatedMatch( + formattedString, "RouteTableName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("hub"), matchMap.get("route_table")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RouteTableName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB_ROUTE_TABLE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (hub != null) { + fieldMapBuilder.put("hub", hub); + } + if (routeTable != null) { + fieldMapBuilder.put("route_table", routeTable); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB_ROUTE_TABLE.instantiate( + "project", project, "hub", hub, "route_table", routeTable); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RouteTableName that = ((RouteTableName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.hub, that.hub) + && Objects.equals(this.routeTable, that.routeTable); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + h *= 1000003; + h ^= Objects.hashCode(routeTable); + return h; + } + + /** Builder for projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}. */ + public static class Builder { + private String project; + private String hub; + private String routeTable; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + public Builder setRouteTable(String routeTable) { + this.routeTable = routeTable; + return this; + } + + private Builder(RouteTableName routeTableName) { + this.project = routeTableName.project; + this.hub = routeTableName.hub; + this.routeTable = routeTableName.routeTable; + } + + public RouteTableName build() { + return new RouteTableName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableOrBuilder.java new file mode 100644 index 000000000000..1ea4b05f94f7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteTableOrBuilder.java @@ -0,0 +1,283 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface RouteTableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.RouteTable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   *      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1.State getState(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteType.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteType.java new file mode 100644 index 000000000000..7728492f5c9e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/RouteType.java @@ -0,0 +1,180 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The route's type
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1.RouteType} + */ +public enum RouteType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No route type information specified
+   * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + ROUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * The route leads to a destination within the primary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_PRIMARY_SUBNET = 1; + */ + VPC_PRIMARY_SUBNET(1), + /** + * + * + *
+   * The route leads to a destination within the secondary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_SECONDARY_SUBNET = 2; + */ + VPC_SECONDARY_SUBNET(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * No route type information specified
+   * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The route leads to a destination within the primary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_PRIMARY_SUBNET = 1; + */ + public static final int VPC_PRIMARY_SUBNET_VALUE = 1; + /** + * + * + *
+   * The route leads to a destination within the secondary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_SECONDARY_SUBNET = 2; + */ + public static final int VPC_SECONDARY_SUBNET_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RouteType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RouteType forNumber(int value) { + switch (value) { + case 0: + return ROUTE_TYPE_UNSPECIFIED; + case 1: + return VPC_PRIMARY_SUBNET; + case 2: + return VPC_SECONDARY_SUBNET; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RouteType findValueByNumber(int number) { + return RouteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto.getDescriptor().getEnumTypes().get(1); + } + + private static final RouteType[] VALUES = values(); + + public static RouteType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RouteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1.RouteType) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Spoke.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Spoke.java index 71ac42579ee0..b2b3fe9ba702 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Spoke.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/Spoke.java @@ -22,15 +22,16 @@ * * *
- * A Network Connectivity Center spoke represents a connection between your
- * Google Cloud network resources and a non-Google-Cloud network.
+ * A Network Connectivity Center spoke represents one or more network
+ * connectivity resources.
  *
- * When you create a spoke, you associate it with a hub. You must also identify
- * a value for exactly one of the following fields:
+ * When you create a spoke, you associate it with a hub. You must also
+ * identify a value for exactly one of the following fields:
  *
  * * linked_vpn_tunnels
  * * linked_interconnect_attachments
  * * linked_router_appliance_instances
+ * * linked_vpc_network
  * 
* * Protobuf type {@code google.cloud.networkconnectivity.v1.Spoke} @@ -49,8 +50,11 @@ private Spoke() { name_ = ""; description_ = ""; hub_ = ""; + group_ = ""; uniqueId_ = ""; state_ = 0; + reasons_ = java.util.Collections.emptyList(); + spokeType_ = 0; } @java.lang.Override @@ -85,572 +89,1528 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.networkconnectivity.v1.Spoke.Builder.class); } - public static final int NAME_FIELD_NUMBER = 1; + public interface StateReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.Spoke.StateReason) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Immutable. The name of the spoke. Spoke names must be unique. They use the
-   * following form:
-   *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return The code. + */ + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code getCode(); + + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The userDetails. + */ + java.lang.String getUserDetails(); + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The bytes for userDetails. + */ + com.google.protobuf.ByteString getUserDetailsBytes(); } /** * * *
-   * Immutable. The name of the spoke. Spoke names must be unique. They use the
-   * following form:
-   *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+   * The reason a spoke is inactive.
    * 
* - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. + * Protobuf type {@code google.cloud.networkconnectivity.v1.Spoke.StateReason} */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class StateReason extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.Spoke.StateReason) + StateReasonOrBuilder { + private static final long serialVersionUID = 0L; + // Use StateReason.newBuilder() to construct. + private StateReason(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time the spoke was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. The time the spoke was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The time the spoke was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + private StateReason() { + code_ = 0; + message_ = ""; + userDetails_ = ""; + } - public static final int UPDATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time the spoke was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. The time the spoke was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The time the spoke was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StateReason(); + } - public static final int LABELS_FIELD_NUMBER = 4; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_descriptor; + } - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.networkconnectivity.v1.HubProto - .internal_static_google_cloud_networkconnectivity_v1_Spoke_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.class, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder.class); + } - @SuppressWarnings("serial") - private com.google.protobuf.MapField labels_; + /** + * + * + *
+     * The Code enum represents the various reasons a state can be `INACTIVE`.
+     * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1.Spoke.StateReason.Code} + */ + public enum Code implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * No information available.
+       * 
+ * + * CODE_UNSPECIFIED = 0; + */ + CODE_UNSPECIFIED(0), + /** + * + * + *
+       * The proposed spoke is pending review.
+       * 
+ * + * PENDING_REVIEW = 1; + */ + PENDING_REVIEW(1), + /** + * + * + *
+       * The proposed spoke has been rejected by the hub administrator.
+       * 
+ * + * REJECTED = 2; + */ + REJECTED(2), + /** + * + * + *
+       * The spoke has been deactivated internally.
+       * 
+ * + * PAUSED = 3; + */ + PAUSED(3), + /** + * + * + *
+       * Network Connectivity Center encountered errors while accepting
+       * the spoke.
+       * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + /** + * + * + *
+       * No information available.
+       * 
+ * + * CODE_UNSPECIFIED = 0; + */ + public static final int CODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The proposed spoke is pending review.
+       * 
+ * + * PENDING_REVIEW = 1; + */ + public static final int PENDING_REVIEW_VALUE = 1; + /** + * + * + *
+       * The proposed spoke has been rejected by the hub administrator.
+       * 
+ * + * REJECTED = 2; + */ + public static final int REJECTED_VALUE = 2; + /** + * + * + *
+       * The spoke has been deactivated internally.
+       * 
+ * + * PAUSED = 3; + */ + public static final int PAUSED_VALUE = 3; + /** + * + * + *
+       * Network Connectivity Center encountered errors while accepting
+       * the spoke.
+       * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Code valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Code forNumber(int value) { + switch (value) { + case 0: + return CODE_UNSPECIFIED; + case 1: + return PENDING_REVIEW; + case 2: + return REJECTED; + case 3: + return PAUSED; + case 4: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Code findValueByNumber(int number) { + return Code.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.Spoke.StateReason.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Code[] VALUES = values(); + + public static Code valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Code(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1.Spoke.StateReason.Code) } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
-   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
-   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
-   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code getCode() { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.forNumber(code_); + return result == null + ? com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.UNRECOGNIZED + : result; } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
-   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
-   * 
- * - * map<string, string> labels = 4; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - return map.get(key); - } - public static final int DESCRIPTION_FIELD_NUMBER = 5; + public static final int USER_DETAILS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; - /** - * - * - *
-   * An optional description of the spoke.
-   * 
- * - * string description = 5; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; + @SuppressWarnings("serial") + private volatile java.lang.Object userDetails_ = ""; + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The userDetails. + */ + @java.lang.Override + public java.lang.String getUserDetails() { + java.lang.Object ref = userDetails_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDetails_ = s; + return s; + } } - } - /** - * - * - *
-   * An optional description of the spoke.
-   * 
- * - * string description = 5; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The bytes for userDetails. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserDetailsBytes() { + java.lang.Object ref = userDetails_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userDetails_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - } - public static final int HUB_FIELD_NUMBER = 6; + private byte memoizedIsInitialized = -1; - @SuppressWarnings("serial") - private volatile java.lang.Object hub_ = ""; - /** - * - * - *
-   * Immutable. The name of the hub that this spoke is attached to.
-   * 
- * - * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The hub. - */ - @java.lang.Override - public java.lang.String getHub() { - java.lang.Object ref = hub_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hub_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. The name of the hub that this spoke is attached to.
-   * 
- * - * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for hub. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHubBytes() { - java.lang.Object ref = hub_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - hub_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - } - public static final int LINKED_VPN_TUNNELS_FIELD_NUMBER = 17; - private com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels linkedVpnTunnels_; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (code_ + != com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userDetails_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userDetails_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ + != com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userDetails_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userDetails_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.Spoke.StateReason)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.Spoke.StateReason other = + (com.google.cloud.networkconnectivity.v1.Spoke.StateReason) obj; + + if (code_ != other.code_) return false; + if (!getMessage().equals(other.getMessage())) return false; + if (!getUserDetails().equals(other.getUserDetails())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + USER_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getUserDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The reason a spoke is inactive.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.Spoke.StateReason} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.Spoke.StateReason) + com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.class, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.Spoke.StateReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + message_ = ""; + userDetails_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_StateReason_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.Spoke.StateReason.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason build() { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason buildPartial() { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason result = + new com.google.cloud.networkconnectivity.v1.Spoke.StateReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.Spoke.StateReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userDetails_ = userDetails_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.Spoke.StateReason) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.Spoke.StateReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.Spoke.StateReason other) { + if (other == com.google.cloud.networkconnectivity.v1.Spoke.StateReason.getDefaultInstance()) + return this; + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserDetails().isEmpty()) { + userDetails_ = other.userDetails_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + code_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + userDetails_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int code_ = 0; + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code getCode() { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.forNumber(code_); + return result == null + ? com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + code_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userDetails_ = ""; + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @return The userDetails. + */ + public java.lang.String getUserDetails() { + java.lang.Object ref = userDetails_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDetails_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @return The bytes for userDetails. + */ + public com.google.protobuf.ByteString getUserDetailsBytes() { + java.lang.Object ref = userDetails_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userDetails_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @param value The userDetails to set. + * @return This builder for chaining. + */ + public Builder setUserDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userDetails_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserDetails() { + userDetails_ = getDefaultInstance().getUserDetails(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @param value The bytes for userDetails to set. + * @return This builder for chaining. + */ + public Builder setUserDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userDetails_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.Spoke.StateReason) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.Spoke.StateReason) + private static final com.google.cloud.networkconnectivity.v1.Spoke.StateReason DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.Spoke.StateReason(); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke.StateReason getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StateReason parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * * *
-   * VPN tunnels that are associated with the spoke.
+   * Immutable. The name of the spoke. Spoke names must be unique. They use the
+   * following form:
+   *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
    * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return Whether the linkedVpnTunnels field is set. + * @return The name. */ @java.lang.Override - public boolean hasLinkedVpnTunnels() { - return linkedVpnTunnels_ != null; + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } } /** * * *
-   * VPN tunnels that are associated with the spoke.
+   * Immutable. The name of the spoke. Spoke names must be unique. They use the
+   * following form:
+   *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
    * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; * - * @return The linkedVpnTunnels. + * @return The bytes for name. */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels getLinkedVpnTunnels() { - return linkedVpnTunnels_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() - : linkedVpnTunnels_; - } - /** - * - * - *
-   * VPN tunnels that are associated with the spoke.
-   * 
- * - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - */ - @java.lang.Override - public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder - getLinkedVpnTunnelsOrBuilder() { - return linkedVpnTunnels_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() - : linkedVpnTunnels_; + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static final int LINKED_INTERCONNECT_ATTACHMENTS_FIELD_NUMBER = 18; - private com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - linkedInterconnectAttachments_; + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; /** * * *
-   * VLAN attachments that are associated with the spoke.
+   * Output only. The time the spoke was created.
    * 
* - * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the linkedInterconnectAttachments field is set. + * @return Whether the createTime field is set. */ @java.lang.Override - public boolean hasLinkedInterconnectAttachments() { - return linkedInterconnectAttachments_ != null; + public boolean hasCreateTime() { + return createTime_ != null; } /** * * *
-   * VLAN attachments that are associated with the spoke.
+   * Output only. The time the spoke was created.
    * 
* - * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The linkedInterconnectAttachments. + * @return The createTime. */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - getLinkedInterconnectAttachments() { - return linkedInterconnectAttachments_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.getDefaultInstance() - : linkedInterconnectAttachments_; + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
-   * VLAN attachments that are associated with the spoke.
+   * Output only. The time the spoke was created.
    * 
* - * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder - getLinkedInterconnectAttachmentsOrBuilder() { - return linkedInterconnectAttachments_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.getDefaultInstance() - : linkedInterconnectAttachments_; + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } - public static final int LINKED_ROUTER_APPLIANCE_INSTANCES_FIELD_NUMBER = 19; - private com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - linkedRouterApplianceInstances_; + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; /** * * *
-   * Router appliance instances that are associated with the spoke.
+   * Output only. The time the spoke was last updated.
    * 
* - * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the linkedRouterApplianceInstances field is set. + * @return Whether the updateTime field is set. */ @java.lang.Override - public boolean hasLinkedRouterApplianceInstances() { - return linkedRouterApplianceInstances_ != null; + public boolean hasUpdateTime() { + return updateTime_ != null; } /** * * *
-   * Router appliance instances that are associated with the spoke.
+   * Output only. The time the spoke was last updated.
    * 
* - * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The linkedRouterApplianceInstances. + * @return The updateTime. */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - getLinkedRouterApplianceInstances() { - return linkedRouterApplianceInstances_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - .getDefaultInstance() - : linkedRouterApplianceInstances_; + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } /** * * *
-   * Router appliance instances that are associated with the spoke.
+   * Output only. The time the spoke was last updated.
    * 
* - * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder - getLinkedRouterApplianceInstancesOrBuilder() { - return linkedRouterApplianceInstances_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - .getDefaultInstance() - : linkedRouterApplianceInstances_; + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } - public static final int UNIQUE_ID_FIELD_NUMBER = 11; + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } @SuppressWarnings("serial") - private volatile java.lang.Object uniqueId_ = ""; + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } /** * * *
-   * Output only. The Google-generated UUID for the spoke. This value is unique
-   * across all spoke resources. If a spoke is deleted and another with the same
-   * name is created, the new spoke is assigned a different unique_id.
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** * - * @return The uniqueId. + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; */ @java.lang.Override - public java.lang.String getUniqueId() { - java.lang.Object ref = uniqueId_; + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * An optional description of the spoke.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - uniqueId_ = s; + description_ = s; return s; } } @@ -658,373 +1618,938 @@ public java.lang.String getUniqueId() { * * *
-   * Output only. The Google-generated UUID for the spoke. This value is unique
-   * across all spoke resources. If a spoke is deleted and another with the same
-   * name is created, the new spoke is assigned a different unique_id.
+   * An optional description of the spoke.
    * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string description = 5; * - * @return The bytes for uniqueId. + * @return The bytes for description. */ @java.lang.Override - public com.google.protobuf.ByteString getUniqueIdBytes() { - java.lang.Object ref = uniqueId_; + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uniqueId_ = b; + description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int STATE_FIELD_NUMBER = 15; - private int state_ = 0; + public static final int HUB_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object hub_ = ""; /** * * *
-   * Output only. The current lifecycle state of this spoke.
+   * Immutable. The name of the hub that this spoke is attached to.
    * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * * - * @return The enum numeric value on the wire for state. + * @return The hub. */ @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * + public java.lang.String getHub() { + java.lang.Object ref = hub_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hub_ = s; + return s; + } + } + /** + * + * *
-   * Output only. The current lifecycle state of this spoke.
+   * Immutable. The name of the hub that this spoke is attached to.
    * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * * - * @return The state. + * @return The bytes for hub. */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.State getState() { - com.google.cloud.networkconnectivity.v1.State result = - com.google.cloud.networkconnectivity.v1.State.forNumber(state_); - return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + public com.google.protobuf.ByteString getHubBytes() { + java.lang.Object ref = hub_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private byte memoizedIsInitialized = -1; + public static final int GROUP_FIELD_NUMBER = 23; + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } } - + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(3, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hub_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hub_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uniqueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, uniqueId_); - } - if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(15, state_); - } - if (linkedVpnTunnels_ != null) { - output.writeMessage(17, getLinkedVpnTunnels()); - } - if (linkedInterconnectAttachments_ != null) { - output.writeMessage(18, getLinkedInterconnectAttachments()); - } - if (linkedRouterApplianceInstances_ != null) { - output.writeMessage(19, getLinkedRouterApplianceInstances()); + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - getUnknownFields().writeTo(output); } + public static final int LINKED_VPN_TUNNELS_FIELD_NUMBER = 17; + private com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels linkedVpnTunnels_; + /** + * + * + *
+   * VPN tunnels that are associated with the spoke.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * + * @return Whether the linkedVpnTunnels field is set. + */ @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hub_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hub_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uniqueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, uniqueId_); - } - if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, state_); - } - if (linkedVpnTunnels_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getLinkedVpnTunnels()); - } - if (linkedInterconnectAttachments_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 18, getLinkedInterconnectAttachments()); - } - if (linkedRouterApplianceInstances_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 19, getLinkedRouterApplianceInstances()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + public boolean hasLinkedVpnTunnels() { + return linkedVpnTunnels_ != null; } - + /** + * + * + *
+   * VPN tunnels that are associated with the spoke.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * + * @return The linkedVpnTunnels. + */ @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.networkconnectivity.v1.Spoke)) { - return super.equals(obj); - } - com.google.cloud.networkconnectivity.v1.Spoke other = - (com.google.cloud.networkconnectivity.v1.Spoke) obj; - - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getHub().equals(other.getHub())) return false; - if (hasLinkedVpnTunnels() != other.hasLinkedVpnTunnels()) return false; - if (hasLinkedVpnTunnels()) { - if (!getLinkedVpnTunnels().equals(other.getLinkedVpnTunnels())) return false; - } - if (hasLinkedInterconnectAttachments() != other.hasLinkedInterconnectAttachments()) - return false; - if (hasLinkedInterconnectAttachments()) { - if (!getLinkedInterconnectAttachments().equals(other.getLinkedInterconnectAttachments())) - return false; - } - if (hasLinkedRouterApplianceInstances() != other.hasLinkedRouterApplianceInstances()) - return false; - if (hasLinkedRouterApplianceInstances()) { - if (!getLinkedRouterApplianceInstances().equals(other.getLinkedRouterApplianceInstances())) - return false; - } - if (!getUniqueId().equals(other.getUniqueId())) return false; - if (state_ != other.state_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels getLinkedVpnTunnels() { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; } - + /** + * + * + *
+   * VPN tunnels that are associated with the spoke.
+   * 
+ * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + */ @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + HUB_FIELD_NUMBER; - hash = (53 * hash) + getHub().hashCode(); - if (hasLinkedVpnTunnels()) { - hash = (37 * hash) + LINKED_VPN_TUNNELS_FIELD_NUMBER; - hash = (53 * hash) + getLinkedVpnTunnels().hashCode(); - } - if (hasLinkedInterconnectAttachments()) { - hash = (37 * hash) + LINKED_INTERCONNECT_ATTACHMENTS_FIELD_NUMBER; - hash = (53 * hash) + getLinkedInterconnectAttachments().hashCode(); - } - if (hasLinkedRouterApplianceInstances()) { - hash = (37 * hash) + LINKED_ROUTER_APPLIANCE_INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getLinkedRouterApplianceInstances().hashCode(); - } - hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getUniqueId().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder + getLinkedVpnTunnelsOrBuilder() { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; } - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static final int LINKED_INTERCONNECT_ATTACHMENTS_FIELD_NUMBER = 18; + private com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + linkedInterconnectAttachments_; + /** + * + * + *
+   * VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * + * + * @return Whether the linkedInterconnectAttachments field is set. + */ + @java.lang.Override + public boolean hasLinkedInterconnectAttachments() { + return linkedInterconnectAttachments_ != null; } - - public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
+   * VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * + * + * @return The linkedInterconnectAttachments. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + getLinkedInterconnectAttachments() { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.getDefaultInstance() + : linkedInterconnectAttachments_; } - + /** + * + * + *
+   * VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * + */ @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder + getLinkedInterconnectAttachmentsOrBuilder() { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.getDefaultInstance() + : linkedInterconnectAttachments_; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + public static final int LINKED_ROUTER_APPLIANCE_INSTANCES_FIELD_NUMBER = 19; + private com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + linkedRouterApplianceInstances_; + /** + * + * + *
+   * Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * + * + * @return Whether the linkedRouterApplianceInstances field is set. + */ + @java.lang.Override + public boolean hasLinkedRouterApplianceInstances() { + return linkedRouterApplianceInstances_ != null; } - - public static Builder newBuilder(com.google.cloud.networkconnectivity.v1.Spoke prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+   * Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * + * + * @return The linkedRouterApplianceInstances. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + getLinkedRouterApplianceInstances() { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; } - + /** + * + * + *
+   * Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * + */ @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder + getLinkedRouterApplianceInstancesOrBuilder() { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; } + public static final int LINKED_VPC_NETWORK_FIELD_NUMBER = 20; + private com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork linkedVpcNetwork_; + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpcNetwork field is set. + */ @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public boolean hasLinkedVpcNetwork() { + return linkedVpcNetwork_ != null; } /** * * *
-   * A Network Connectivity Center spoke represents a connection between your
-   * Google Cloud network resources and a non-Google-Cloud network.
+   * Optional. VPC network that is associated with the spoke.
+   * 
* - * When you create a spoke, you associate it with a hub. You must also identify - * a value for exactly one of the following fields: + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * - * * linked_vpn_tunnels - * * linked_interconnect_attachments - * * linked_router_appliance_instances + * @return The linkedVpcNetwork. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork getLinkedVpcNetwork() { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; + } + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
    * 
* - * Protobuf type {@code google.cloud.networkconnectivity.v1.Spoke} + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder + getLinkedVpcNetworkOrBuilder() { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; + } + + public static final int UNIQUE_ID_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object uniqueId_ = ""; + /** + * + * + *
+   * Output only. The Google-generated UUID for the spoke. This value is unique
+   * across all spoke resources. If a spoke is deleted and another with the same
+   * name is created, the new spoke is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + @java.lang.Override + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Google-generated UUID for the spoke. This value is unique
+   * across all spoke resources. If a spoke is deleted and another with the same
+   * name is created, the new spoke is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 15; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current lifecycle state of this spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current lifecycle state of this spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + + public static final int REASONS_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private java.util.List reasons_; + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getReasonsList() { + return reasons_; + } + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder> + getReasonsOrBuilderList() { + return reasons_; + } + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getReasonsCount() { + return reasons_.size(); + } + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason getReasons(int index) { + return reasons_.get(index); + } + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder getReasonsOrBuilder( + int index) { + return reasons_.get(index); + } + + public static final int SPOKE_TYPE_FIELD_NUMBER = 22; + private int spokeType_ = 0; + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1.SpokeType result = + com.google.cloud.networkconnectivity.v1.SpokeType.forNumber(spokeType_); + return result == null ? com.google.cloud.networkconnectivity.v1.SpokeType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hub_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, hub_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uniqueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(15, state_); + } + if (linkedVpnTunnels_ != null) { + output.writeMessage(17, getLinkedVpnTunnels()); + } + if (linkedInterconnectAttachments_ != null) { + output.writeMessage(18, getLinkedInterconnectAttachments()); + } + if (linkedRouterApplianceInstances_ != null) { + output.writeMessage(19, getLinkedRouterApplianceInstances()); + } + if (linkedVpcNetwork_ != null) { + output.writeMessage(20, getLinkedVpcNetwork()); + } + for (int i = 0; i < reasons_.size(); i++) { + output.writeMessage(21, reasons_.get(i)); + } + if (spokeType_ + != com.google.cloud.networkconnectivity.v1.SpokeType.SPOKE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(22, spokeType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, group_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hub_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, hub_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uniqueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, state_); + } + if (linkedVpnTunnels_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getLinkedVpnTunnels()); + } + if (linkedInterconnectAttachments_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getLinkedInterconnectAttachments()); + } + if (linkedRouterApplianceInstances_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, getLinkedRouterApplianceInstances()); + } + if (linkedVpcNetwork_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getLinkedVpcNetwork()); + } + for (int i = 0; i < reasons_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, reasons_.get(i)); + } + if (spokeType_ + != com.google.cloud.networkconnectivity.v1.SpokeType.SPOKE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, spokeType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, group_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.Spoke)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.Spoke other = + (com.google.cloud.networkconnectivity.v1.Spoke) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getHub().equals(other.getHub())) return false; + if (!getGroup().equals(other.getGroup())) return false; + if (hasLinkedVpnTunnels() != other.hasLinkedVpnTunnels()) return false; + if (hasLinkedVpnTunnels()) { + if (!getLinkedVpnTunnels().equals(other.getLinkedVpnTunnels())) return false; + } + if (hasLinkedInterconnectAttachments() != other.hasLinkedInterconnectAttachments()) + return false; + if (hasLinkedInterconnectAttachments()) { + if (!getLinkedInterconnectAttachments().equals(other.getLinkedInterconnectAttachments())) + return false; + } + if (hasLinkedRouterApplianceInstances() != other.hasLinkedRouterApplianceInstances()) + return false; + if (hasLinkedRouterApplianceInstances()) { + if (!getLinkedRouterApplianceInstances().equals(other.getLinkedRouterApplianceInstances())) + return false; + } + if (hasLinkedVpcNetwork() != other.hasLinkedVpcNetwork()) return false; + if (hasLinkedVpcNetwork()) { + if (!getLinkedVpcNetwork().equals(other.getLinkedVpcNetwork())) return false; + } + if (!getUniqueId().equals(other.getUniqueId())) return false; + if (state_ != other.state_) return false; + if (!getReasonsList().equals(other.getReasonsList())) return false; + if (spokeType_ != other.spokeType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + HUB_FIELD_NUMBER; + hash = (53 * hash) + getHub().hashCode(); + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + if (hasLinkedVpnTunnels()) { + hash = (37 * hash) + LINKED_VPN_TUNNELS_FIELD_NUMBER; + hash = (53 * hash) + getLinkedVpnTunnels().hashCode(); + } + if (hasLinkedInterconnectAttachments()) { + hash = (37 * hash) + LINKED_INTERCONNECT_ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + getLinkedInterconnectAttachments().hashCode(); + } + if (hasLinkedRouterApplianceInstances()) { + hash = (37 * hash) + LINKED_ROUTER_APPLIANCE_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getLinkedRouterApplianceInstances().hashCode(); + } + if (hasLinkedVpcNetwork()) { + hash = (37 * hash) + LINKED_VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getLinkedVpcNetwork().hashCode(); + } + hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUniqueId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getReasonsCount() > 0) { + hash = (37 * hash) + REASONS_FIELD_NUMBER; + hash = (53 * hash) + getReasonsList().hashCode(); + } + hash = (37 * hash) + SPOKE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + spokeType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.Spoke parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1.Spoke prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A Network Connectivity Center spoke represents one or more network
+   * connectivity resources.
+   *
+   * When you create a spoke, you associate it with a hub. You must also
+   * identify a value for exactly one of the following fields:
+   *
+   * * linked_vpn_tunnels
+   * * linked_interconnect_attachments
+   * * linked_router_appliance_instances
+   * * linked_vpc_network
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.Spoke} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements @@ -1034,384 +2559,1409 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.networkconnectivity.v1.HubProto .internal_static_google_cloud_networkconnectivity_v1_Spoke_descriptor; } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.Spoke.class, + com.google.cloud.networkconnectivity.v1.Spoke.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.Spoke.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + hub_ = ""; + group_ = ""; + linkedVpnTunnels_ = null; + if (linkedVpnTunnelsBuilder_ != null) { + linkedVpnTunnelsBuilder_.dispose(); + linkedVpnTunnelsBuilder_ = null; + } + linkedInterconnectAttachments_ = null; + if (linkedInterconnectAttachmentsBuilder_ != null) { + linkedInterconnectAttachmentsBuilder_.dispose(); + linkedInterconnectAttachmentsBuilder_ = null; + } + linkedRouterApplianceInstances_ = null; + if (linkedRouterApplianceInstancesBuilder_ != null) { + linkedRouterApplianceInstancesBuilder_.dispose(); + linkedRouterApplianceInstancesBuilder_ = null; + } + linkedVpcNetwork_ = null; + if (linkedVpcNetworkBuilder_ != null) { + linkedVpcNetworkBuilder_.dispose(); + linkedVpcNetworkBuilder_ = null; + } + uniqueId_ = ""; + state_ = 0; + if (reasonsBuilder_ == null) { + reasons_ = java.util.Collections.emptyList(); + } else { + reasons_ = null; + reasonsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + spokeType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_Spoke_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke build() { + com.google.cloud.networkconnectivity.v1.Spoke result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke buildPartial() { + com.google.cloud.networkconnectivity.v1.Spoke result = + new com.google.cloud.networkconnectivity.v1.Spoke(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.networkconnectivity.v1.Spoke result) { + if (reasonsBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + reasons_ = java.util.Collections.unmodifiableList(reasons_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.reasons_ = reasons_; + } else { + result.reasons_ = reasonsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.Spoke result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.hub_ = hub_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.linkedVpnTunnels_ = + linkedVpnTunnelsBuilder_ == null ? linkedVpnTunnels_ : linkedVpnTunnelsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.linkedInterconnectAttachments_ = + linkedInterconnectAttachmentsBuilder_ == null + ? linkedInterconnectAttachments_ + : linkedInterconnectAttachmentsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.linkedRouterApplianceInstances_ = + linkedRouterApplianceInstancesBuilder_ == null + ? linkedRouterApplianceInstances_ + : linkedRouterApplianceInstancesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.linkedVpcNetwork_ = + linkedVpcNetworkBuilder_ == null ? linkedVpcNetwork_ : linkedVpcNetworkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.uniqueId_ = uniqueId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.spokeType_ = spokeType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.Spoke) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.Spoke) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.Spoke other) { + if (other == com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getHub().isEmpty()) { + hub_ = other.hub_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasLinkedVpnTunnels()) { + mergeLinkedVpnTunnels(other.getLinkedVpnTunnels()); + } + if (other.hasLinkedInterconnectAttachments()) { + mergeLinkedInterconnectAttachments(other.getLinkedInterconnectAttachments()); + } + if (other.hasLinkedRouterApplianceInstances()) { + mergeLinkedRouterApplianceInstances(other.getLinkedRouterApplianceInstances()); + } + if (other.hasLinkedVpcNetwork()) { + mergeLinkedVpcNetwork(other.getLinkedVpcNetwork()); + } + if (!other.getUniqueId().isEmpty()) { + uniqueId_ = other.uniqueId_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (reasonsBuilder_ == null) { + if (!other.reasons_.isEmpty()) { + if (reasons_.isEmpty()) { + reasons_ = other.reasons_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureReasonsIsMutable(); + reasons_.addAll(other.reasons_); + } + onChanged(); + } + } else { + if (!other.reasons_.isEmpty()) { + if (reasonsBuilder_.isEmpty()) { + reasonsBuilder_.dispose(); + reasonsBuilder_ = null; + reasons_ = other.reasons_; + bitField0_ = (bitField0_ & ~0x00002000); + reasonsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReasonsFieldBuilder() + : null; + } else { + reasonsBuilder_.addAllMessages(other.reasons_); + } + } + } + if (other.spokeType_ != 0) { + setSpokeTypeValue(other.getSpokeTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + hub_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 90: + { + uniqueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 90 + case 120: + { + state_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 120 + case 138: + { + input.readMessage( + getLinkedVpnTunnelsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 138 + case 146: + { + input.readMessage( + getLinkedInterconnectAttachmentsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 146 + case 154: + { + input.readMessage( + getLinkedRouterApplianceInstancesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 154 + case 162: + { + input.readMessage( + getLinkedVpcNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 162 + case 170: + { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.parser(), + extensionRegistry); + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.add(m); + } else { + reasonsBuilder_.addMessage(m); + } + break; + } // case 170 + case 176: + { + spokeType_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 176 + case 186: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 186 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; } + return updateTimeBuilder_; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } + return labels_; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.networkconnectivity.v1.HubProto - .internal_static_google_cloud_networkconnectivity_v1_Spoke_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.networkconnectivity.v1.Spoke.class, - com.google.cloud.networkconnectivity.v1.Spoke.Builder.class); + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; } - // Construct using com.google.cloud.networkconnectivity.v1.Spoke.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + public int getLabelsCount() { + return internalGetLabels().getMap().size(); } - + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - description_ = ""; - hub_ = ""; - linkedVpnTunnels_ = null; - if (linkedVpnTunnelsBuilder_ != null) { - linkedVpnTunnelsBuilder_.dispose(); - linkedVpnTunnelsBuilder_ = null; - } - linkedInterconnectAttachments_ = null; - if (linkedInterconnectAttachmentsBuilder_ != null) { - linkedInterconnectAttachmentsBuilder_.dispose(); - linkedInterconnectAttachmentsBuilder_ = null; - } - linkedRouterApplianceInstances_ = null; - if (linkedRouterApplianceInstancesBuilder_ != null) { - linkedRouterApplianceInstancesBuilder_.dispose(); - linkedRouterApplianceInstancesBuilder_ = null; + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - uniqueId_ = ""; - state_ = 0; - return this; + return internalGetLabels().getMap().containsKey(key); } - + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.networkconnectivity.v1.HubProto - .internal_static_google_cloud_networkconnectivity_v1_Spoke_descriptor; + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); } - + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.Spoke getDefaultInstanceForType() { - return com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance(); + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); } - + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.Spoke build() { - com.google.cloud.networkconnectivity.v1.Spoke result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - return result; + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } - + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.Spoke buildPartial() { - com.google.cloud.networkconnectivity.v1.Spoke result = - new com.google.cloud.networkconnectivity.v1.Spoke(this); - if (bitField0_ != 0) { - buildPartial0(result); + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - onBuilt(); - return result; + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } - private void buildPartial0(com.google.cloud.networkconnectivity.v1.Spoke result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.hub_ = hub_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.linkedVpnTunnels_ = - linkedVpnTunnelsBuilder_ == null ? linkedVpnTunnels_ : linkedVpnTunnelsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.linkedInterconnectAttachments_ = - linkedInterconnectAttachmentsBuilder_ == null - ? linkedInterconnectAttachments_ - : linkedInterconnectAttachmentsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.linkedRouterApplianceInstances_ = - linkedRouterApplianceInstancesBuilder_ == null - ? linkedRouterApplianceInstances_ - : linkedRouterApplianceInstancesBuilder_.build(); + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.uniqueId_ = uniqueId_; + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.state_ = state_; + if (value == null) { + throw new NullPointerException("map value"); } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + private java.lang.Object description_ = ""; + /** + * + * + *
+     * An optional description of the spoke.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + /** + * + * + *
+     * An optional description of the spoke.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + /** + * + * + *
+     * An optional description of the spoke.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * An optional description of the spoke.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * An optional description of the spoke.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.networkconnectivity.v1.Spoke) { - return mergeFrom((com.google.cloud.networkconnectivity.v1.Spoke) other); + private java.lang.Object hub_ = ""; + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The hub. + */ + public java.lang.String getHub() { + java.lang.Object ref = hub_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hub_ = s; + return s; } else { - super.mergeFrom(other); - return this; + return (java.lang.String) ref; } } - - public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.Spoke other) { - if (other == com.google.cloud.networkconnectivity.v1.Spoke.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000008; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (!other.getHub().isEmpty()) { - hub_ = other.hub_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.hasLinkedVpnTunnels()) { - mergeLinkedVpnTunnels(other.getLinkedVpnTunnels()); - } - if (other.hasLinkedInterconnectAttachments()) { - mergeLinkedInterconnectAttachments(other.getLinkedInterconnectAttachments()); - } - if (other.hasLinkedRouterApplianceInstances()) { - mergeLinkedRouterApplianceInstances(other.getLinkedRouterApplianceInstances()); - } - if (!other.getUniqueId().isEmpty()) { - uniqueId_ = other.uniqueId_; - bitField0_ |= 0x00000200; - onChanged(); + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hub. + */ + public com.google.protobuf.ByteString getHubBytes() { + java.lang.Object ref = hub_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); + } + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The hub to set. + * @return This builder for chaining. + */ + public Builder setHub(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - this.mergeUnknownFields(other.getUnknownFields()); + hub_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearHub() { + hub_ = getDefaultInstance().getHub(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for hub to set. + * @return This builder for chaining. + */ + public Builder setHubBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - hub_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 90: - { - uniqueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 90 - case 120: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000400; - break; - } // case 120 - case 138: - { - input.readMessage( - getLinkedVpnTunnelsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 138 - case 146: - { - input.readMessage( - getLinkedInterconnectAttachmentsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 146 - case 154: - { - input.readMessage( - getLinkedRouterApplianceInstancesFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 154 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + checkByteStringIsUtf8(value); + hub_ = value; + bitField0_ |= 0x00000020; + onChanged(); return this; } - private int bitField0_; - - private java.lang.Object name_ = ""; + private java.lang.Object group_ = ""; /** * * *
-     * Immutable. The name of the spoke. Spoke names must be unique. They use the
-     * following form:
-     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * Optional. The name of the group that this spoke is associated with.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @return The name. + * @return The group. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getGroup() { + java.lang.Object ref = group_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + group_ = s; return s; } else { return (java.lang.String) ref; @@ -1421,21 +3971,21 @@ public java.lang.String getName() { * * *
-     * Immutable. The name of the spoke. Spoke names must be unique. They use the
-     * following form:
-     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * Optional. The name of the group that this spoke is associated with.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @return The bytes for name. + * @return The bytes for group. */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; + group_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1445,22 +3995,22 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Immutable. The name of the spoke. Spoke names must be unique. They use the
-     * following form:
-     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * Optional. The name of the group that this spoke is associated with.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @param value The name to set. + * @param value The group to set. * @return This builder for chaining. */ - public Builder setName(java.lang.String value) { + public Builder setGroup(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000001; + group_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1468,18 +4018,18 @@ public Builder setName(java.lang.String value) { * * *
-     * Immutable. The name of the spoke. Spoke names must be unique. They use the
-     * following form:
-     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * Optional. The name of the group that this spoke is associated with.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -1487,92 +4037,87 @@ public Builder clearName() { * * *
-     * Immutable. The name of the spoke. Spoke names must be unique. They use the
-     * following form:
-     *     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * Optional. The name of the group that this spoke is associated with.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * - * @param value The bytes for name to set. + * @param value The bytes for group to set. * @return This builder for chaining. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { + public Builder setGroupBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; + group_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } - private com.google.protobuf.Timestamp createTime_; + private com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels linkedVpnTunnels_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels, + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder, + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder> + linkedVpnTunnelsBuilder_; /** * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; * - * @return Whether the createTime field is set. + * @return Whether the linkedVpnTunnels field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); + public boolean hasLinkedVpnTunnels() { + return ((bitField0_ & 0x00000080) != 0); } /** * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * + * @return The linkedVpnTunnels. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels getLinkedVpnTunnels() { + if (linkedVpnTunnelsBuilder_ == null) { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; } else { - return createTimeBuilder_.getMessage(); + return linkedVpnTunnelsBuilder_.getMessage(); } } /** * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { + public Builder setLinkedVpnTunnels( + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels value) { + if (linkedVpnTunnelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - createTime_ = value; + linkedVpnTunnels_ = value; } else { - createTimeBuilder_.setMessage(value); + linkedVpnTunnelsBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1580,20 +4125,19 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); + public Builder setLinkedVpnTunnels( + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder builderForValue) { + if (linkedVpnTunnelsBuilder_ == null) { + linkedVpnTunnels_ = builderForValue.build(); } else { - createTimeBuilder_.setMessage(builderForValue.build()); + linkedVpnTunnelsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1601,26 +4145,26 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); + public Builder mergeLinkedVpnTunnels( + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels value) { + if (linkedVpnTunnelsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && linkedVpnTunnels_ != null + && linkedVpnTunnels_ + != com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance()) { + getLinkedVpnTunnelsBuilder().mergeFrom(value); } else { - createTime_ = value; + linkedVpnTunnels_ = value; } } else { - createTimeBuilder_.mergeFrom(value); + linkedVpnTunnelsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1628,19 +4172,17 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder clearLinkedVpnTunnels() { + bitField0_ = (bitField0_ & ~0x00000080); + linkedVpnTunnels_ = null; + if (linkedVpnTunnelsBuilder_ != null) { + linkedVpnTunnelsBuilder_.dispose(); + linkedVpnTunnelsBuilder_ = null; } onChanged(); return this; @@ -1649,131 +4191,131 @@ public Builder clearCreateTime() { * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; + public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder + getLinkedVpnTunnelsBuilder() { + bitField0_ |= 0x00000080; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return getLinkedVpnTunnelsFieldBuilder().getBuilder(); } /** * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); + public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder + getLinkedVpnTunnelsOrBuilder() { + if (linkedVpnTunnelsBuilder_ != null) { + return linkedVpnTunnelsBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; } } /** * * *
-     * Output only. The time the spoke was created.
+     * VPN tunnels that are associated with the spoke.
      * 
* - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels, + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder, + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder> + getLinkedVpnTunnelsFieldBuilder() { + if (linkedVpnTunnelsBuilder_ == null) { + linkedVpnTunnelsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels, + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder, + com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder>( + getLinkedVpnTunnels(), getParentForChildren(), isClean()); + linkedVpnTunnels_ = null; } - return createTimeBuilder_; + return linkedVpnTunnelsBuilder_; } - private com.google.protobuf.Timestamp updateTime_; + private com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + linkedInterconnectAttachments_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments, + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder, + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder> + linkedInterconnectAttachmentsBuilder_; /** * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * * - * @return Whether the updateTime field is set. + * @return Whether the linkedInterconnectAttachments field is set. */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000004) != 0); + public boolean hasLinkedInterconnectAttachments() { + return ((bitField0_ & 0x00000100) != 0); } /** * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * * - * @return The updateTime. + * @return The linkedInterconnectAttachments. */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; + public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + getLinkedInterconnectAttachments() { + if (linkedInterconnectAttachmentsBuilder_ == null) { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + .getDefaultInstance() + : linkedInterconnectAttachments_; } else { - return updateTimeBuilder_.getMessage(); + return linkedInterconnectAttachmentsBuilder_.getMessage(); } } /** * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { + public Builder setLinkedInterconnectAttachments( + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments value) { + if (linkedInterconnectAttachmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - updateTime_ = value; + linkedInterconnectAttachments_ = value; } else { - updateTimeBuilder_.setMessage(value); + linkedInterconnectAttachmentsBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1781,20 +4323,22 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); + public Builder setLinkedInterconnectAttachments( + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder + builderForValue) { + if (linkedInterconnectAttachmentsBuilder_ == null) { + linkedInterconnectAttachments_ = builderForValue.build(); } else { - updateTimeBuilder_.setMessage(builderForValue.build()); + linkedInterconnectAttachmentsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1802,26 +4346,29 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); + public Builder mergeLinkedInterconnectAttachments( + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments value) { + if (linkedInterconnectAttachmentsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && linkedInterconnectAttachments_ != null + && linkedInterconnectAttachments_ + != com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + .getDefaultInstance()) { + getLinkedInterconnectAttachmentsBuilder().mergeFrom(value); } else { - updateTime_ = value; + linkedInterconnectAttachments_ = value; } } else { - updateTimeBuilder_.mergeFrom(value); + linkedInterconnectAttachmentsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1829,19 +4376,19 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000004); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; + public Builder clearLinkedInterconnectAttachments() { + bitField0_ = (bitField0_ & ~0x00000100); + linkedInterconnectAttachments_ = null; + if (linkedInterconnectAttachmentsBuilder_ != null) { + linkedInterconnectAttachmentsBuilder_.dispose(); + linkedInterconnectAttachmentsBuilder_ = null; } onChanged(); return this; @@ -1850,418 +4397,370 @@ public Builder clearUpdateTime() { * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000004; + public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder + getLinkedInterconnectAttachmentsBuilder() { + bitField0_ |= 0x00000100; onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + return getLinkedInterconnectAttachmentsFieldBuilder().getBuilder(); } /** * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); + public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder + getLinkedInterconnectAttachmentsOrBuilder() { + if (linkedInterconnectAttachmentsBuilder_ != null) { + return linkedInterconnectAttachmentsBuilder_.getMessageOrBuilder(); } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + .getDefaultInstance() + : linkedInterconnectAttachments_; } } /** * * *
-     * Output only. The time the spoke was last updated.
+     * VLAN attachments that are associated with the spoke.
      * 
* * - * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments, + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder, + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder> + getLinkedInterconnectAttachmentsFieldBuilder() { + if (linkedInterconnectAttachmentsBuilder_ == null) { + linkedInterconnectAttachmentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments, + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder, + com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder>( + getLinkedInterconnectAttachments(), getParentForChildren(), isClean()); + linkedInterconnectAttachments_ = null; } - bitField0_ |= 0x00000008; - onChanged(); - return labels_; + return linkedInterconnectAttachmentsBuilder_; } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } + private com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + linkedRouterApplianceInstances_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances, + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder, + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder> + linkedRouterApplianceInstancesBuilder_; /** * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * Router appliance instances that are associated with the spoke.
      * 
* - * map<string, string> labels = 4; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
-     * 
+ * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * * - * map<string, string> labels = 4; + * @return Whether the linkedRouterApplianceInstances field is set. */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); + public boolean hasLinkedRouterApplianceInstances() { + return ((bitField0_ & 0x00000200) != 0); } /** * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * Router appliance instances that are associated with the spoke.
      * 
* - * map<string, string> labels = 4; - */ - @java.lang.Override - public /* nullable */ java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
-     * 
+ * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * * - * map<string, string> labels = 4; + * @return The linkedRouterApplianceInstances. */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + getLinkedRouterApplianceInstances() { + if (linkedRouterApplianceInstancesBuilder_ == null) { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; + } else { + return linkedRouterApplianceInstancesBuilder_.getMessage(); } - return map.get(key); - } - - public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableLabels().getMutableMap().clear(); - return this; } /** * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * Router appliance instances that are associated with the spoke.
      * 
* - * map<string, string> labels = 4; + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setLinkedRouterApplianceInstances( + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances value) { + if (linkedRouterApplianceInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedRouterApplianceInstances_ = value; + } else { + linkedRouterApplianceInstancesBuilder_.setMessage(value); } - internalGetMutableLabels().getMutableMap().remove(key); + bitField0_ |= 0x00000200; + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000008; - return internalGetMutableLabels().getMutableMap(); - } /** * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * Router appliance instances that are associated with the spoke.
      * 
* - * map<string, string> labels = 4; + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); + public Builder setLinkedRouterApplianceInstances( + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder + builderForValue) { + if (linkedRouterApplianceInstancesBuilder_ == null) { + linkedRouterApplianceInstances_ = builderForValue.build(); + } else { + linkedRouterApplianceInstancesBuilder_.setMessage(builderForValue.build()); } - internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000200; + onChanged(); return this; } /** * * *
-     * Optional labels in key:value format. For more information about labels, see
-     * [Requirements for
-     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * Router appliance instances that are associated with the spoke.
      * 
* - * map<string, string> labels = 4; + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; + public Builder mergeLinkedRouterApplianceInstances( + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances value) { + if (linkedRouterApplianceInstancesBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && linkedRouterApplianceInstances_ != null + && linkedRouterApplianceInstances_ + != com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + .getDefaultInstance()) { + getLinkedRouterApplianceInstancesBuilder().mergeFrom(value); + } else { + linkedRouterApplianceInstances_ = value; + } + } else { + linkedRouterApplianceInstancesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); return this; } - - private java.lang.Object description_ = ""; /** * * *
-     * An optional description of the spoke.
+     * Router appliance instances that are associated with the spoke.
      * 
* - * string description = 5; - * - * @return The description. + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; + public Builder clearLinkedRouterApplianceInstances() { + bitField0_ = (bitField0_ & ~0x00000200); + linkedRouterApplianceInstances_ = null; + if (linkedRouterApplianceInstancesBuilder_ != null) { + linkedRouterApplianceInstancesBuilder_.dispose(); + linkedRouterApplianceInstancesBuilder_ = null; } + onChanged(); + return this; } /** * * *
-     * An optional description of the spoke.
+     * Router appliance instances that are associated with the spoke.
      * 
* - * string description = 5; - * - * @return The bytes for description. + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder + getLinkedRouterApplianceInstancesBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getLinkedRouterApplianceInstancesFieldBuilder().getBuilder(); } /** * * *
-     * An optional description of the spoke.
+     * Router appliance instances that are associated with the spoke.
      * 
* - * string description = 5; - * - * @param value The description to set. - * @return This builder for chaining. + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder + getLinkedRouterApplianceInstancesOrBuilder() { + if (linkedRouterApplianceInstancesBuilder_ != null) { + return linkedRouterApplianceInstancesBuilder_.getMessageOrBuilder(); + } else { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; } - description_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; } /** * * *
-     * An optional description of the spoke.
+     * Router appliance instances that are associated with the spoke.
      * 
* - * string description = 5; - * - * @return This builder for chaining. + * + * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances, + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder, + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder> + getLinkedRouterApplianceInstancesFieldBuilder() { + if (linkedRouterApplianceInstancesBuilder_ == null) { + linkedRouterApplianceInstancesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances, + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder, + com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder>( + getLinkedRouterApplianceInstances(), getParentForChildren(), isClean()); + linkedRouterApplianceInstances_ = null; + } + return linkedRouterApplianceInstancesBuilder_; } + + private com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork linkedVpcNetwork_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder> + linkedVpcNetworkBuilder_; /** * * *
-     * An optional description of the spoke.
+     * Optional. VPC network that is associated with the spoke.
      * 
* - * string description = 5; + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The bytes for description to set. - * @return This builder for chaining. + * @return Whether the linkedVpcNetwork field is set. */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; + public boolean hasLinkedVpcNetwork() { + return ((bitField0_ & 0x00000400) != 0); } - - private java.lang.Object hub_ = ""; /** * * *
-     * Immutable. The name of the hub that this spoke is attached to.
+     * Optional. VPC network that is associated with the spoke.
      * 
* * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The hub. + * @return The linkedVpcNetwork. */ - public java.lang.String getHub() { - java.lang.Object ref = hub_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hub_ = s; - return s; + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork getLinkedVpcNetwork() { + if (linkedVpcNetworkBuilder_ == null) { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; } else { - return (java.lang.String) ref; + return linkedVpcNetworkBuilder_.getMessage(); } } /** * * *
-     * Immutable. The name of the hub that this spoke is attached to.
+     * Optional. VPC network that is associated with the spoke.
      * 
* * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The bytes for hub. */ - public com.google.protobuf.ByteString getHubBytes() { - java.lang.Object ref = hub_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - hub_ = b; - return b; + public Builder setLinkedVpcNetwork( + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork value) { + if (linkedVpcNetworkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedVpcNetwork_ = value; } else { - return (com.google.protobuf.ByteString) ref; + linkedVpcNetworkBuilder_.setMessage(value); } + bitField0_ |= 0x00000400; + onChanged(); + return this; } /** * * *
-     * Immutable. The name of the hub that this spoke is attached to.
+     * Optional. VPC network that is associated with the spoke.
      * 
* * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The hub to set. - * @return This builder for chaining. */ - public Builder setHub(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setLinkedVpcNetwork( + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder builderForValue) { + if (linkedVpcNetworkBuilder_ == null) { + linkedVpcNetwork_ = builderForValue.build(); + } else { + linkedVpcNetworkBuilder_.setMessage(builderForValue.build()); } - hub_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -2269,18 +4768,28 @@ public Builder setHub(java.lang.String value) { * * *
-     * Immutable. The name of the hub that this spoke is attached to.
+     * Optional. VPC network that is associated with the spoke.
      * 
* * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearHub() { - hub_ = getDefaultInstance().getHub(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder mergeLinkedVpcNetwork( + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork value) { + if (linkedVpcNetworkBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && linkedVpcNetwork_ != null + && linkedVpcNetwork_ + != com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance()) { + getLinkedVpcNetworkBuilder().mergeFrom(value); + } else { + linkedVpcNetwork_ = value; + } + } else { + linkedVpcNetworkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -2288,153 +4797,158 @@ public Builder clearHub() { * * *
-     * Immutable. The name of the hub that this spoke is attached to.
+     * Optional. VPC network that is associated with the spoke.
      * 
* * - * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The bytes for hub to set. - * @return This builder for chaining. */ - public Builder setHubBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearLinkedVpcNetwork() { + bitField0_ = (bitField0_ & ~0x00000400); + linkedVpcNetwork_ = null; + if (linkedVpcNetworkBuilder_ != null) { + linkedVpcNetworkBuilder_.dispose(); + linkedVpcNetworkBuilder_ = null; } - checkByteStringIsUtf8(value); - hub_ = value; - bitField0_ |= 0x00000020; onChanged(); return this; } - - private com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels linkedVpnTunnels_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels, - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder, - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder> - linkedVpnTunnelsBuilder_; /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Optional. VPC network that is associated with the spoke.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - * - * @return Whether the linkedVpnTunnels field is set. + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public boolean hasLinkedVpnTunnels() { - return ((bitField0_ & 0x00000040) != 0); + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder + getLinkedVpcNetworkBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getLinkedVpcNetworkFieldBuilder().getBuilder(); } /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Optional. VPC network that is associated with the spoke.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - * - * @return The linkedVpnTunnels. + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels getLinkedVpnTunnels() { - if (linkedVpnTunnelsBuilder_ == null) { - return linkedVpnTunnels_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() - : linkedVpnTunnels_; + public com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder + getLinkedVpcNetworkOrBuilder() { + if (linkedVpcNetworkBuilder_ != null) { + return linkedVpcNetworkBuilder_.getMessageOrBuilder(); } else { - return linkedVpnTunnelsBuilder_.getMessage(); + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; } } /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Optional. VPC network that is associated with the spoke.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setLinkedVpnTunnels( - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels value) { - if (linkedVpnTunnelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkedVpnTunnels_ = value; - } else { - linkedVpnTunnelsBuilder_.setMessage(value); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder> + getLinkedVpcNetworkFieldBuilder() { + if (linkedVpcNetworkBuilder_ == null) { + linkedVpcNetworkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder>( + getLinkedVpcNetwork(), getParentForChildren(), isClean()); + linkedVpcNetwork_ = null; } - bitField0_ |= 0x00000040; - onChanged(); - return this; + return linkedVpcNetworkBuilder_; } + + private java.lang.Object uniqueId_ = ""; /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. */ - public Builder setLinkedVpnTunnels( - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder builderForValue) { - if (linkedVpnTunnelsBuilder_ == null) { - linkedVpnTunnels_ = builderForValue.build(); + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; } else { - linkedVpnTunnelsBuilder_.setMessage(builderForValue.build()); + return (java.lang.String) ref; } - bitField0_ |= 0x00000040; - onChanged(); - return this; } /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. */ - public Builder mergeLinkedVpnTunnels( - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels value) { - if (linkedVpnTunnelsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && linkedVpnTunnels_ != null - && linkedVpnTunnels_ - != com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance()) { - getLinkedVpnTunnelsBuilder().mergeFrom(value); - } else { - linkedVpnTunnels_ = value; - } + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; } else { - linkedVpnTunnelsBuilder_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000040; - onChanged(); - return this; } /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uniqueId to set. + * @return This builder for chaining. */ - public Builder clearLinkedVpnTunnels() { - bitField0_ = (bitField0_ & ~0x00000040); - linkedVpnTunnels_ = null; - if (linkedVpnTunnelsBuilder_ != null) { - linkedVpnTunnelsBuilder_.dispose(); - linkedVpnTunnelsBuilder_ = null; + public Builder setUniqueId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + uniqueId_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -2442,154 +4956,123 @@ public Builder clearLinkedVpnTunnels() { * * *
-     * VPN tunnels that are associated with the spoke.
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder - getLinkedVpnTunnelsBuilder() { - bitField0_ |= 0x00000040; + public Builder clearUniqueId() { + uniqueId_ = getDefaultInstance().getUniqueId(); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); - return getLinkedVpnTunnelsFieldBuilder().getBuilder(); + return this; } /** * * *
-     * VPN tunnels that are associated with the spoke.
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
      * 
* - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - */ - public com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder - getLinkedVpnTunnelsOrBuilder() { - if (linkedVpnTunnelsBuilder_ != null) { - return linkedVpnTunnelsBuilder_.getMessageOrBuilder(); - } else { - return linkedVpnTunnels_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.getDefaultInstance() - : linkedVpnTunnels_; - } - } - /** - * - * - *
-     * VPN tunnels that are associated with the spoke.
-     * 
+ * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * @param value The bytes for uniqueId to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels, - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder, - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder> - getLinkedVpnTunnelsFieldBuilder() { - if (linkedVpnTunnelsBuilder_ == null) { - linkedVpnTunnelsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels, - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnels.Builder, - com.google.cloud.networkconnectivity.v1.LinkedVpnTunnelsOrBuilder>( - getLinkedVpnTunnels(), getParentForChildren(), isClean()); - linkedVpnTunnels_ = null; + public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return linkedVpnTunnelsBuilder_; + checkByteStringIsUtf8(value); + uniqueId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; } - private com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - linkedInterconnectAttachments_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments, - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder, - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder> - linkedInterconnectAttachmentsBuilder_; + private int state_ = 0; /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The current lifecycle state of this spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the linkedInterconnectAttachments field is set. + * @return The enum numeric value on the wire for state. */ - public boolean hasLinkedInterconnectAttachments() { - return ((bitField0_ & 0x00000080) != 0); + @java.lang.Override + public int getStateValue() { + return state_; } /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The current lifecycle state of this spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The linkedInterconnectAttachments. + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. */ - public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - getLinkedInterconnectAttachments() { - if (linkedInterconnectAttachmentsBuilder_ == null) { - return linkedInterconnectAttachments_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - .getDefaultInstance() - : linkedInterconnectAttachments_; - } else { - return linkedInterconnectAttachmentsBuilder_.getMessage(); - } + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; } /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The current lifecycle state of this spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The state. */ - public Builder setLinkedInterconnectAttachments( - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments value) { - if (linkedInterconnectAttachmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkedInterconnectAttachments_ = value; - } else { - linkedInterconnectAttachmentsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; } /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The current lifecycle state of this spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The state to set. + * @return This builder for chaining. */ - public Builder setLinkedInterconnectAttachments( - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder - builderForValue) { - if (linkedInterconnectAttachmentsBuilder_ == null) { - linkedInterconnectAttachments_ = builderForValue.build(); - } else { - linkedInterconnectAttachmentsBuilder_.setMessage(builderForValue.build()); + public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00001000; + state_ = value.getNumber(); onChanged(); return this; } @@ -2597,484 +5080,476 @@ public Builder setLinkedInterconnectAttachments( * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The current lifecycle state of this spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return This builder for chaining. */ - public Builder mergeLinkedInterconnectAttachments( - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments value) { - if (linkedInterconnectAttachmentsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && linkedInterconnectAttachments_ != null - && linkedInterconnectAttachments_ - != com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - .getDefaultInstance()) { - getLinkedInterconnectAttachmentsBuilder().mergeFrom(value); - } else { - linkedInterconnectAttachments_ = value; - } - } else { - linkedInterconnectAttachmentsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000080; + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00001000); + state_ = 0; onChanged(); return this; } + + private java.util.List reasons_ = + java.util.Collections.emptyList(); + + private void ensureReasonsIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + reasons_ = + new java.util.ArrayList( + reasons_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke.StateReason, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder, + com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder> + reasonsBuilder_; + /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearLinkedInterconnectAttachments() { - bitField0_ = (bitField0_ & ~0x00000080); - linkedInterconnectAttachments_ = null; - if (linkedInterconnectAttachmentsBuilder_ != null) { - linkedInterconnectAttachmentsBuilder_.dispose(); - linkedInterconnectAttachmentsBuilder_ = null; + public java.util.List + getReasonsList() { + if (reasonsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reasons_); + } else { + return reasonsBuilder_.getMessageList(); } - onChanged(); - return this; } /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder - getLinkedInterconnectAttachmentsBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return getLinkedInterconnectAttachmentsFieldBuilder().getBuilder(); + public int getReasonsCount() { + if (reasonsBuilder_ == null) { + return reasons_.size(); + } else { + return reasonsBuilder_.getCount(); + } } /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder - getLinkedInterconnectAttachmentsOrBuilder() { - if (linkedInterconnectAttachmentsBuilder_ != null) { - return linkedInterconnectAttachmentsBuilder_.getMessageOrBuilder(); - } else { - return linkedInterconnectAttachments_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - .getDefaultInstance() - : linkedInterconnectAttachments_; + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason getReasons(int index) { + if (reasonsBuilder_ == null) { + return reasons_.get(index); + } else { + return reasonsBuilder_.getMessage(index); } } /** * * *
-     * VLAN attachments that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments, - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder, - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder> - getLinkedInterconnectAttachmentsFieldBuilder() { - if (linkedInterconnectAttachmentsBuilder_ == null) { - linkedInterconnectAttachmentsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments, - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments.Builder, - com.google.cloud.networkconnectivity.v1.LinkedInterconnectAttachmentsOrBuilder>( - getLinkedInterconnectAttachments(), getParentForChildren(), isClean()); - linkedInterconnectAttachments_ = null; + public Builder setReasons( + int index, com.google.cloud.networkconnectivity.v1.Spoke.StateReason value) { + if (reasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.set(index, value); + onChanged(); + } else { + reasonsBuilder_.setMessage(index, value); } - return linkedInterconnectAttachmentsBuilder_; + return this; } - - private com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - linkedRouterApplianceInstances_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances, - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder, - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder> - linkedRouterApplianceInstancesBuilder_; /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the linkedRouterApplianceInstances field is set. */ - public boolean hasLinkedRouterApplianceInstances() { - return ((bitField0_ & 0x00000100) != 0); + public Builder setReasons( + int index, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder builderForValue) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.set(index, builderForValue.build()); + onChanged(); + } else { + reasonsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The linkedRouterApplianceInstances. */ - public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - getLinkedRouterApplianceInstances() { - if (linkedRouterApplianceInstancesBuilder_ == null) { - return linkedRouterApplianceInstances_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - .getDefaultInstance() - : linkedRouterApplianceInstances_; + public Builder addReasons(com.google.cloud.networkconnectivity.v1.Spoke.StateReason value) { + if (reasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.add(value); + onChanged(); } else { - return linkedRouterApplianceInstancesBuilder_.getMessage(); + reasonsBuilder_.addMessage(value); } + return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setLinkedRouterApplianceInstances( - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances value) { - if (linkedRouterApplianceInstancesBuilder_ == null) { + public Builder addReasons( + int index, com.google.cloud.networkconnectivity.v1.Spoke.StateReason value) { + if (reasonsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - linkedRouterApplianceInstances_ = value; + ensureReasonsIsMutable(); + reasons_.add(index, value); + onChanged(); } else { - linkedRouterApplianceInstancesBuilder_.setMessage(value); + reasonsBuilder_.addMessage(index, value); } - bitField0_ |= 0x00000100; - onChanged(); return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setLinkedRouterApplianceInstances( - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder - builderForValue) { - if (linkedRouterApplianceInstancesBuilder_ == null) { - linkedRouterApplianceInstances_ = builderForValue.build(); + public Builder addReasons( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder builderForValue) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.add(builderForValue.build()); + onChanged(); } else { - linkedRouterApplianceInstancesBuilder_.setMessage(builderForValue.build()); + reasonsBuilder_.addMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; - onChanged(); return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder mergeLinkedRouterApplianceInstances( - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances value) { - if (linkedRouterApplianceInstancesBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && linkedRouterApplianceInstances_ != null - && linkedRouterApplianceInstances_ - != com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - .getDefaultInstance()) { - getLinkedRouterApplianceInstancesBuilder().mergeFrom(value); - } else { - linkedRouterApplianceInstances_ = value; - } + public Builder addReasons( + int index, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder builderForValue) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.add(index, builderForValue.build()); + onChanged(); } else { - linkedRouterApplianceInstancesBuilder_.mergeFrom(value); + reasonsBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000100; - onChanged(); return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearLinkedRouterApplianceInstances() { - bitField0_ = (bitField0_ & ~0x00000100); - linkedRouterApplianceInstances_ = null; - if (linkedRouterApplianceInstancesBuilder_ != null) { - linkedRouterApplianceInstancesBuilder_.dispose(); - linkedRouterApplianceInstancesBuilder_ = null; + public Builder addAllReasons( + java.lang.Iterable + values) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reasons_); + onChanged(); + } else { + reasonsBuilder_.addAllMessages(values); } - onChanged(); return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder - getLinkedRouterApplianceInstancesBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return getLinkedRouterApplianceInstancesFieldBuilder().getBuilder(); + public Builder clearReasons() { + if (reasonsBuilder_ == null) { + reasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + reasonsBuilder_.clear(); + } + return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder - getLinkedRouterApplianceInstancesOrBuilder() { - if (linkedRouterApplianceInstancesBuilder_ != null) { - return linkedRouterApplianceInstancesBuilder_.getMessageOrBuilder(); + public Builder removeReasons(int index) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.remove(index); + onChanged(); } else { - return linkedRouterApplianceInstances_ == null - ? com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - .getDefaultInstance() - : linkedRouterApplianceInstances_; + reasonsBuilder_.remove(index); } + return this; } /** * * *
-     * Router appliance instances that are associated with the spoke.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* * - * .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances, - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder, - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder> - getLinkedRouterApplianceInstancesFieldBuilder() { - if (linkedRouterApplianceInstancesBuilder_ == null) { - linkedRouterApplianceInstancesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances, - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances.Builder, - com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder>( - getLinkedRouterApplianceInstances(), getParentForChildren(), isClean()); - linkedRouterApplianceInstances_ = null; - } - return linkedRouterApplianceInstancesBuilder_; + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder getReasonsBuilder( + int index) { + return getReasonsFieldBuilder().getBuilder(index); } - - private java.lang.Object uniqueId_ = ""; /** * * *
-     * Output only. The Google-generated UUID for the spoke. This value is unique
-     * across all spoke resources. If a spoke is deleted and another with the same
-     * name is created, the new spoke is assigned a different unique_id.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uniqueId. + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getUniqueId() { - java.lang.Object ref = uniqueId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uniqueId_ = s; - return s; + public com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder getReasonsOrBuilder( + int index) { + if (reasonsBuilder_ == null) { + return reasons_.get(index); } else { - return (java.lang.String) ref; + return reasonsBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * Output only. The Google-generated UUID for the spoke. This value is unique
-     * across all spoke resources. If a spoke is deleted and another with the same
-     * name is created, the new spoke is assigned a different unique_id.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uniqueId. + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getUniqueIdBytes() { - java.lang.Object ref = uniqueId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uniqueId_ = b; - return b; + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder> + getReasonsOrBuilderList() { + if (reasonsBuilder_ != null) { + return reasonsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(reasons_); } } /** * * *
-     * Output only. The Google-generated UUID for the spoke. This value is unique
-     * across all spoke resources. If a spoke is deleted and another with the same
-     * name is created, the new spoke is assigned a different unique_id.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uniqueId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setUniqueId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uniqueId_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder addReasonsBuilder() { + return getReasonsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.getDefaultInstance()); } /** * * *
-     * Output only. The Google-generated UUID for the spoke. This value is unique
-     * across all spoke resources. If a spoke is deleted and another with the same
-     * name is created, the new spoke is assigned a different unique_id.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearUniqueId() { - uniqueId_ = getDefaultInstance().getUniqueId(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder addReasonsBuilder( + int index) { + return getReasonsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.getDefaultInstance()); } /** * * *
-     * Output only. The Google-generated UUID for the spoke. This value is unique
-     * across all spoke resources. If a spoke is deleted and another with the same
-     * name is created, the new spoke is assigned a different unique_id.
+     * Output only. The reasons for current state of the spoke. Only present when
+     * the spoke is in the `INACTIVE` state.
      * 
* - * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uniqueId to set. - * @return This builder for chaining. + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getReasonsBuilderList() { + return getReasonsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke.StateReason, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder, + com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder> + getReasonsFieldBuilder() { + if (reasonsBuilder_ == null) { + reasonsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.Spoke.StateReason, + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Builder, + com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder>( + reasons_, ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); + reasons_ = null; } - checkByteStringIsUtf8(value); - uniqueId_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; + return reasonsBuilder_; } - private int state_ = 0; + private int spokeType_ = 0; /** * * *
-     * Output only. The current lifecycle state of this spoke.
+     * Output only. The type of resource associated with the spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The enum numeric value on the wire for state. + * @return The enum numeric value on the wire for spokeType. */ @java.lang.Override - public int getStateValue() { - return state_; + public int getSpokeTypeValue() { + return spokeType_; } /** * * *
-     * Output only. The current lifecycle state of this spoke.
+     * Output only. The type of resource associated with the spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param value The enum numeric value on the wire for state to set. + * @param value The enum numeric value on the wire for spokeType to set. * @return This builder for chaining. */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000400; + public Builder setSpokeTypeValue(int value) { + spokeType_ = value; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -3082,41 +5557,43 @@ public Builder setStateValue(int value) { * * *
-     * Output only. The current lifecycle state of this spoke.
+     * Output only. The type of resource associated with the spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The state. + * @return The spokeType. */ @java.lang.Override - public com.google.cloud.networkconnectivity.v1.State getState() { - com.google.cloud.networkconnectivity.v1.State result = - com.google.cloud.networkconnectivity.v1.State.forNumber(state_); - return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + public com.google.cloud.networkconnectivity.v1.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1.SpokeType result = + com.google.cloud.networkconnectivity.v1.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1.SpokeType.UNRECOGNIZED + : result; } /** * * *
-     * Output only. The current lifecycle state of this spoke.
+     * Output only. The type of resource associated with the spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param value The state to set. + * @param value The spokeType to set. * @return This builder for chaining. */ - public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { + public Builder setSpokeType(com.google.cloud.networkconnectivity.v1.SpokeType value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; - state_ = value.getNumber(); + bitField0_ |= 0x00004000; + spokeType_ = value.getNumber(); onChanged(); return this; } @@ -3124,18 +5601,18 @@ public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { * * *
-     * Output only. The current lifecycle state of this spoke.
+     * Output only. The type of resource associated with the spoke.
      * 
* * - * .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000400); - state_ = 0; + public Builder clearSpokeType() { + bitField0_ = (bitField0_ & ~0x00004000); + spokeType_ = 0; onChanged(); return this; } diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeOrBuilder.java index bbb5eb050b25..599b0e45bfe1 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeOrBuilder.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeOrBuilder.java @@ -132,8 +132,8 @@ public interface SpokeOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -144,8 +144,8 @@ public interface SpokeOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -159,8 +159,8 @@ public interface SpokeOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -171,8 +171,8 @@ public interface SpokeOrBuilder * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -187,8 +187,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional labels in key:value format. For more information about labels, see
-   * [Requirements for
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
    * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
    * 
* @@ -250,6 +250,35 @@ java.lang.String getLabelsOrDefault( */ com.google.protobuf.ByteString getHubBytes(); + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + /** * * @@ -371,13 +400,54 @@ java.lang.String getLabelsOrDefault( com.google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstancesOrBuilder getLinkedRouterApplianceInstancesOrBuilder(); + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpcNetwork field is set. + */ + boolean hasLinkedVpcNetwork(); + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpcNetwork. + */ + com.google.cloud.networkconnectivity.v1.LinkedVpcNetwork getLinkedVpcNetwork(); + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1.LinkedVpcNetworkOrBuilder getLinkedVpcNetworkOrBuilder(); + /** * * *
    * Output only. The Google-generated UUID for the spoke. This value is unique
    * across all spoke resources. If a spoke is deleted and another with the same
-   * name is created, the new spoke is assigned a different unique_id.
+   * name is created, the new spoke is assigned a different `unique_id`.
    * 
* * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -391,7 +461,7 @@ java.lang.String getLabelsOrDefault( *
    * Output only. The Google-generated UUID for the spoke. This value is unique
    * across all spoke resources. If a spoke is deleted and another with the same
-   * name is created, the new spoke is assigned a different unique_id.
+   * name is created, the new spoke is assigned a different `unique_id`.
    * 
* * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -428,4 +498,100 @@ java.lang.String getLabelsOrDefault( * @return The state. */ com.google.cloud.networkconnectivity.v1.State getState(); + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getReasonsList(); + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.Spoke.StateReason getReasons(int index); + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getReasonsCount(); + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getReasonsOrBuilderList(); + /** + * + * + *
+   * Output only. The reasons for current state of the spoke. Only present when
+   * the spoke is in the `INACTIVE` state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.Spoke.StateReasonOrBuilder getReasonsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + int getSpokeTypeValue(); + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + com.google.cloud.networkconnectivity.v1.SpokeType getSpokeType(); } diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummary.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummary.java new file mode 100644 index 000000000000..835c281d1511 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummary.java @@ -0,0 +1,4528 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * Summarizes information about the spokes associated with a hub.
+ * The summary includes a count of spokes according to type
+ * and according to state. If any spokes are inactive,
+ * the summary also lists the reasons they are inactive,
+ * including a count for each reason.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary} + */ +public final class SpokeSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.SpokeSummary) + SpokeSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpokeSummary.newBuilder() to construct. + private SpokeSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpokeSummary() { + spokeTypeCounts_ = java.util.Collections.emptyList(); + spokeStateCounts_ = java.util.Collections.emptyList(); + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpokeSummary(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder.class); + } + + public interface SpokeTypeCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + int getSpokeTypeValue(); + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + com.google.cloud.networkconnectivity.v1.SpokeType getSpokeType(); + + /** + * + * + *
+     * Output only. The total number of spokes of this type that are
+     * associated with the hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + /** + * + * + *
+   * The number of spokes of a given type that are associated
+   * with a specific hub. The type indicates what kind of
+   * resource is associated with the spoke.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount} + */ + public static final class SpokeTypeCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) + SpokeTypeCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpokeTypeCount.newBuilder() to construct. + private SpokeTypeCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpokeTypeCount() { + spokeType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpokeTypeCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder.class); + } + + public static final int SPOKE_TYPE_FIELD_NUMBER = 1; + private int spokeType_ = 0; + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1.SpokeType result = + com.google.cloud.networkconnectivity.v1.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1.SpokeType.UNRECOGNIZED + : result; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + /** + * + * + *
+     * Output only. The total number of spokes of this type that are
+     * associated with the hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (spokeType_ + != com.google.cloud.networkconnectivity.v1.SpokeType.SPOKE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, spokeType_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (spokeType_ + != com.google.cloud.networkconnectivity.v1.SpokeType.SPOKE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, spokeType_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount other = + (com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) obj; + + if (spokeType_ != other.spokeType_) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SPOKE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + spokeType_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The number of spokes of a given type that are associated
+     * with a specific hub. The type indicates what kind of
+     * resource is associated with the spoke.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spokeType_ = 0; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeTypeCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount build() { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount buildPartial() { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount result = + new com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spokeType_ = spokeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount other) { + if (other + == com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + .getDefaultInstance()) return this; + if (other.spokeType_ != 0) { + setSpokeTypeValue(other.getSpokeTypeValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + spokeType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int spokeType_ = 0; + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for spokeType to set. + * @return This builder for chaining. + */ + public Builder setSpokeTypeValue(int value) { + spokeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1.SpokeType result = + com.google.cloud.networkconnectivity.v1.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1.SpokeType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The spokeType to set. + * @return This builder for chaining. + */ + public Builder setSpokeType(com.google.cloud.networkconnectivity.v1.SpokeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + spokeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeType() { + bitField0_ = (bitField0_ & ~0x00000001); + spokeType_ = 0; + onChanged(); + return this; + } + + private long count_; + /** + * + * + *
+       * Output only. The total number of spokes of this type that are
+       * associated with the hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+       * Output only. The total number of spokes of this type that are
+       * associated with the hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The total number of spokes of this type that are
+       * associated with the hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount) + private static final com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount(); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeTypeCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpokeStateCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1.State getState(); + + /** + * + * + *
+     * Output only. The total number of spokes that are in this state
+     * and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + /** + * + * + *
+   * The number of spokes that are in a particular state
+   * and associated with a given hub.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount} + */ + public static final class SpokeStateCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) + SpokeStateCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpokeStateCount.newBuilder() to construct. + private SpokeStateCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpokeStateCount() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpokeStateCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder.class); + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + /** + * + * + *
+     * Output only. The total number of spokes that are in this state
+     * and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.networkconnectivity.v1.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount other = + (com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) obj; + + if (state_ != other.state_) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The number of spokes that are in a particular state
+     * and associated with a given hub.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount build() { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount buildPartial() { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount result = + new com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount other) { + if (other + == com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.State getState() { + com.google.cloud.networkconnectivity.v1.State result = + com.google.cloud.networkconnectivity.v1.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1.State.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private long count_; + /** + * + * + *
+       * Output only. The total number of spokes that are in this state
+       * and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+       * Output only. The total number of spokes that are in this state
+       * and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The total number of spokes that are in this state
+       * and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount) + private static final com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount(); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeStateCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpokeStateReasonCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stateReasonCode. + */ + int getStateReasonCodeValue(); + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateReasonCode. + */ + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code getStateReasonCode(); + + /** + * + * + *
+     * Output only. The total number of spokes that are inactive for a
+     * particular reason and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + /** + * + * + *
+   * The number of spokes in the hub that are inactive for this reason.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount} + */ + public static final class SpokeStateReasonCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) + SpokeStateReasonCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpokeStateReasonCount.newBuilder() to construct. + private SpokeStateReasonCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpokeStateReasonCount() { + stateReasonCode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpokeStateReasonCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + .class); + } + + public static final int STATE_REASON_CODE_FIELD_NUMBER = 1; + private int stateReasonCode_ = 0; + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stateReasonCode. + */ + @java.lang.Override + public int getStateReasonCodeValue() { + return stateReasonCode_; + } + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateReasonCode. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code getStateReasonCode() { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.forNumber( + stateReasonCode_); + return result == null + ? com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + /** + * + * + *
+     * Output only. The total number of spokes that are inactive for a
+     * particular reason and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (stateReasonCode_ + != com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, stateReasonCode_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stateReasonCode_ + != com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, stateReasonCode_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount other = + (com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) obj; + + if (stateReasonCode_ != other.stateReasonCode_) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_REASON_CODE_FIELD_NUMBER; + hash = (53 * hash) + stateReasonCode_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The number of spokes in the hub that are inactive for this reason.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stateReasonCode_ = 0; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_SpokeStateReasonCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount build() { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + buildPartial() { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount result = + new com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stateReasonCode_ = stateReasonCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount other) { + if (other + == com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance()) return this; + if (other.stateReasonCode_ != 0) { + setStateReasonCodeValue(other.getStateReasonCodeValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + stateReasonCode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int stateReasonCode_ = 0; + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stateReasonCode. + */ + @java.lang.Override + public int getStateReasonCodeValue() { + return stateReasonCode_; + } + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for stateReasonCode to set. + * @return This builder for chaining. + */ + public Builder setStateReasonCodeValue(int value) { + stateReasonCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateReasonCode. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code getStateReasonCode() { + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.forNumber( + stateReasonCode_); + return result == null + ? com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The stateReasonCode to set. + * @return This builder for chaining. + */ + public Builder setStateReasonCode( + com.google.cloud.networkconnectivity.v1.Spoke.StateReason.Code value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + stateReasonCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStateReasonCode() { + bitField0_ = (bitField0_ & ~0x00000001); + stateReasonCode_ = 0; + onChanged(); + return this; + } + + private long count_; + /** + * + * + *
+       * Output only. The total number of spokes that are inactive for a
+       * particular reason and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+       * Output only. The total number of spokes that are inactive for a
+       * particular reason and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The total number of spokes that are inactive for a
+       * particular reason and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount) + private static final com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount(); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeStateReasonCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SPOKE_TYPE_COUNTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + spokeTypeCounts_; + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSpokeTypeCountsList() { + return spokeTypeCounts_; + } + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsOrBuilderList() { + return spokeTypeCounts_; + } + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSpokeTypeCountsCount() { + return spokeTypeCounts_.size(); + } + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount getSpokeTypeCounts( + int index) { + return spokeTypeCounts_.get(index); + } + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder + getSpokeTypeCountsOrBuilder(int index) { + return spokeTypeCounts_.get(index); + } + + public static final int SPOKE_STATE_COUNTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + spokeStateCounts_; + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSpokeStateCountsList() { + return spokeStateCounts_; + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsOrBuilderList() { + return spokeStateCounts_; + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSpokeStateCountsCount() { + return spokeStateCounts_.size(); + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount getSpokeStateCounts( + int index) { + return spokeStateCounts_.get(index); + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder + getSpokeStateCountsOrBuilder(int index) { + return spokeStateCounts_.get(index); + } + + public static final int SPOKE_STATE_REASON_COUNTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + spokeStateReasonCounts_; + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSpokeStateReasonCountsList() { + return spokeStateReasonCounts_; + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsOrBuilderList() { + return spokeStateReasonCounts_; + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSpokeStateReasonCountsCount() { + return spokeStateReasonCounts_.size(); + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + getSpokeStateReasonCounts(int index) { + return spokeStateReasonCounts_.get(index); + } + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder + getSpokeStateReasonCountsOrBuilder(int index) { + return spokeStateReasonCounts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < spokeTypeCounts_.size(); i++) { + output.writeMessage(1, spokeTypeCounts_.get(i)); + } + for (int i = 0; i < spokeStateCounts_.size(); i++) { + output.writeMessage(2, spokeStateCounts_.get(i)); + } + for (int i = 0; i < spokeStateReasonCounts_.size(); i++) { + output.writeMessage(3, spokeStateReasonCounts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < spokeTypeCounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, spokeTypeCounts_.get(i)); + } + for (int i = 0; i < spokeStateCounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, spokeStateCounts_.get(i)); + } + for (int i = 0; i < spokeStateReasonCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, spokeStateReasonCounts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1.SpokeSummary other = + (com.google.cloud.networkconnectivity.v1.SpokeSummary) obj; + + if (!getSpokeTypeCountsList().equals(other.getSpokeTypeCountsList())) return false; + if (!getSpokeStateCountsList().equals(other.getSpokeStateCountsList())) return false; + if (!getSpokeStateReasonCountsList().equals(other.getSpokeStateReasonCountsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSpokeTypeCountsCount() > 0) { + hash = (37 * hash) + SPOKE_TYPE_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeTypeCountsList().hashCode(); + } + if (getSpokeStateCountsCount() > 0) { + hash = (37 * hash) + SPOKE_STATE_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeStateCountsList().hashCode(); + } + if (getSpokeStateReasonCountsCount() > 0) { + hash = (37 * hash) + SPOKE_STATE_REASON_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeStateReasonCountsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1.SpokeSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Summarizes information about the spokes associated with a hub.
+   * The summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1.SpokeSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1.SpokeSummary) + com.google.cloud.networkconnectivity.v1.SpokeSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1.SpokeSummary.class, + com.google.cloud.networkconnectivity.v1.SpokeSummary.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1.SpokeSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (spokeTypeCountsBuilder_ == null) { + spokeTypeCounts_ = java.util.Collections.emptyList(); + } else { + spokeTypeCounts_ = null; + spokeTypeCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (spokeStateCountsBuilder_ == null) { + spokeStateCounts_ = java.util.Collections.emptyList(); + } else { + spokeStateCounts_ = null; + spokeStateCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (spokeStateReasonCountsBuilder_ == null) { + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + } else { + spokeStateReasonCounts_ = null; + spokeStateReasonCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1.HubProto + .internal_static_google_cloud_networkconnectivity_v1_SpokeSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary build() { + com.google.cloud.networkconnectivity.v1.SpokeSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary buildPartial() { + com.google.cloud.networkconnectivity.v1.SpokeSummary result = + new com.google.cloud.networkconnectivity.v1.SpokeSummary(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1.SpokeSummary result) { + if (spokeTypeCountsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + spokeTypeCounts_ = java.util.Collections.unmodifiableList(spokeTypeCounts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.spokeTypeCounts_ = spokeTypeCounts_; + } else { + result.spokeTypeCounts_ = spokeTypeCountsBuilder_.build(); + } + if (spokeStateCountsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + spokeStateCounts_ = java.util.Collections.unmodifiableList(spokeStateCounts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.spokeStateCounts_ = spokeStateCounts_; + } else { + result.spokeStateCounts_ = spokeStateCountsBuilder_.build(); + } + if (spokeStateReasonCountsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + spokeStateReasonCounts_ = java.util.Collections.unmodifiableList(spokeStateReasonCounts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.spokeStateReasonCounts_ = spokeStateReasonCounts_; + } else { + result.spokeStateReasonCounts_ = spokeStateReasonCountsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1.SpokeSummary result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1.SpokeSummary) { + return mergeFrom((com.google.cloud.networkconnectivity.v1.SpokeSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1.SpokeSummary other) { + if (other == com.google.cloud.networkconnectivity.v1.SpokeSummary.getDefaultInstance()) + return this; + if (spokeTypeCountsBuilder_ == null) { + if (!other.spokeTypeCounts_.isEmpty()) { + if (spokeTypeCounts_.isEmpty()) { + spokeTypeCounts_ = other.spokeTypeCounts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.addAll(other.spokeTypeCounts_); + } + onChanged(); + } + } else { + if (!other.spokeTypeCounts_.isEmpty()) { + if (spokeTypeCountsBuilder_.isEmpty()) { + spokeTypeCountsBuilder_.dispose(); + spokeTypeCountsBuilder_ = null; + spokeTypeCounts_ = other.spokeTypeCounts_; + bitField0_ = (bitField0_ & ~0x00000001); + spokeTypeCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpokeTypeCountsFieldBuilder() + : null; + } else { + spokeTypeCountsBuilder_.addAllMessages(other.spokeTypeCounts_); + } + } + } + if (spokeStateCountsBuilder_ == null) { + if (!other.spokeStateCounts_.isEmpty()) { + if (spokeStateCounts_.isEmpty()) { + spokeStateCounts_ = other.spokeStateCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.addAll(other.spokeStateCounts_); + } + onChanged(); + } + } else { + if (!other.spokeStateCounts_.isEmpty()) { + if (spokeStateCountsBuilder_.isEmpty()) { + spokeStateCountsBuilder_.dispose(); + spokeStateCountsBuilder_ = null; + spokeStateCounts_ = other.spokeStateCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + spokeStateCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpokeStateCountsFieldBuilder() + : null; + } else { + spokeStateCountsBuilder_.addAllMessages(other.spokeStateCounts_); + } + } + } + if (spokeStateReasonCountsBuilder_ == null) { + if (!other.spokeStateReasonCounts_.isEmpty()) { + if (spokeStateReasonCounts_.isEmpty()) { + spokeStateReasonCounts_ = other.spokeStateReasonCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.addAll(other.spokeStateReasonCounts_); + } + onChanged(); + } + } else { + if (!other.spokeStateReasonCounts_.isEmpty()) { + if (spokeStateReasonCountsBuilder_.isEmpty()) { + spokeStateReasonCountsBuilder_.dispose(); + spokeStateReasonCountsBuilder_ = null; + spokeStateReasonCounts_ = other.spokeStateReasonCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + spokeStateReasonCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpokeStateReasonCountsFieldBuilder() + : null; + } else { + spokeStateReasonCountsBuilder_.addAllMessages(other.spokeStateReasonCounts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + .parser(), + extensionRegistry); + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(m); + } else { + spokeTypeCountsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + .parser(), + extensionRegistry); + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(m); + } else { + spokeStateCountsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount m = + input.readMessage( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + .parser(), + extensionRegistry); + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(m); + } else { + spokeStateReasonCountsBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + spokeTypeCounts_ = java.util.Collections.emptyList(); + + private void ensureSpokeTypeCountsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + spokeTypeCounts_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount>( + spokeTypeCounts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder> + spokeTypeCountsBuilder_; + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSpokeTypeCountsList() { + if (spokeTypeCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokeTypeCounts_); + } else { + return spokeTypeCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSpokeTypeCountsCount() { + if (spokeTypeCountsBuilder_ == null) { + return spokeTypeCounts_.size(); + } else { + return spokeTypeCountsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount getSpokeTypeCounts( + int index) { + if (spokeTypeCountsBuilder_ == null) { + return spokeTypeCounts_.get(index); + } else { + return spokeTypeCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeTypeCounts( + int index, com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount value) { + if (spokeTypeCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.set(index, value); + onChanged(); + } else { + spokeTypeCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeTypeCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder + builderForValue) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + spokeTypeCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount value) { + if (spokeTypeCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(value); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + int index, com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount value) { + if (spokeTypeCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(index, value); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder + builderForValue) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(builderForValue.build()); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder + builderForValue) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSpokeTypeCounts( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount> + values) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeTypeCounts_); + onChanged(); + } else { + spokeTypeCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeTypeCounts() { + if (spokeTypeCountsBuilder_ == null) { + spokeTypeCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + spokeTypeCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSpokeTypeCounts(int index) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.remove(index); + onChanged(); + } else { + spokeTypeCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder + getSpokeTypeCountsBuilder(int index) { + return getSpokeTypeCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder + getSpokeTypeCountsOrBuilder(int index) { + if (spokeTypeCountsBuilder_ == null) { + return spokeTypeCounts_.get(index); + } else { + return spokeTypeCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsOrBuilderList() { + if (spokeTypeCountsBuilder_ != null) { + return spokeTypeCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokeTypeCounts_); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder + addSpokeTypeCountsBuilder() { + return getSpokeTypeCountsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder + addSpokeTypeCountsBuilder(int index) { + return getSpokeTypeCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder> + getSpokeTypeCountsBuilderList() { + return getSpokeTypeCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsFieldBuilder() { + if (spokeTypeCountsBuilder_ == null) { + spokeTypeCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder>( + spokeTypeCounts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + spokeTypeCounts_ = null; + } + return spokeTypeCountsBuilder_; + } + + private java.util.List + spokeStateCounts_ = java.util.Collections.emptyList(); + + private void ensureSpokeStateCountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + spokeStateCounts_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount>( + spokeStateCounts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder> + spokeStateCountsBuilder_; + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSpokeStateCountsList() { + if (spokeStateCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokeStateCounts_); + } else { + return spokeStateCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSpokeStateCountsCount() { + if (spokeStateCountsBuilder_ == null) { + return spokeStateCounts_.size(); + } else { + return spokeStateCountsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount getSpokeStateCounts( + int index) { + if (spokeStateCountsBuilder_ == null) { + return spokeStateCounts_.get(index); + } else { + return spokeStateCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateCounts( + int index, com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount value) { + if (spokeStateCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.set(index, value); + onChanged(); + } else { + spokeStateCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder + builderForValue) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + spokeStateCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount value) { + if (spokeStateCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(value); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + int index, com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount value) { + if (spokeStateCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(index, value); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder + builderForValue) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(builderForValue.build()); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder + builderForValue) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSpokeStateCounts( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount> + values) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeStateCounts_); + onChanged(); + } else { + spokeStateCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeStateCounts() { + if (spokeStateCountsBuilder_ == null) { + spokeStateCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + spokeStateCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSpokeStateCounts(int index) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.remove(index); + onChanged(); + } else { + spokeStateCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder + getSpokeStateCountsBuilder(int index) { + return getSpokeStateCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder + getSpokeStateCountsOrBuilder(int index) { + if (spokeStateCountsBuilder_ == null) { + return spokeStateCounts_.get(index); + } else { + return spokeStateCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsOrBuilderList() { + if (spokeStateCountsBuilder_ != null) { + return spokeStateCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokeStateCounts_); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder + addSpokeStateCountsBuilder() { + return getSpokeStateCountsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder + addSpokeStateCountsBuilder(int index) { + return getSpokeStateCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder> + getSpokeStateCountsBuilderList() { + return getSpokeStateCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsFieldBuilder() { + if (spokeStateCountsBuilder_ == null) { + spokeStateCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder>( + spokeStateCounts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + spokeStateCounts_ = null; + } + return spokeStateCountsBuilder_; + } + + private java.util.List< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount> + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + + private void ensureSpokeStateReasonCountsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + spokeStateReasonCounts_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount>( + spokeStateReasonCounts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder> + spokeStateReasonCountsBuilder_; + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount> + getSpokeStateReasonCountsList() { + if (spokeStateReasonCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokeStateReasonCounts_); + } else { + return spokeStateReasonCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSpokeStateReasonCountsCount() { + if (spokeStateReasonCountsBuilder_ == null) { + return spokeStateReasonCounts_.size(); + } else { + return spokeStateReasonCountsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + getSpokeStateReasonCounts(int index) { + if (spokeStateReasonCountsBuilder_ == null) { + return spokeStateReasonCounts_.get(index); + } else { + return spokeStateReasonCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount value) { + if (spokeStateReasonCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.set(index, value); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + builderForValue) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount value) { + if (spokeStateReasonCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(value); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount value) { + if (spokeStateReasonCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(index, value); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + builderForValue) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(builderForValue.build()); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + builderForValue) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSpokeStateReasonCounts( + java.lang.Iterable< + ? extends + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount> + values) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeStateReasonCounts_); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeStateReasonCounts() { + if (spokeStateReasonCountsBuilder_ == null) { + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSpokeStateReasonCounts(int index) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.remove(index); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + getSpokeStateReasonCountsBuilder(int index) { + return getSpokeStateReasonCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder + getSpokeStateReasonCountsOrBuilder(int index) { + if (spokeStateReasonCountsBuilder_ == null) { + return spokeStateReasonCounts_.get(index); + } else { + return spokeStateReasonCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsOrBuilderList() { + if (spokeStateReasonCountsBuilder_ != null) { + return spokeStateReasonCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokeStateReasonCounts_); + } + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + addSpokeStateReasonCountsBuilder() { + return getSpokeStateReasonCountsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder + addSpokeStateReasonCountsBuilder(int index) { + return getSpokeStateReasonCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder> + getSpokeStateReasonCountsBuilderList() { + return getSpokeStateReasonCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsFieldBuilder() { + if (spokeStateReasonCountsBuilder_ == null) { + spokeStateReasonCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount, + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount.Builder, + com.google.cloud.networkconnectivity.v1.SpokeSummary + .SpokeStateReasonCountOrBuilder>( + spokeStateReasonCounts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + spokeStateReasonCounts_ = null; + } + return spokeStateReasonCountsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1.SpokeSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1.SpokeSummary) + private static final com.google.cloud.networkconnectivity.v1.SpokeSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1.SpokeSummary(); + } + + public static com.google.cloud.networkconnectivity.v1.SpokeSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1.SpokeSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummaryOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummaryOrBuilder.java new file mode 100644 index 000000000000..ac8ef96c3c55 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeSummaryOrBuilder.java @@ -0,0 +1,238 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +public interface SpokeSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1.SpokeSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSpokeTypeCountsList(); + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount getSpokeTypeCounts(int index); + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSpokeTypeCountsCount(); + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsOrBuilderList(); + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCountOrBuilder + getSpokeTypeCountsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSpokeStateCountsList(); + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount getSpokeStateCounts( + int index); + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSpokeStateCountsCount(); + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsOrBuilderList(); + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCountOrBuilder + getSpokeStateCountsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSpokeStateReasonCountsList(); + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + getSpokeStateReasonCounts(int index); + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSpokeStateReasonCountsCount(); + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsOrBuilderList(); + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCountOrBuilder + getSpokeStateReasonCountsOrBuilder(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeType.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeType.java new file mode 100644 index 000000000000..63b540b97490 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/SpokeType.java @@ -0,0 +1,221 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/networkconnectivity/v1/hub.proto + +package com.google.cloud.networkconnectivity.v1; + +/** + * + * + *
+ * The SpokeType enum represents the type of spoke. The type
+ * reflects the kind of resource that a spoke is associated with.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1.SpokeType} + */ +public enum SpokeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified spoke type.
+   * 
+ * + * SPOKE_TYPE_UNSPECIFIED = 0; + */ + SPOKE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Spokes associated with VPN tunnels.
+   * 
+ * + * VPN_TUNNEL = 1; + */ + VPN_TUNNEL(1), + /** + * + * + *
+   * Spokes associated with VLAN attachments.
+   * 
+ * + * INTERCONNECT_ATTACHMENT = 2; + */ + INTERCONNECT_ATTACHMENT(2), + /** + * + * + *
+   * Spokes associated with router appliance instances.
+   * 
+ * + * ROUTER_APPLIANCE = 3; + */ + ROUTER_APPLIANCE(3), + /** + * + * + *
+   * Spokes associated with VPC networks.
+   * 
+ * + * VPC_NETWORK = 4; + */ + VPC_NETWORK(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified spoke type.
+   * 
+ * + * SPOKE_TYPE_UNSPECIFIED = 0; + */ + public static final int SPOKE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Spokes associated with VPN tunnels.
+   * 
+ * + * VPN_TUNNEL = 1; + */ + public static final int VPN_TUNNEL_VALUE = 1; + /** + * + * + *
+   * Spokes associated with VLAN attachments.
+   * 
+ * + * INTERCONNECT_ATTACHMENT = 2; + */ + public static final int INTERCONNECT_ATTACHMENT_VALUE = 2; + /** + * + * + *
+   * Spokes associated with router appliance instances.
+   * 
+ * + * ROUTER_APPLIANCE = 3; + */ + public static final int ROUTER_APPLIANCE_VALUE = 3; + /** + * + * + *
+   * Spokes associated with VPC networks.
+   * 
+ * + * VPC_NETWORK = 4; + */ + public static final int VPC_NETWORK_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SpokeType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SpokeType forNumber(int value) { + switch (value) { + case 0: + return SPOKE_TYPE_UNSPECIFIED; + case 1: + return VPN_TUNNEL; + case 2: + return INTERCONNECT_ATTACHMENT; + case 3: + return ROUTER_APPLIANCE; + case 4: + return VPC_NETWORK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SpokeType findValueByNumber(int number) { + return SpokeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1.HubProto.getDescriptor().getEnumTypes().get(3); + } + + private static final SpokeType[] VALUES = values(); + + public static SpokeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SpokeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1.SpokeType) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/State.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/State.java index c4369fa407f7..0dd2227c0ade 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/State.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/State.java @@ -43,7 +43,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * The resource's create operation is in progress
+   * The resource's create operation is in progress.
    * 
* * CREATING = 1; @@ -63,7 +63,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * The resource's Delete operation is in progress
+   * The resource's delete operation is in progress.
    * 
* * DELETING = 3; @@ -73,12 +73,53 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * The resource's Update operation is in progress
+   * The resource's accept operation is in progress.
+   * 
+ * + * ACCEPTING = 8; + */ + ACCEPTING(8), + /** + * + * + *
+   * The resource's reject operation is in progress.
+   * 
+ * + * REJECTING = 9; + */ + REJECTING(9), + /** + * + * + *
+   * The resource's update operation is in progress.
    * 
* * UPDATING = 6; */ UPDATING(6), + /** + * + * + *
+   * The resource is inactive.
+   * 
+ * + * INACTIVE = 7; + */ + INACTIVE(7), + /** + * + * + *
+   * The hub associated with this spoke resource has been deleted.
+   * This state applies to spoke resources only.
+   * 
+ * + * OBSOLETE = 10; + */ + OBSOLETE(10), UNRECOGNIZED(-1), ; @@ -96,7 +137,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * The resource's create operation is in progress
+   * The resource's create operation is in progress.
    * 
* * CREATING = 1; @@ -116,7 +157,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * The resource's Delete operation is in progress
+   * The resource's delete operation is in progress.
    * 
* * DELETING = 3; @@ -126,12 +167,53 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-   * The resource's Update operation is in progress
+   * The resource's accept operation is in progress.
+   * 
+ * + * ACCEPTING = 8; + */ + public static final int ACCEPTING_VALUE = 8; + /** + * + * + *
+   * The resource's reject operation is in progress.
+   * 
+ * + * REJECTING = 9; + */ + public static final int REJECTING_VALUE = 9; + /** + * + * + *
+   * The resource's update operation is in progress.
    * 
* * UPDATING = 6; */ public static final int UPDATING_VALUE = 6; + /** + * + * + *
+   * The resource is inactive.
+   * 
+ * + * INACTIVE = 7; + */ + public static final int INACTIVE_VALUE = 7; + /** + * + * + *
+   * The hub associated with this spoke resource has been deleted.
+   * This state applies to spoke resources only.
+   * 
+ * + * OBSOLETE = 10; + */ + public static final int OBSOLETE_VALUE = 10; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -165,8 +247,16 @@ public static State forNumber(int value) { return ACTIVE; case 3: return DELETING; + case 8: + return ACCEPTING; + case 9: + return REJECTING; case 6: return UPDATING; + case 7: + return INACTIVE; + case 10: + return OBSOLETE; default: return null; } @@ -196,7 +286,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.networkconnectivity.v1.HubProto.getDescriptor().getEnumTypes().get(1); + return com.google.cloud.networkconnectivity.v1.HubProto.getDescriptor().getEnumTypes().get(2); } private static final State[] VALUES = values(); diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequest.java index 1679c0754863..d46daa5ea02b 100644 --- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequest.java +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequest.java @@ -185,11 +185,11 @@ public com.google.cloud.networkconnectivity.v1.HubOrBuilder getHubOrBuilder() { * * *
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -221,11 +221,11 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -1095,11 +1095,11 @@ public com.google.cloud.networkconnectivity.v1.HubOrBuilder getHubOrBuilder() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1130,11 +1130,11 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1165,11 +1165,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1199,11 +1199,11 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1229,11 +1229,11 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequestOrBuilder.java
index e1cd4fffa2e9..053d9f52caaf 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequestOrBuilder.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateHubRequestOrBuilder.java
@@ -118,11 +118,11 @@ public interface UpdateHubRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -143,11 +143,11 @@ public interface UpdateHubRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequest.java
index dcb402c8112d..e805a6ff66af 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequest.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequest.java
@@ -189,11 +189,11 @@ public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder(
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -225,11 +225,11 @@ public java.lang.String getRequestId() {
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -1099,11 +1099,11 @@ public com.google.cloud.networkconnectivity.v1.SpokeOrBuilder getSpokeOrBuilder(
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1134,11 +1134,11 @@ public java.lang.String getRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1169,11 +1169,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1203,11 +1203,11 @@ public Builder setRequestId(java.lang.String value) {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
@@ -1233,11 +1233,11 @@ public Builder clearRequestId() {
      *
      *
      * 
-     * Optional. A unique request ID (optional). If you specify this ID, you can
-     * use it in cases when you need to retry your request. When you need to
-     * retry, this ID lets the server know that it can ignore the request if it
-     * has already been completed. The server guarantees that for at least 60
-     * minutes after the first request.
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
      *
      * For example, consider a situation where you make an initial request and
      * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequestOrBuilder.java
index 0638fa128fe8..21d748a7562d 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequestOrBuilder.java
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/java/com/google/cloud/networkconnectivity/v1/UpdateSpokeRequestOrBuilder.java
@@ -118,11 +118,11 @@ public interface UpdateSpokeRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
@@ -143,11 +143,11 @@ public interface UpdateSpokeRequestOrBuilder
    *
    *
    * 
-   * Optional. A unique request ID (optional). If you specify this ID, you can
-   * use it in cases when you need to retry your request. When you need to
-   * retry, this ID lets the server know that it can ignore the request if it
-   * has already been completed. The server guarantees that for at least 60
-   * minutes after the first request.
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
    *
    * For example, consider a situation where you make an initial request and
    * the request times out. If you make the request again with the same request
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/common.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/common.proto
index 892530489356..12efca7b37e6 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/common.proto
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/common.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -39,10 +39,12 @@ option (google.api.resource_definition) = {
 // Represents the metadata of the long-running operation.
 message OperationMetadata {
   // Output only. The time the operation was created.
-  google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+  google.protobuf.Timestamp create_time = 1
+      [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The time the operation finished running.
-  google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  google.protobuf.Timestamp end_time = 2
+      [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. Server-defined resource path for the target of the operation.
   string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -55,8 +57,9 @@ message OperationMetadata {
 
   // Output only. Identifies whether the user has requested cancellation
   // of the operation. Operations that have been cancelled successfully
-  // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
-  // corresponding to `Code.CANCELLED`.
+  // have [Operation.error][] value with a
+  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+  // `Code.CANCELLED`.
   bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. API version used to start the operation.
diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/hub.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/hub.proto
index eef97978f3d9..3ea7e85c2501 100644
--- a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/hub.proto
+++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1/src/main/proto/google/cloud/networkconnectivity/v1/hub.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -20,7 +20,9 @@ import "google/api/annotations.proto";
 import "google/api/client.proto";
 import "google/api/field_behavior.proto";
 import "google/api/resource.proto";
+import "google/cloud/networkconnectivity/v1/common.proto";
 import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
 import "google/protobuf/field_mask.proto";
 import "google/protobuf/timestamp.proto";
 
@@ -103,6 +105,16 @@ service HubService {
     };
   }
 
+  // Lists the Network Connectivity Center spokes associated with a
+  // specified hub and location. The list includes both spokes that are attached
+  // to the hub and spokes that have been proposed but not yet accepted.
+  rpc ListHubSpokes(ListHubSpokesRequest) returns (ListHubSpokesResponse) {
+    option (google.api.http) = {
+      get: "/v1/{name=projects/*/locations/global/hubs/*}:listSpokes"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
   // Lists the Network Connectivity Center spokes in a specified project and
   // location.
   rpc ListSpokes(ListSpokesRequest) returns (ListSpokesResponse) {
@@ -146,6 +158,38 @@ service HubService {
     };
   }
 
+  // Rejects a Network Connectivity Center spoke from being attached to a hub.
+  // If the spoke was previously in the `ACTIVE` state, it
+  // transitions to the `INACTIVE` state and is no longer able to
+  // connect to other spokes that are attached to the hub.
+  rpc RejectHubSpoke(RejectHubSpokeRequest)
+      returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1/{name=projects/*/locations/global/hubs/*}:rejectSpoke"
+      body: "*"
+    };
+    option (google.api.method_signature) = "name,spoke_uri";
+    option (google.longrunning.operation_info) = {
+      response_type: "RejectHubSpokeResponse"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
+  // Accepts a proposal to attach a Network Connectivity Center spoke
+  // to a hub.
+  rpc AcceptHubSpoke(AcceptHubSpokeRequest)
+      returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v1/{name=projects/*/locations/global/hubs/*}:acceptSpoke"
+      body: "*"
+    };
+    option (google.api.method_signature) = "name,spoke_uri";
+    option (google.longrunning.operation_info) = {
+      response_type: "AcceptHubSpokeResponse"
+      metadata_type: "OperationMetadata"
+    };
+  }
+
   // Deletes a Network Connectivity Center spoke.
   rpc DeleteSpoke(DeleteSpokeRequest) returns (google.longrunning.Operation) {
     option (google.api.http) = {
@@ -157,6 +201,55 @@ service HubService {
       metadata_type: "OperationMetadata"
     };
   }
+
+  // Gets details about a Network Connectivity Center route table.
+  rpc GetRouteTable(GetRouteTableRequest) returns (RouteTable) {
+    option (google.api.http) = {
+      get: "/v1/{name=projects/*/locations/global/hubs/*/routeTables/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Gets details about the specified route.
+  rpc GetRoute(GetRouteRequest) returns (Route) {
+    option (google.api.http) = {
+      get: "/v1/{name=projects/*/locations/global/hubs/*/routeTables/*/routes/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Lists routes in a given project.
+  rpc ListRoutes(ListRoutesRequest) returns (ListRoutesResponse) {
+    option (google.api.http) = {
+      get: "/v1/{parent=projects/*/locations/global/hubs/*/routeTables/*}/routes"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Lists route tables in a given project.
+  rpc ListRouteTables(ListRouteTablesRequest)
+      returns (ListRouteTablesResponse) {
+    option (google.api.http) = {
+      get: "/v1/{parent=projects/*/locations/global/hubs/*}/routeTables"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Gets details about a Network Connectivity Center group.
+  rpc GetGroup(GetGroupRequest) returns (Group) {
+    option (google.api.http) = {
+      get: "/v1/{name=projects/*/locations/global/hubs/*/groups/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Lists groups in a given hub.
+  rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) {
+    option (google.api.http) = {
+      get: "/v1/{parent=projects/*/locations/global/hubs/*}/groups"
+    };
+    option (google.api.method_signature) = "parent";
+  }
 }
 
 // Supported features for a location
@@ -171,30 +264,77 @@ enum LocationFeature {
   SITE_TO_SITE_SPOKES = 2;
 }
 
+// The route's type
+enum RouteType {
+  // No route type information specified
+  ROUTE_TYPE_UNSPECIFIED = 0;
+
+  // The route leads to a destination within the primary address range of the
+  // VPC network's subnet.
+  VPC_PRIMARY_SUBNET = 1;
+
+  // The route leads to a destination within the secondary address range of the
+  // VPC network's subnet.
+  VPC_SECONDARY_SUBNET = 2;
+}
+
 // The State enum represents the lifecycle stage of a Network Connectivity
 // Center resource.
 enum State {
   // No state information available
   STATE_UNSPECIFIED = 0;
 
-  // The resource's create operation is in progress
+  // The resource's create operation is in progress.
   CREATING = 1;
 
   // The resource is active
   ACTIVE = 2;
 
-  // The resource's Delete operation is in progress
+  // The resource's delete operation is in progress.
   DELETING = 3;
 
-  // The resource's Update operation is in progress
+  // The resource's accept operation is in progress.
+  ACCEPTING = 8;
+
+  // The resource's reject operation is in progress.
+  REJECTING = 9;
+
+  // The resource's update operation is in progress.
   UPDATING = 6;
+
+  // The resource is inactive.
+  INACTIVE = 7;
+
+  // The hub associated with this spoke resource has been deleted.
+  // This state applies to spoke resources only.
+  OBSOLETE = 10;
 }
 
-// A Network Connectivity Center hub is a collection of spokes. A single hub
-// can contain spokes from multiple regions. However, if any of a hub's spokes
-// use the data transfer feature, the resources associated with those spokes
-// must all reside in the same VPC network. Spokes that do not use data
-// transfer can be associated with any VPC network in your project.
+// The SpokeType enum represents the type of spoke. The type
+// reflects the kind of resource that a spoke is associated with.
+enum SpokeType {
+  // Unspecified spoke type.
+  SPOKE_TYPE_UNSPECIFIED = 0;
+
+  // Spokes associated with VPN tunnels.
+  VPN_TUNNEL = 1;
+
+  // Spokes associated with VLAN attachments.
+  INTERCONNECT_ATTACHMENT = 2;
+
+  // Spokes associated with router appliance instances.
+  ROUTER_APPLIANCE = 3;
+
+  // Spokes associated with VPC networks.
+  VPC_NETWORK = 4;
+}
+
+// A Network Connectivity Center hub is a global management resource to which
+// you attach spokes. A single hub can contain spokes from multiple regions.
+// However, if any of a hub's spokes use the site-to-site data transfer feature,
+// the resources associated with those spokes must all be in the same VPC
+// network. Spokes that do not use site-to-site data transfer can be associated
+// with any VPC network in your project.
 message Hub {
   option (google.api.resource) = {
     type: "networkconnectivity.googleapis.com/Hub"
@@ -214,8 +354,8 @@ message Hub {
   google.protobuf.Timestamp update_time = 3
       [(google.api.field_behavior) = OUTPUT_ONLY];
 
-  // Optional labels in key:value format. For more information about labels, see
-  // [Requirements for
+  // Optional labels in key-value pair format. For more information about
+  // labels, see [Requirements for
   // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
   map labels = 4;
 
@@ -235,6 +375,21 @@ message Hub {
   // This field is read-only. Network Connectivity Center automatically
   // populates it based on the set of spokes attached to the hub.
   repeated RoutingVPC routing_vpcs = 10;
+
+  // Output only. The route tables that belong to this hub. They use the
+  // following form:
+  //    `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+  //
+  // This field is read-only. Network Connectivity Center automatically
+  // populates it based on the route tables nested under the hub.
+  repeated string route_tables = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. A summary of the spokes associated with a hub. The
+  // summary includes a count of spokes according to type
+  // and according to state. If any spokes are inactive,
+  // the summary also lists the reasons they are inactive,
+  // including a count for each reason.
+  SpokeSummary spoke_summary = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
 // RoutingVPC contains information about the VPC networks associated
@@ -254,21 +409,53 @@ message RoutingVPC {
       [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
-// A Network Connectivity Center spoke represents a connection between your
-// Google Cloud network resources and a non-Google-Cloud network.
+// A Network Connectivity Center spoke represents one or more network
+// connectivity resources.
 //
-// When you create a spoke, you associate it with a hub. You must also identify
-// a value for exactly one of the following fields:
+// When you create a spoke, you associate it with a hub. You must also
+// identify a value for exactly one of the following fields:
 //
 // * linked_vpn_tunnels
 // * linked_interconnect_attachments
 // * linked_router_appliance_instances
+// * linked_vpc_network
 message Spoke {
   option (google.api.resource) = {
     type: "networkconnectivity.googleapis.com/Spoke"
     pattern: "projects/{project}/locations/{location}/spokes/{spoke}"
   };
 
+  // The reason a spoke is inactive.
+  message StateReason {
+    // The Code enum represents the various reasons a state can be `INACTIVE`.
+    enum Code {
+      // No information available.
+      CODE_UNSPECIFIED = 0;
+
+      // The proposed spoke is pending review.
+      PENDING_REVIEW = 1;
+
+      // The proposed spoke has been rejected by the hub administrator.
+      REJECTED = 2;
+
+      // The spoke has been deactivated internally.
+      PAUSED = 3;
+
+      // Network Connectivity Center encountered errors while accepting
+      // the spoke.
+      FAILED = 4;
+    }
+
+    // The code associated with this reason.
+    Code code = 1;
+
+    // Human-readable details about this reason.
+    string message = 2;
+
+    // Additional information provided by the user in the RejectSpoke call.
+    string user_details = 3;
+  }
+
   // Immutable. The name of the spoke. Spoke names must be unique. They use the
   // following form:
   //     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
@@ -282,8 +469,8 @@ message Spoke {
   google.protobuf.Timestamp update_time = 3
       [(google.api.field_behavior) = OUTPUT_ONLY];
 
-  // Optional labels in key:value format. For more information about labels, see
-  // [Requirements for
+  // Optional labels in key-value pair format. For more information about
+  // labels, see [Requirements for
   // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
   map labels = 4;
 
@@ -298,6 +485,14 @@ message Spoke {
     }
   ];
 
+  // Optional. The name of the group that this spoke is associated with.
+  string group = 23 [
+    (google.api.field_behavior) = OPTIONAL,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Group"
+    }
+  ];
+
   // VPN tunnels that are associated with the spoke.
   LinkedVpnTunnels linked_vpn_tunnels = 17;
 
@@ -307,13 +502,163 @@ message Spoke {
   // Router appliance instances that are associated with the spoke.
   LinkedRouterApplianceInstances linked_router_appliance_instances = 19;
 
+  // Optional. VPC network that is associated with the spoke.
+  LinkedVpcNetwork linked_vpc_network = 20
+      [(google.api.field_behavior) = OPTIONAL];
+
   // Output only. The Google-generated UUID for the spoke. This value is unique
   // across all spoke resources. If a spoke is deleted and another with the same
-  // name is created, the new spoke is assigned a different unique_id.
+  // name is created, the new spoke is assigned a different `unique_id`.
   string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. The current lifecycle state of this spoke.
   State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The reasons for current state of the spoke. Only present when
+  // the spoke is in the `INACTIVE` state.
+  repeated StateReason reasons = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The type of resource associated with the spoke.
+  SpokeType spoke_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+message RouteTable {
+  option (google.api.resource) = {
+    type: "networkconnectivity.googleapis.com/RouteTable"
+    pattern: "projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}"
+  };
+
+  // Immutable. The name of the route table. Route table names must be unique.
+  // They use the following form:
+  //      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
+
+  // Output only. The time the route table was created.
+  google.protobuf.Timestamp create_time = 2
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The time the route table was last updated.
+  google.protobuf.Timestamp update_time = 3
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Optional labels in key-value pair format. For more information about
+  // labels, see [Requirements for
+  // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+  map labels = 4;
+
+  // An optional description of the route table.
+  string description = 5;
+
+  // Output only. The Google-generated UUID for the route table. This value is
+  // unique across all route table resources. If a route table is deleted and
+  // another with the same name is created, the new route table is assigned
+  // a different `uid`.
+  string uid = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The current lifecycle state of this route table.
+  State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// A route defines a path from VM instances within a spoke to a specific
+// destination resource. Only VPC spokes have routes.
+message Route {
+  option (google.api.resource) = {
+    type: "networkconnectivity.googleapis.com/HubRoute"
+    pattern: "projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}"
+  };
+
+  // Immutable. The name of the route. Route names must be unique. Route names
+  // use the following form:
+  //      `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+  string name = 3 [(google.api.field_behavior) = IMMUTABLE];
+
+  // Output only. The time the route was created.
+  google.protobuf.Timestamp create_time = 4
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The time the route was last updated.
+  google.protobuf.Timestamp update_time = 5
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // The destination IP address range.
+  string ip_cidr_range = 1;
+
+  // Output only. The route's type. Its type is determined by the properties of
+  // its IP address range.
+  RouteType type = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Immutable. The destination VPC network for packets on this route.
+  NextHopVpcNetwork next_hop_vpc_network = 2
+      [(google.api.field_behavior) = IMMUTABLE];
+
+  // Optional labels in key-value pair format. For more information about
+  // labels, see [Requirements for
+  // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+  map labels = 6;
+
+  // An optional description of the route.
+  string description = 7;
+
+  // Output only. The Google-generated UUID for the route. This value is unique
+  // across all Network Connectivity Center route resources. If a
+  // route is deleted and another with the same name is created,
+  // the new route is assigned a different `uid`.
+  string uid = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The current lifecycle state of the route.
+  State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Immutable. The spoke that this route leads to.
+  // Example: projects/12345/locations/global/spokes/SPOKE
+  string spoke = 11 [
+    (google.api.field_behavior) = IMMUTABLE,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Spoke"
+    }
+  ];
+
+  // Output only. The location of the route.
+  // Uses the following form: "projects/{project}/locations/{location}"
+  // Example: projects/1234/locations/us-central1
+  string location = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// A group represents a subset of spokes attached to a hub.
+message Group {
+  option (google.api.resource) = {
+    type: "networkconnectivity.googleapis.com/Group"
+    pattern: "projects/{project}/locations/global/hubs/{hub}/groups/{group}"
+  };
+
+  // Immutable. The name of the group. Group names must be unique. They
+  // use the following form:
+  //      `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
+
+  // Output only. The time the group was created.
+  google.protobuf.Timestamp create_time = 2
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The time the group was last updated.
+  google.protobuf.Timestamp update_time = 3
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Optional. Labels in key-value pair format. For more information about
+  // labels, see [Requirements for
+  // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+  map labels = 4 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The description of the group.
+  string description = 5 [(google.api.field_behavior) = OPTIONAL];
+
+  // Output only. The Google-generated UUID for the group. This value is unique
+  // across all group resources. If a group is deleted and
+  // another with the same name is created, the new route table is assigned
+  // a different unique_id.
+  string uid = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The current lifecycle state of this group.
+  State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
 }
 
 // Request for
@@ -328,13 +673,13 @@ message ListHubsRequest {
     }
   ];
 
-  // The maximum number of results per page that should be returned.
+  // The maximum number of results per page to return.
   int32 page_size = 2;
 
   // The page token.
   string page_token = 3;
 
-  // An expression that filters the results listed in the response.
+  // An expression that filters the list of results.
   string filter = 4;
 
   // Sort the results by a certain order.
@@ -348,8 +693,9 @@ message ListHubsResponse {
   // The requested hubs.
   repeated Hub hubs = 1;
 
-  // The next pagination token in the List response. It should be used as
-  // page_token for the following request. An empty value means no more result.
+  // The token for the next page of the response. To see more results,
+  // use this value as the page_token for your next request. If this value
+  // is empty, there are no more results.
   string next_page_token = 2;
 
   // Locations that could not be reached.
@@ -387,11 +733,11 @@ message CreateHubRequest {
   // Required. The initial values for a new hub.
   Hub hub = 3 [(google.api.field_behavior) = REQUIRED];
 
-  // Optional. A unique request ID (optional). If you specify this ID, you can
-  // use it in cases when you need to retry your request. When you need to
-  // retry, this ID lets the server know that it can ignore the request if it
-  // has already been completed. The server guarantees that for at least 60
-  // minutes after the first request.
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
   //
   // For example, consider a situation where you make an initial request and
   // the request times out. If you make the request again with the same request
@@ -419,11 +765,11 @@ message UpdateHubRequest {
   // Required. The state that the hub should be in after the update.
   Hub hub = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Optional. A unique request ID (optional). If you specify this ID, you can
-  // use it in cases when you need to retry your request. When you need to
-  // retry, this ID lets the server know that it can ignore the request if it
-  // has already been completed. The server guarantees that for at least 60
-  // minutes after the first request.
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
   //
   // For example, consider a situation where you make an initial request and
   // the request times out. If you make the request again with the same request
@@ -447,11 +793,11 @@ message DeleteHubRequest {
     }
   ];
 
-  // Optional. A unique request ID (optional). If you specify this ID, you can
-  // use it in cases when you need to retry your request. When you need to
-  // retry, this ID lets the server know that it can ignore the request if it
-  // has already been completed. The server guarantees that for at least 60
-  // minutes after the first request.
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
   //
   // For example, consider a situation where you make an initial request and
   // the request times out. If you make the request again with the same request
@@ -464,6 +810,79 @@ message DeleteHubRequest {
   string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
 }
 
+// The request for
+// [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
+//
+message ListHubSpokesRequest {
+  // Enum that controls which spoke fields are included in the response.
+  enum SpokeView {
+    // The spoke view is unspecified. When the spoke view is unspecified, the
+    // API returns the same fields as the `BASIC` view.
+    SPOKE_VIEW_UNSPECIFIED = 0;
+
+    // Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
+    // and `spoke_type`. This is the default value.
+    BASIC = 1;
+
+    // Includes all spoke fields except `labels`.
+    // You can use the `DETAILED` view only when you set the `spoke_locations`
+    // field to `[global]`.
+    DETAILED = 2;
+  }
+
+  // Required. The name of the hub.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Hub"
+    }
+  ];
+
+  // A list of locations.
+  // Specify one of the following: `[global]`, a single region (for
+  // example, `[us-central1]`), or a combination of
+  // values (for example, `[global, us-central1, us-west1]`).
+  // If the spoke_locations field is populated, the list of results
+  // includes only spokes in the specified location.
+  // If the spoke_locations field is not populated, the list of results
+  // includes spokes in all locations.
+  repeated string spoke_locations = 2;
+
+  // The maximum number of results to return per page.
+  int32 page_size = 3;
+
+  // The page token.
+  string page_token = 4;
+
+  // An expression that filters the list of results.
+  string filter = 5;
+
+  // Sort the results by name or create_time.
+  string order_by = 6;
+
+  // The view of the spoke to return.
+  // The view that you use determines which spoke fields are included in the
+  // response.
+  SpokeView view = 7;
+}
+
+// The response for
+// [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
+message ListHubSpokesResponse {
+  // The requested spokes.
+  // The spoke fields can be partially populated based on the `view` field in
+  // the request message.
+  repeated Spoke spokes = 1;
+
+  // The token for the next page of the response. To see more results,
+  // use this value as the page_token for your next request. If this value
+  // is empty, there are no more results.
+  string next_page_token = 2;
+
+  // Locations that could not be reached.
+  repeated string unreachable = 3;
+}
+
 // The request for
 // [HubService.ListSpokes][google.cloud.networkconnectivity.v1.HubService.ListSpokes].
 message ListSpokesRequest {
@@ -475,13 +894,13 @@ message ListSpokesRequest {
     }
   ];
 
-  // The maximum number of results per page that should be returned.
+  // The maximum number of results to return per page.
   int32 page_size = 2;
 
   // The page token.
   string page_token = 3;
 
-  // An expression that filters the results listed in the response.
+  // An expression that filters the list of results.
   string filter = 4;
 
   // Sort the results by a certain order.
@@ -494,8 +913,9 @@ message ListSpokesResponse {
   // The requested spokes.
   repeated Spoke spokes = 1;
 
-  // The next pagination token in the List response. It should be used as
-  // page_token for the following request. An empty value means no more result.
+  // The token for the next page of the response. To see more results,
+  // use this value as the page_token for your next request. If this value
+  // is empty, there are no more results.
   string next_page_token = 2;
 
   // Locations that could not be reached.
@@ -531,11 +951,11 @@ message CreateSpokeRequest {
   // Required. The initial values for a new spoke.
   Spoke spoke = 3 [(google.api.field_behavior) = REQUIRED];
 
-  // Optional. A unique request ID (optional). If you specify this ID, you can
-  // use it in cases when you need to retry your request. When you need to
-  // retry, this ID lets the server know that it can ignore the request if it
-  // has already been completed. The server guarantees that for at least 60
-  // minutes after the first request.
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
   //
   // For example, consider a situation where you make an initial request and
   // the request times out. If you make the request again with the same request
@@ -563,11 +983,11 @@ message UpdateSpokeRequest {
   // Required. The state that the spoke should be in after the update.
   Spoke spoke = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Optional. A unique request ID (optional). If you specify this ID, you can
-  // use it in cases when you need to retry your request. When you need to
-  // retry, this ID lets the server know that it can ignore the request if it
-  // has already been completed. The server guarantees that for at least 60
-  // minutes after the first request.
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
   //
   // For example, consider a situation where you make an initial request and
   // the request times out. If you make the request again with the same request
@@ -591,11 +1011,11 @@ message DeleteSpokeRequest {
     }
   ];
 
-  // Optional. A unique request ID (optional). If you specify this ID, you can
-  // use it in cases when you need to retry your request. When you need to
-  // retry, this ID lets the server know that it can ignore the request if it
-  // has already been completed. The server guarantees that for at least 60
-  // minutes after the first request.
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
   //
   // For example, consider a situation where you make an initial request and
   // the request times out. If you make the request again with the same request
@@ -608,6 +1028,242 @@ message DeleteSpokeRequest {
   string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
 }
 
+// The request for
+// [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
+message AcceptHubSpokeRequest {
+  // Required. The name of the hub into which to accept the spoke.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Hub"
+    }
+  ];
+
+  // Required. The URI of the spoke to accept into the hub.
+  string spoke_uri = 2 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Spoke"
+    }
+  ];
+
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
+  //
+  // For example, consider a situation where you make an initial request and
+  // the request times out. If you make the request again with the same request
+  // ID, the server can check to see whether the original operation
+  // was received. If it was, the server ignores the second request. This
+  // behavior prevents clients from mistakenly creating duplicate commitments.
+  //
+  // The request ID must be a valid UUID, with the exception that zero UUID is
+  // not supported (00000000-0000-0000-0000-000000000000).
+  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The response for
+// [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
+message AcceptHubSpokeResponse {
+  // The spoke that was operated on.
+  Spoke spoke = 1;
+}
+
+// The request for
+// [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
+message RejectHubSpokeRequest {
+  // Required. The name of the hub from which to reject the spoke.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Hub"
+    }
+  ];
+
+  // Required. The URI of the spoke to reject from the hub.
+  string spoke_uri = 2 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Spoke"
+    }
+  ];
+
+  // Optional. A request ID to identify requests. Specify a unique request ID so
+  // that if you must retry your request, the server knows to ignore the request
+  // if it has already been completed. The server guarantees that a request
+  // doesn't result in creation of duplicate commitments for at least 60
+  // minutes.
+  //
+  // For example, consider a situation where you make an initial request and
+  // the request times out. If you make the request again with the same request
+  // ID, the server can check to see whether the original operation
+  // was received. If it was, the server ignores the second request. This
+  // behavior prevents clients from mistakenly creating duplicate commitments.
+  //
+  // The request ID must be a valid UUID, with the exception that zero UUID is
+  // not supported (00000000-0000-0000-0000-000000000000).
+  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. Additional information provided by the hub administrator.
+  string details = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// The response for
+// [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
+message RejectHubSpokeResponse {
+  // The spoke that was operated on.
+  Spoke spoke = 1;
+}
+
+// The request for
+// [HubService.GetRouteTable][google.cloud.networkconnectivity.v1.HubService.GetRouteTable].
+message GetRouteTableRequest {
+  // Required. The name of the route table resource.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/RouteTable"
+    }
+  ];
+}
+
+// The request for
+// [HubService.GetRoute][google.cloud.networkconnectivity.v1.HubService.GetRoute].
+message GetRouteRequest {
+  // Required. The name of the route resource.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/HubRoute"
+    }
+  ];
+}
+
+// Request for
+// [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
+// method.
+message ListRoutesRequest {
+  // Required. The parent resource's name.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/RouteTable"
+    }
+  ];
+
+  // The maximum number of results to return per page.
+  int32 page_size = 2;
+
+  // The page token.
+  string page_token = 3;
+
+  // An expression that filters the list of results.
+  string filter = 4;
+
+  // Sort the results by a certain order.
+  string order_by = 5;
+}
+
+// Response for
+// [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
+// method.
+message ListRoutesResponse {
+  // The requested routes.
+  repeated Route routes = 1;
+
+  // The token for the next page of the response. To see more results,
+  // use this value as the page_token for your next request. If this value
+  // is empty, there are no more results.
+  string next_page_token = 2;
+
+  // RouteTables that could not be reached.
+  repeated string unreachable = 3;
+}
+
+// Request for
+// [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
+// method.
+message ListRouteTablesRequest {
+  // Required. The parent resource's name.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Hub"
+    }
+  ];
+
+  // The maximum number of results to return per page.
+  int32 page_size = 2;
+
+  // The page token.
+  string page_token = 3;
+
+  // An expression that filters the list of results.
+  string filter = 4;
+
+  // Sort the results by a certain order.
+  string order_by = 5;
+}
+
+// Response for
+// [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
+// method.
+message ListRouteTablesResponse {
+  // The requested route tables.
+  repeated RouteTable route_tables = 1;
+
+  // The token for the next page of the response. To see more results,
+  // use this value as the page_token for your next request. If this value
+  // is empty, there are no more results.
+  string next_page_token = 2;
+
+  // Hubs that could not be reached.
+  repeated string unreachable = 3;
+}
+
+// Request for
+// [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
+// method.
+message ListGroupsRequest {
+  // Required. The parent resource's name.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Hub"
+    }
+  ];
+
+  // The maximum number of results to return per page.
+  int32 page_size = 2;
+
+  // The page token.
+  string page_token = 3;
+
+  // An expression that filters the list of results.
+  string filter = 4;
+
+  // Sort the results by a certain order.
+  string order_by = 5;
+}
+
+// Response for
+// [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
+// method.
+message ListGroupsResponse {
+  // The requested groups.
+  repeated Group groups = 1;
+
+  // The token for the next page of the response. To see more results,
+  // use this value as the page_token for your next request. If this value
+  // is empty, there are no more results.
+  string next_page_token = 2;
+
+  // Hubs that could not be reached.
+  repeated string unreachable = 3;
+}
+
 // A collection of Cloud VPN tunnel resources. These resources should be
 // redundant HA VPN tunnels that all advertise the same prefixes to Google
 // Cloud. Alternatively, in a passive/active configuration, all tunnels
@@ -673,6 +1329,19 @@ message LinkedRouterApplianceInstances {
   ];
 }
 
+// An existing VPC network.
+message LinkedVpcNetwork {
+  // Required. The URI of the VPC network resource.
+  string uri = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
+  ];
+
+  // Optional. IP ranges encompassing the subnets to be excluded from peering.
+  repeated string exclude_export_ranges = 2
+      [(google.api.field_behavior) = OPTIONAL];
+}
+
 // A router appliance instance is a Compute Engine virtual machine (VM) instance
 // that acts as a BGP speaker. A router appliance instance is specified by the
 // URI of the VM and the internal IP address of one of the VM's network
@@ -692,3 +1361,78 @@ message LocationMetadata {
   // List of supported features
   repeated LocationFeature location_features = 1;
 }
+
+message NextHopVpcNetwork {
+  // The URI of the VPC network resource
+  string uri = 1 [
+    (google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
+  ];
+}
+
+// Summarizes information about the spokes associated with a hub.
+// The summary includes a count of spokes according to type
+// and according to state. If any spokes are inactive,
+// the summary also lists the reasons they are inactive,
+// including a count for each reason.
+message SpokeSummary {
+  // The number of spokes of a given type that are associated
+  // with a specific hub. The type indicates what kind of
+  // resource is associated with the spoke.
+  message SpokeTypeCount {
+    // Output only. The type of the spokes.
+    SpokeType spoke_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+    // Output only. The total number of spokes of this type that are
+    // associated with the hub.
+    int64 count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // The number of spokes that are in a particular state
+  // and associated with a given hub.
+  message SpokeStateCount {
+    // Output only. The state of the spokes.
+    State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+    // Output only. The total number of spokes that are in this state
+    // and associated with a given hub.
+    int64 count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // The number of spokes in the hub that are inactive for this reason.
+  message SpokeStateReasonCount {
+    // Output only. The reason that a spoke is inactive.
+    Spoke.StateReason.Code state_reason_code = 1
+        [(google.api.field_behavior) = OUTPUT_ONLY];
+
+    // Output only. The total number of spokes that are inactive for a
+    // particular reason and associated with a given hub.
+    int64 count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // Output only. Counts the number of spokes of each type that are
+  // associated with a specific hub.
+  repeated SpokeTypeCount spoke_type_counts = 1
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Counts the number of spokes that are in each state
+  // and associated with a given hub.
+  repeated SpokeStateCount spoke_state_counts = 2
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Counts the number of spokes that are inactive for each
+  // possible reason and associated with a given hub.
+  repeated SpokeStateReasonCount spoke_state_reason_counts = 3
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// The request for
+// [HubService.GetGroup][google.cloud.networkconnectivity.v1.HubService.GetGroup].
+message GetGroupRequest {
+  // Required. The name of the route table resource.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "networkconnectivity.googleapis.com/Group"
+    }
+  ];
+}
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java
new file mode 100644
index 000000000000..019d4c9630a5
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+import com.google.longrunning.Operation;
+
+public class AsyncAcceptHubSpoke {
+
+  public static void main(String[] args) throws Exception {
+    asyncAcceptHubSpoke();
+  }
+
+  public static void asyncAcceptHubSpoke() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      AcceptHubSpokeRequest request =
+          AcceptHubSpokeRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+              .setRequestId("requestId693933066")
+              .build();
+      ApiFuture future = hubServiceClient.acceptHubSpokeCallable().futureCall(request);
+      // Do something.
+      Operation response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java
new file mode 100644
index 000000000000..7ac23896305c
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_LRO_async]
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest;
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.OperationMetadata;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class AsyncAcceptHubSpokeLRO {
+
+  public static void main(String[] args) throws Exception {
+    asyncAcceptHubSpokeLRO();
+  }
+
+  public static void asyncAcceptHubSpokeLRO() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      AcceptHubSpokeRequest request =
+          AcceptHubSpokeRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+              .setRequestId("requestId693933066")
+              .build();
+      OperationFuture future =
+          hubServiceClient.acceptHubSpokeOperationCallable().futureCall(request);
+      // Do something.
+      AcceptHubSpokeResponse response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_LRO_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpoke.java
new file mode 100644
index 000000000000..8f677bbf3529
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpoke.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_sync]
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest;
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncAcceptHubSpoke {
+
+  public static void main(String[] args) throws Exception {
+    syncAcceptHubSpoke();
+  }
+
+  public static void syncAcceptHubSpoke() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      AcceptHubSpokeRequest request =
+          AcceptHubSpokeRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+              .setRequestId("requestId693933066")
+              .build();
+      AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(request).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java
new file mode 100644
index 000000000000..e668823ff5c1
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_HubnameSpokename_sync]
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncAcceptHubSpokeHubnameSpokename {
+
+  public static void main(String[] args) throws Exception {
+    syncAcceptHubSpokeHubnameSpokename();
+  }
+
+  public static void syncAcceptHubSpokeHubnameSpokename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName name = HubName.of("[PROJECT]", "[HUB]");
+      SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+      AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_HubnameSpokename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java
new file mode 100644
index 000000000000..464f5c214515
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_HubnameString_sync]
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncAcceptHubSpokeHubnameString {
+
+  public static void main(String[] args) throws Exception {
+    syncAcceptHubSpokeHubnameString();
+  }
+
+  public static void syncAcceptHubSpokeHubnameString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName name = HubName.of("[PROJECT]", "[HUB]");
+      String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+      AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_HubnameString_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java
new file mode 100644
index 000000000000..75692f0636c2
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_StringSpokename_sync]
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncAcceptHubSpokeStringSpokename {
+
+  public static void main(String[] args) throws Exception {
+    syncAcceptHubSpokeStringSpokename();
+  }
+
+  public static void syncAcceptHubSpokeStringSpokename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = HubName.of("[PROJECT]", "[HUB]").toString();
+      SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+      AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_StringSpokename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java
new file mode 100644
index 000000000000..5ef244b94dfb
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_AcceptHubSpoke_StringString_sync]
+import com.google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncAcceptHubSpokeStringString {
+
+  public static void main(String[] args) throws Exception {
+    syncAcceptHubSpokeStringString();
+  }
+
+  public static void syncAcceptHubSpokeStringString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = HubName.of("[PROJECT]", "[HUB]").toString();
+      String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+      AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_StringString_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/AsyncGetGroup.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/AsyncGetGroup.java
new file mode 100644
index 000000000000..dca509bb9e3d
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/AsyncGetGroup.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2023 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_HubService_GetGroup_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GetGroupRequest;
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class AsyncGetGroup {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetGroup();
+  }
+
+  public static void asyncGetGroup() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetGroupRequest request =
+          GetGroupRequest.newBuilder()
+              .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .build();
+      ApiFuture future = hubServiceClient.getGroupCallable().futureCall(request);
+      // Do something.
+      Group response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetGroup_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroup.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroup.java
new file mode 100644
index 000000000000..f3574d9006cc
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroup.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2023 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_HubService_GetGroup_sync]
+import com.google.cloud.networkconnectivity.v1.GetGroupRequest;
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncGetGroup {
+
+  public static void main(String[] args) throws Exception {
+    syncGetGroup();
+  }
+
+  public static void syncGetGroup() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetGroupRequest request =
+          GetGroupRequest.newBuilder()
+              .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .build();
+      Group response = hubServiceClient.getGroup(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetGroup_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupGroupname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupGroupname.java
new file mode 100644
index 000000000000..0e6436dca3e3
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupGroupname.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetGroup_Groupname_sync]
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncGetGroupGroupname {
+
+  public static void main(String[] args) throws Exception {
+    syncGetGroupGroupname();
+  }
+
+  public static void syncGetGroupGroupname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]");
+      Group response = hubServiceClient.getGroup(name);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetGroup_Groupname_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupString.java
new file mode 100644
index 000000000000..e5245f0654ae
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getgroup/SyncGetGroupString.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetGroup_String_sync]
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncGetGroupString {
+
+  public static void main(String[] args) throws Exception {
+    syncGetGroupString();
+  }
+
+  public static void syncGetGroupString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString();
+      Group response = hubServiceClient.getGroup(name);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetGroup_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/AsyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/AsyncGetIamPolicy.java
new file mode 100644
index 000000000000..a08fc3a4615c
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/AsyncGetIamPolicy.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2023 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_HubService_GetIamPolicy_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.GetPolicyOptions;
+import com.google.iam.v1.Policy;
+
+public class AsyncGetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetIamPolicy();
+  }
+
+  public static void asyncGetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetIamPolicyRequest request =
+          GetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setOptions(GetPolicyOptions.newBuilder().build())
+              .build();
+      ApiFuture future = hubServiceClient.getIamPolicyCallable().futureCall(request);
+      // Do something.
+      Policy response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetIamPolicy_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/SyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/SyncGetIamPolicy.java
new file mode 100644
index 000000000000..34da5e887f42
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getiampolicy/SyncGetIamPolicy.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2023 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_HubService_GetIamPolicy_sync]
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.GetPolicyOptions;
+import com.google.iam.v1.Policy;
+
+public class SyncGetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    syncGetIamPolicy();
+  }
+
+  public static void syncGetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetIamPolicyRequest request =
+          GetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setOptions(GetPolicyOptions.newBuilder().build())
+              .build();
+      Policy response = hubServiceClient.getIamPolicy(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetIamPolicy_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/AsyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/AsyncGetLocation.java
new file mode 100644
index 000000000000..238d5e356804
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/AsyncGetLocation.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2023 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_HubService_GetLocation_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class AsyncGetLocation {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetLocation();
+  }
+
+  public static void asyncGetLocation() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+      ApiFuture future = hubServiceClient.getLocationCallable().futureCall(request);
+      // Do something.
+      Location response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetLocation_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/SyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/SyncGetLocation.java
new file mode 100644
index 000000000000..cd5df7a0c77d
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getlocation/SyncGetLocation.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetLocation_sync]
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncGetLocation {
+
+  public static void main(String[] args) throws Exception {
+    syncGetLocation();
+  }
+
+  public static void syncGetLocation() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+      Location response = hubServiceClient.getLocation(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetLocation_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/AsyncGetRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/AsyncGetRoute.java
new file mode 100644
index 000000000000..becf8ade5d74
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/AsyncGetRoute.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2023 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_HubService_GetRoute_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GetRouteRequest;
+import com.google.cloud.networkconnectivity.v1.HubRouteName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Route;
+
+public class AsyncGetRoute {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetRoute();
+  }
+
+  public static void asyncGetRoute() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetRouteRequest request =
+          GetRouteRequest.newBuilder()
+              .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+              .build();
+      ApiFuture future = hubServiceClient.getRouteCallable().futureCall(request);
+      // Do something.
+      Route response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRoute_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRoute.java
new file mode 100644
index 000000000000..0830717aa8d6
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRoute.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2023 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_HubService_GetRoute_sync]
+import com.google.cloud.networkconnectivity.v1.GetRouteRequest;
+import com.google.cloud.networkconnectivity.v1.HubRouteName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Route;
+
+public class SyncGetRoute {
+
+  public static void main(String[] args) throws Exception {
+    syncGetRoute();
+  }
+
+  public static void syncGetRoute() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetRouteRequest request =
+          GetRouteRequest.newBuilder()
+              .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+              .build();
+      Route response = hubServiceClient.getRoute(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRoute_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteHubroutename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteHubroutename.java
new file mode 100644
index 000000000000..0d5314a637a7
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteHubroutename.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetRoute_Hubroutename_sync]
+import com.google.cloud.networkconnectivity.v1.HubRouteName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Route;
+
+public class SyncGetRouteHubroutename {
+
+  public static void main(String[] args) throws Exception {
+    syncGetRouteHubroutename();
+  }
+
+  public static void syncGetRouteHubroutename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
+      Route response = hubServiceClient.getRoute(name);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRoute_Hubroutename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteString.java
new file mode 100644
index 000000000000..a453899015ee
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroute/SyncGetRouteString.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetRoute_String_sync]
+import com.google.cloud.networkconnectivity.v1.HubRouteName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Route;
+
+public class SyncGetRouteString {
+
+  public static void main(String[] args) throws Exception {
+    syncGetRouteString();
+  }
+
+  public static void syncGetRouteString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString();
+      Route response = hubServiceClient.getRoute(name);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRoute_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/AsyncGetRouteTable.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/AsyncGetRouteTable.java
new file mode 100644
index 000000000000..bc5056c1a7aa
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/AsyncGetRouteTable.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2023 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_HubService_GetRouteTable_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GetRouteTableRequest;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class AsyncGetRouteTable {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetRouteTable();
+  }
+
+  public static void asyncGetRouteTable() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetRouteTableRequest request =
+          GetRouteTableRequest.newBuilder()
+              .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+              .build();
+      ApiFuture future = hubServiceClient.getRouteTableCallable().futureCall(request);
+      // Do something.
+      RouteTable response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRouteTable_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTable.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTable.java
new file mode 100644
index 000000000000..383d8964906a
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTable.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2023 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_HubService_GetRouteTable_sync]
+import com.google.cloud.networkconnectivity.v1.GetRouteTableRequest;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class SyncGetRouteTable {
+
+  public static void main(String[] args) throws Exception {
+    syncGetRouteTable();
+  }
+
+  public static void syncGetRouteTable() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      GetRouteTableRequest request =
+          GetRouteTableRequest.newBuilder()
+              .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+              .build();
+      RouteTable response = hubServiceClient.getRouteTable(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRouteTable_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java
new file mode 100644
index 000000000000..756cf68703cf
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetRouteTable_Routetablename_sync]
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class SyncGetRouteTableRoutetablename {
+
+  public static void main(String[] args) throws Exception {
+    syncGetRouteTableRoutetablename();
+  }
+
+  public static void syncGetRouteTableRoutetablename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+      RouteTable response = hubServiceClient.getRouteTable(name);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRouteTable_Routetablename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableString.java
new file mode 100644
index 000000000000..c5c775fe2fe6
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/getroutetable/SyncGetRouteTableString.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2023 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_HubService_GetRouteTable_String_sync]
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class SyncGetRouteTableString {
+
+  public static void main(String[] args) throws Exception {
+    syncGetRouteTableString();
+  }
+
+  public static void syncGetRouteTableString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+      RouteTable response = hubServiceClient.getRouteTable(name);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_GetRouteTable_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroups.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroups.java
new file mode 100644
index 000000000000..92f74d87c769
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroups.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2023 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_HubService_ListGroups_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListGroupsRequest;
+
+public class AsyncListGroups {
+
+  public static void main(String[] args) throws Exception {
+    asyncListGroups();
+  }
+
+  public static void asyncListGroups() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListGroupsRequest request =
+          ListGroupsRequest.newBuilder()
+              .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      ApiFuture future = hubServiceClient.listGroupsPagedCallable().futureCall(request);
+      // Do something.
+      for (Group element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListGroups_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroupsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroupsPaged.java
new file mode 100644
index 000000000000..e2fa63c226df
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/AsyncListGroupsPaged.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2023 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_HubService_ListGroups_Paged_async]
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListGroupsRequest;
+import com.google.cloud.networkconnectivity.v1.ListGroupsResponse;
+import com.google.common.base.Strings;
+
+public class AsyncListGroupsPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListGroupsPaged();
+  }
+
+  public static void asyncListGroupsPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListGroupsRequest request =
+          ListGroupsRequest.newBuilder()
+              .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      while (true) {
+        ListGroupsResponse response = hubServiceClient.listGroupsCallable().call(request);
+        for (Group element : response.getGroupsList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListGroups_Paged_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroups.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroups.java
new file mode 100644
index 000000000000..701dfc865890
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroups.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 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_HubService_ListGroups_sync]
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListGroupsRequest;
+
+public class SyncListGroups {
+
+  public static void main(String[] args) throws Exception {
+    syncListGroups();
+  }
+
+  public static void syncListGroups() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListGroupsRequest request =
+          ListGroupsRequest.newBuilder()
+              .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      for (Group element : hubServiceClient.listGroups(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListGroups_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsHubname.java
new file mode 100644
index 000000000000..3f5ece2c5b06
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsHubname.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListGroups_Hubname_sync]
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncListGroupsHubname {
+
+  public static void main(String[] args) throws Exception {
+    syncListGroupsHubname();
+  }
+
+  public static void syncListGroupsHubname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName parent = HubName.of("[PROJECT]", "[HUB]");
+      for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListGroups_Hubname_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsString.java
new file mode 100644
index 000000000000..f6f8e1555f51
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listgroups/SyncListGroupsString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListGroups_String_sync]
+import com.google.cloud.networkconnectivity.v1.Group;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncListGroupsString {
+
+  public static void main(String[] args) throws Exception {
+    syncListGroupsString();
+  }
+
+  public static void syncListGroupsString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+      for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListGroups_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokes.java
new file mode 100644
index 000000000000..5ff17a529287
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokes.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2023 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_HubService_ListHubSpokes_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest;
+import com.google.cloud.networkconnectivity.v1.Spoke;
+import java.util.ArrayList;
+
+public class AsyncListHubSpokes {
+
+  public static void main(String[] args) throws Exception {
+    asyncListHubSpokes();
+  }
+
+  public static void asyncListHubSpokes() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListHubSpokesRequest request =
+          ListHubSpokesRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .addAllSpokeLocations(new ArrayList())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      ApiFuture future = hubServiceClient.listHubSpokesPagedCallable().futureCall(request);
+      // Do something.
+      for (Spoke element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokesPaged.java
new file mode 100644
index 000000000000..600fc3256ad3
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/AsyncListHubSpokesPaged.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2023 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_HubService_ListHubSpokes_Paged_async]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest;
+import com.google.cloud.networkconnectivity.v1.ListHubSpokesResponse;
+import com.google.cloud.networkconnectivity.v1.Spoke;
+import com.google.common.base.Strings;
+import java.util.ArrayList;
+
+public class AsyncListHubSpokesPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListHubSpokesPaged();
+  }
+
+  public static void asyncListHubSpokesPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListHubSpokesRequest request =
+          ListHubSpokesRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .addAllSpokeLocations(new ArrayList())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      while (true) {
+        ListHubSpokesResponse response = hubServiceClient.listHubSpokesCallable().call(request);
+        for (Spoke element : response.getSpokesList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_Paged_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokes.java
new file mode 100644
index 000000000000..03c8b45b437a
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokes.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2023 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_HubService_ListHubSpokes_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListHubSpokesRequest;
+import com.google.cloud.networkconnectivity.v1.Spoke;
+import java.util.ArrayList;
+
+public class SyncListHubSpokes {
+
+  public static void main(String[] args) throws Exception {
+    syncListHubSpokes();
+  }
+
+  public static void syncListHubSpokes() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListHubSpokesRequest request =
+          ListHubSpokesRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .addAllSpokeLocations(new ArrayList())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      for (Spoke element : hubServiceClient.listHubSpokes(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesHubname.java
new file mode 100644
index 000000000000..3e399c3fa37e
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesHubname.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListHubSpokes_Hubname_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Spoke;
+
+public class SyncListHubSpokesHubname {
+
+  public static void main(String[] args) throws Exception {
+    syncListHubSpokesHubname();
+  }
+
+  public static void syncListHubSpokesHubname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName name = HubName.of("[PROJECT]", "[HUB]");
+      for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_Hubname_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesString.java
new file mode 100644
index 000000000000..d85013fb4481
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listhubspokes/SyncListHubSpokesString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListHubSpokes_String_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Spoke;
+
+public class SyncListHubSpokesString {
+
+  public static void main(String[] args) throws Exception {
+    syncListHubSpokesString();
+  }
+
+  public static void syncListHubSpokesString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = HubName.of("[PROJECT]", "[HUB]").toString();
+      for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocations.java
new file mode 100644
index 000000000000..40d2f3f6205c
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocations.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2023 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_HubService_ListLocations_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class AsyncListLocations {
+
+  public static void main(String[] args) throws Exception {
+    asyncListLocations();
+  }
+
+  public static void asyncListLocations() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      ApiFuture future =
+          hubServiceClient.listLocationsPagedCallable().futureCall(request);
+      // Do something.
+      for (Location element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListLocations_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocationsPaged.java
new file mode 100644
index 000000000000..557a4d0cdab3
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/AsyncListLocationsPaged.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2023 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_HubService_ListLocations_Paged_async]
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.common.base.Strings;
+
+public class AsyncListLocationsPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListLocationsPaged();
+  }
+
+  public static void asyncListLocationsPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      while (true) {
+        ListLocationsResponse response = hubServiceClient.listLocationsCallable().call(request);
+        for (Location element : response.getLocationsList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListLocations_Paged_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/SyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/SyncListLocations.java
new file mode 100644
index 000000000000..e4a171958d0c
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listlocations/SyncListLocations.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2023 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_HubService_ListLocations_sync]
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+
+public class SyncListLocations {
+
+  public static void main(String[] args) throws Exception {
+    syncListLocations();
+  }
+
+  public static void syncListLocations() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      for (Location element : hubServiceClient.listLocations(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListLocations_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutes.java
new file mode 100644
index 000000000000..4d2c65cd8d29
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutes.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2023 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_HubService_ListRoutes_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListRoutesRequest;
+import com.google.cloud.networkconnectivity.v1.Route;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class AsyncListRoutes {
+
+  public static void main(String[] args) throws Exception {
+    asyncListRoutes();
+  }
+
+  public static void asyncListRoutes() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListRoutesRequest request =
+          ListRoutesRequest.newBuilder()
+              .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      ApiFuture future = hubServiceClient.listRoutesPagedCallable().futureCall(request);
+      // Do something.
+      for (Route element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRoutes_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutesPaged.java
new file mode 100644
index 000000000000..41755258111f
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/AsyncListRoutesPaged.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2023 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_HubService_ListRoutes_Paged_async]
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListRoutesRequest;
+import com.google.cloud.networkconnectivity.v1.ListRoutesResponse;
+import com.google.cloud.networkconnectivity.v1.Route;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+import com.google.common.base.Strings;
+
+public class AsyncListRoutesPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListRoutesPaged();
+  }
+
+  public static void asyncListRoutesPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListRoutesRequest request =
+          ListRoutesRequest.newBuilder()
+              .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      while (true) {
+        ListRoutesResponse response = hubServiceClient.listRoutesCallable().call(request);
+        for (Route element : response.getRoutesList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRoutes_Paged_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutes.java
new file mode 100644
index 000000000000..83c24bf6f62c
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutes.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 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_HubService_ListRoutes_sync]
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListRoutesRequest;
+import com.google.cloud.networkconnectivity.v1.Route;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class SyncListRoutes {
+
+  public static void main(String[] args) throws Exception {
+    syncListRoutes();
+  }
+
+  public static void syncListRoutes() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListRoutesRequest request =
+          ListRoutesRequest.newBuilder()
+              .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      for (Route element : hubServiceClient.listRoutes(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRoutes_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesRoutetablename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesRoutetablename.java
new file mode 100644
index 000000000000..46d847c1b7c4
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesRoutetablename.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListRoutes_Routetablename_sync]
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Route;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class SyncListRoutesRoutetablename {
+
+  public static void main(String[] args) throws Exception {
+    syncListRoutesRoutetablename();
+  }
+
+  public static void syncListRoutesRoutetablename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+      for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRoutes_Routetablename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesString.java
new file mode 100644
index 000000000000..1b0811c845cd
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutes/SyncListRoutesString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListRoutes_String_sync]
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.Route;
+import com.google.cloud.networkconnectivity.v1.RouteTableName;
+
+public class SyncListRoutesString {
+
+  public static void main(String[] args) throws Exception {
+    syncListRoutesString();
+  }
+
+  public static void syncListRoutesString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+      for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRoutes_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTables.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTables.java
new file mode 100644
index 000000000000..59e19d47c08a
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTables.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2023 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_HubService_ListRouteTables_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+
+public class AsyncListRouteTables {
+
+  public static void main(String[] args) throws Exception {
+    asyncListRouteTables();
+  }
+
+  public static void asyncListRouteTables() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListRouteTablesRequest request =
+          ListRouteTablesRequest.newBuilder()
+              .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      ApiFuture future =
+          hubServiceClient.listRouteTablesPagedCallable().futureCall(request);
+      // Do something.
+      for (RouteTable element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRouteTables_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTablesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTablesPaged.java
new file mode 100644
index 000000000000..fca501513fe9
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/AsyncListRouteTablesPaged.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2023 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_HubService_ListRouteTables_Paged_async]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest;
+import com.google.cloud.networkconnectivity.v1.ListRouteTablesResponse;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+import com.google.common.base.Strings;
+
+public class AsyncListRouteTablesPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListRouteTablesPaged();
+  }
+
+  public static void asyncListRouteTablesPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListRouteTablesRequest request =
+          ListRouteTablesRequest.newBuilder()
+              .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      while (true) {
+        ListRouteTablesResponse response = hubServiceClient.listRouteTablesCallable().call(request);
+        for (RouteTable element : response.getRouteTablesList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRouteTables_Paged_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTables.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTables.java
new file mode 100644
index 000000000000..d1a6c90ceeeb
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTables.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 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_HubService_ListRouteTables_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.ListRouteTablesRequest;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+
+public class SyncListRouteTables {
+
+  public static void main(String[] args) throws Exception {
+    syncListRouteTables();
+  }
+
+  public static void syncListRouteTables() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      ListRouteTablesRequest request =
+          ListRouteTablesRequest.newBuilder()
+              .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .setFilter("filter-1274492040")
+              .setOrderBy("orderBy-1207110587")
+              .build();
+      for (RouteTable element : hubServiceClient.listRouteTables(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRouteTables_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesHubname.java
new file mode 100644
index 000000000000..46742d91b335
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesHubname.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListRouteTables_Hubname_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+
+public class SyncListRouteTablesHubname {
+
+  public static void main(String[] args) throws Exception {
+    syncListRouteTablesHubname();
+  }
+
+  public static void syncListRouteTablesHubname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName parent = HubName.of("[PROJECT]", "[HUB]");
+      for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRouteTables_Hubname_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesString.java
new file mode 100644
index 000000000000..da4f950ba75f
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/listroutetables/SyncListRouteTablesString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_ListRouteTables_String_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RouteTable;
+
+public class SyncListRouteTablesString {
+
+  public static void main(String[] args) throws Exception {
+    syncListRouteTablesString();
+  }
+
+  public static void syncListRouteTablesString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+      for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_ListRouteTables_String_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java
new file mode 100644
index 000000000000..c1e5add3465d
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+import com.google.longrunning.Operation;
+
+public class AsyncRejectHubSpoke {
+
+  public static void main(String[] args) throws Exception {
+    asyncRejectHubSpoke();
+  }
+
+  public static void asyncRejectHubSpoke() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      RejectHubSpokeRequest request =
+          RejectHubSpokeRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+              .setRequestId("requestId693933066")
+              .setDetails("details1557721666")
+              .build();
+      ApiFuture future = hubServiceClient.rejectHubSpokeCallable().futureCall(request);
+      // Do something.
+      Operation response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java
new file mode 100644
index 000000000000..6002cde21800
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_LRO_async]
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.OperationMetadata;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class AsyncRejectHubSpokeLRO {
+
+  public static void main(String[] args) throws Exception {
+    asyncRejectHubSpokeLRO();
+  }
+
+  public static void asyncRejectHubSpokeLRO() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      RejectHubSpokeRequest request =
+          RejectHubSpokeRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+              .setRequestId("requestId693933066")
+              .setDetails("details1557721666")
+              .build();
+      OperationFuture future =
+          hubServiceClient.rejectHubSpokeOperationCallable().futureCall(request);
+      // Do something.
+      RejectHubSpokeResponse response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_LRO_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpoke.java
new file mode 100644
index 000000000000..558a1b12b469
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpoke.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeRequest;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncRejectHubSpoke {
+
+  public static void main(String[] args) throws Exception {
+    syncRejectHubSpoke();
+  }
+
+  public static void syncRejectHubSpoke() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      RejectHubSpokeRequest request =
+          RejectHubSpokeRequest.newBuilder()
+              .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+              .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+              .setRequestId("requestId693933066")
+              .setDetails("details1557721666")
+              .build();
+      RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(request).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java
new file mode 100644
index 000000000000..48cda01a4df9
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_HubnameSpokename_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncRejectHubSpokeHubnameSpokename {
+
+  public static void main(String[] args) throws Exception {
+    syncRejectHubSpokeHubnameSpokename();
+  }
+
+  public static void syncRejectHubSpokeHubnameSpokename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName name = HubName.of("[PROJECT]", "[HUB]");
+      SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+      RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_HubnameSpokename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java
new file mode 100644
index 000000000000..da70f4974f2b
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_HubnameString_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncRejectHubSpokeHubnameString {
+
+  public static void main(String[] args) throws Exception {
+    syncRejectHubSpokeHubnameString();
+  }
+
+  public static void syncRejectHubSpokeHubnameString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      HubName name = HubName.of("[PROJECT]", "[HUB]");
+      String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+      RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_HubnameString_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java
new file mode 100644
index 000000000000..8bdd401f4ffe
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_StringSpokename_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncRejectHubSpokeStringSpokename {
+
+  public static void main(String[] args) throws Exception {
+    syncRejectHubSpokeStringSpokename();
+  }
+
+  public static void syncRejectHubSpokeStringSpokename() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = HubName.of("[PROJECT]", "[HUB]").toString();
+      SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+      RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_StringSpokename_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java
new file mode 100644
index 000000000000..6bed8139a643
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2023 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_HubService_RejectHubSpoke_StringString_sync]
+import com.google.cloud.networkconnectivity.v1.HubName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.cloud.networkconnectivity.v1.RejectHubSpokeResponse;
+import com.google.cloud.networkconnectivity.v1.SpokeName;
+
+public class SyncRejectHubSpokeStringString {
+
+  public static void main(String[] args) throws Exception {
+    syncRejectHubSpokeStringString();
+  }
+
+  public static void syncRejectHubSpokeStringString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      String name = HubName.of("[PROJECT]", "[HUB]").toString();
+      String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+      RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_StringString_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/AsyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/AsyncSetIamPolicy.java
new file mode 100644
index 000000000000..1aeb7f231910
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/AsyncSetIamPolicy.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 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_HubService_SetIamPolicy_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.protobuf.FieldMask;
+
+public class AsyncSetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    asyncSetIamPolicy();
+  }
+
+  public static void asyncSetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      SetIamPolicyRequest request =
+          SetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setPolicy(Policy.newBuilder().build())
+              .setUpdateMask(FieldMask.newBuilder().build())
+              .build();
+      ApiFuture future = hubServiceClient.setIamPolicyCallable().futureCall(request);
+      // Do something.
+      Policy response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_SetIamPolicy_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/SyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/SyncSetIamPolicy.java
new file mode 100644
index 000000000000..d0d89d954a4f
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/setiampolicy/SyncSetIamPolicy.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2023 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_HubService_SetIamPolicy_sync]
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.protobuf.FieldMask;
+
+public class SyncSetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    syncSetIamPolicy();
+  }
+
+  public static void syncSetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      SetIamPolicyRequest request =
+          SetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setPolicy(Policy.newBuilder().build())
+              .setUpdateMask(FieldMask.newBuilder().build())
+              .build();
+      Policy response = hubServiceClient.setIamPolicy(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_SetIamPolicy_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/AsyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/AsyncTestIamPermissions.java
new file mode 100644
index 000000000000..db6fbec4e6d8
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/AsyncTestIamPermissions.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 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_HubService_TestIamPermissions_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import java.util.ArrayList;
+
+public class AsyncTestIamPermissions {
+
+  public static void main(String[] args) throws Exception {
+    asyncTestIamPermissions();
+  }
+
+  public static void asyncTestIamPermissions() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      TestIamPermissionsRequest request =
+          TestIamPermissionsRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .addAllPermissions(new ArrayList())
+              .build();
+      ApiFuture future =
+          hubServiceClient.testIamPermissionsCallable().futureCall(request);
+      // Do something.
+      TestIamPermissionsResponse response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_TestIamPermissions_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/SyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/SyncTestIamPermissions.java
new file mode 100644
index 000000000000..d17311b16b8f
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/hubservice/testiampermissions/SyncTestIamPermissions.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2023 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_HubService_TestIamPermissions_sync]
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.HubServiceClient;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import java.util.ArrayList;
+
+public class SyncTestIamPermissions {
+
+  public static void main(String[] args) throws Exception {
+    syncTestIamPermissions();
+  }
+
+  public static void syncTestIamPermissions() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+      TestIamPermissionsRequest request =
+          TestIamPermissionsRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .addAllPermissions(new ArrayList())
+              .build();
+      TestIamPermissionsResponse response = hubServiceClient.testIamPermissions(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_HubService_TestIamPermissions_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java
new file mode 100644
index 000000000000..b6bbb7106d64
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_GetIamPolicy_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.GetPolicyOptions;
+import com.google.iam.v1.Policy;
+
+public class AsyncGetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetIamPolicy();
+  }
+
+  public static void asyncGetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      GetIamPolicyRequest request =
+          GetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setOptions(GetPolicyOptions.newBuilder().build())
+              .build();
+      ApiFuture future =
+          policyBasedRoutingServiceClient.getIamPolicyCallable().futureCall(request);
+      // Do something.
+      Policy response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetIamPolicy_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java
new file mode 100644
index 000000000000..53eed72d1715
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_GetIamPolicy_sync]
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.GetPolicyOptions;
+import com.google.iam.v1.Policy;
+
+public class SyncGetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    syncGetIamPolicy();
+  }
+
+  public static void syncGetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      GetIamPolicyRequest request =
+          GetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setOptions(GetPolicyOptions.newBuilder().build())
+              .build();
+      Policy response = policyBasedRoutingServiceClient.getIamPolicy(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetIamPolicy_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/AsyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/AsyncGetLocation.java
new file mode 100644
index 000000000000..01bddb9e90f8
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/AsyncGetLocation.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_GetLocation_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+
+public class AsyncGetLocation {
+
+  public static void main(String[] args) throws Exception {
+    asyncGetLocation();
+  }
+
+  public static void asyncGetLocation() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+      ApiFuture future =
+          policyBasedRoutingServiceClient.getLocationCallable().futureCall(request);
+      // Do something.
+      Location response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetLocation_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/SyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/SyncGetLocation.java
new file mode 100644
index 000000000000..b43c48ef27bd
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/getlocation/SyncGetLocation.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_GetLocation_sync]
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+
+public class SyncGetLocation {
+
+  public static void main(String[] args) throws Exception {
+    syncGetLocation();
+  }
+
+  public static void syncGetLocation() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+      Location response = policyBasedRoutingServiceClient.getLocation(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetLocation_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocations.java
new file mode 100644
index 000000000000..02506d3c2037
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocations.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_ListLocations_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+
+public class AsyncListLocations {
+
+  public static void main(String[] args) throws Exception {
+    asyncListLocations();
+  }
+
+  public static void asyncListLocations() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      ApiFuture future =
+          policyBasedRoutingServiceClient.listLocationsPagedCallable().futureCall(request);
+      // Do something.
+      for (Location element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListLocations_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java
new file mode 100644
index 000000000000..a4e789200aa3
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_ListLocations_Paged_async]
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.common.base.Strings;
+
+public class AsyncListLocationsPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListLocationsPaged();
+  }
+
+  public static void asyncListLocationsPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      while (true) {
+        ListLocationsResponse response =
+            policyBasedRoutingServiceClient.listLocationsCallable().call(request);
+        for (Location element : response.getLocationsList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListLocations_Paged_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/SyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/SyncListLocations.java
new file mode 100644
index 000000000000..14f54a0c05e3
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/listlocations/SyncListLocations.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_ListLocations_sync]
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.Location;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+
+public class SyncListLocations {
+
+  public static void main(String[] args) throws Exception {
+    syncListLocations();
+  }
+
+  public static void syncListLocations() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      ListLocationsRequest request =
+          ListLocationsRequest.newBuilder()
+              .setName("name3373707")
+              .setFilter("filter-1274492040")
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      for (Location element : policyBasedRoutingServiceClient.listLocations(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListLocations_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java
new file mode 100644
index 000000000000..7fcf343b835f
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_SetIamPolicy_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.protobuf.FieldMask;
+
+public class AsyncSetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    asyncSetIamPolicy();
+  }
+
+  public static void asyncSetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      SetIamPolicyRequest request =
+          SetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setPolicy(Policy.newBuilder().build())
+              .setUpdateMask(FieldMask.newBuilder().build())
+              .build();
+      ApiFuture future =
+          policyBasedRoutingServiceClient.setIamPolicyCallable().futureCall(request);
+      // Do something.
+      Policy response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_SetIamPolicy_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java
new file mode 100644
index 000000000000..133696ffd811
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_SetIamPolicy_sync]
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.protobuf.FieldMask;
+
+public class SyncSetIamPolicy {
+
+  public static void main(String[] args) throws Exception {
+    syncSetIamPolicy();
+  }
+
+  public static void syncSetIamPolicy() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      SetIamPolicyRequest request =
+          SetIamPolicyRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .setPolicy(Policy.newBuilder().build())
+              .setUpdateMask(FieldMask.newBuilder().build())
+              .build();
+      Policy response = policyBasedRoutingServiceClient.setIamPolicy(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_SetIamPolicy_sync]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java
new file mode 100644
index 000000000000..e71c706938dc
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_TestIamPermissions_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import java.util.ArrayList;
+
+public class AsyncTestIamPermissions {
+
+  public static void main(String[] args) throws Exception {
+    asyncTestIamPermissions();
+  }
+
+  public static void asyncTestIamPermissions() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      TestIamPermissionsRequest request =
+          TestIamPermissionsRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .addAllPermissions(new ArrayList())
+              .build();
+      ApiFuture future =
+          policyBasedRoutingServiceClient.testIamPermissionsCallable().futureCall(request);
+      // Do something.
+      TestIamPermissionsResponse response = future.get();
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_TestIamPermissions_async]
diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java
new file mode 100644
index 000000000000..3eee67a6d7de
--- /dev/null
+++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2023 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_PolicyBasedRoutingService_TestIamPermissions_sync]
+import com.google.cloud.networkconnectivity.v1.GroupName;
+import com.google.cloud.networkconnectivity.v1.PolicyBasedRoutingServiceClient;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import java.util.ArrayList;
+
+public class SyncTestIamPermissions {
+
+  public static void main(String[] args) throws Exception {
+    syncTestIamPermissions();
+  }
+
+  public static void syncTestIamPermissions() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+        PolicyBasedRoutingServiceClient.create()) {
+      TestIamPermissionsRequest request =
+          TestIamPermissionsRequest.newBuilder()
+              .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+              .addAllPermissions(new ArrayList())
+              .build();
+      TestIamPermissionsResponse response =
+          policyBasedRoutingServiceClient.testIamPermissions(request);
+    }
+  }
+}
+// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_TestIamPermissions_sync]