From f0c30a2b8c43465e3bf7c70cd229cc753fc5b79b Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Tue, 12 Dec 2023 00:31:00 +0000 Subject: [PATCH 1/4] feat: [edgenetwork] new module for edgenetwork --- gapic-libraries-bom/pom.xml | 7 + java-edgenetwork/.OwlBot.yaml | 36 + java-edgenetwork/.repo-metadata.json | 16 + java-edgenetwork/README.md | 225 + .../google-cloud-edgenetwork-bom/pom.xml | 44 + .../google-cloud-edgenetwork/pom.xml | 113 + .../edgenetwork/v1/EdgeNetworkClient.java | 4595 ++++++++++ .../edgenetwork/v1/EdgeNetworkSettings.java | 653 ++ .../cloud/edgenetwork/v1/gapic_metadata.json | 102 + .../cloud/edgenetwork/v1/package-info.java | 46 + .../edgenetwork/v1/stub/EdgeNetworkStub.java | 307 + .../v1/stub/EdgeNetworkStubSettings.java | 1958 ++++ .../stub/GrpcEdgeNetworkCallableFactory.java | 113 + .../v1/stub/GrpcEdgeNetworkStub.java | 1252 +++ .../HttpJsonEdgeNetworkCallableFactory.java | 105 + .../v1/stub/HttpJsonEdgeNetworkStub.java | 2146 +++++ .../reflect-config.json | 2360 +++++ .../v1/EdgeNetworkClientHttpJsonTest.java | 2878 ++++++ .../edgenetwork/v1/EdgeNetworkClientTest.java | 2576 ++++++ .../cloud/edgenetwork/v1/MockEdgeNetwork.java | 59 + .../edgenetwork/v1/MockEdgeNetworkImpl.java | 607 ++ .../cloud/edgenetwork/v1/MockLocations.java | 59 + .../edgenetwork/v1/MockLocationsImpl.java | 105 + .../grpc-google-cloud-edgenetwork-v1/pom.xml | 45 + .../cloud/edgenetwork/v1/EdgeNetworkGrpc.java | 3311 +++++++ java-edgenetwork/owlbot.py | 36 + java-edgenetwork/pom.xml | 53 + .../clirr-ignored-differences.xml | 19 + .../proto-google-cloud-edgenetwork-v1/pom.xml | 37 + .../CreateInterconnectAttachmentRequest.java | 1415 +++ ...nterconnectAttachmentRequestOrBuilder.java | 174 + .../edgenetwork/v1/CreateNetworkRequest.java | 1388 +++ .../v1/CreateNetworkRequestOrBuilder.java | 173 + .../edgenetwork/v1/CreateRouterRequest.java | 1381 +++ .../v1/CreateRouterRequestOrBuilder.java | 170 + .../edgenetwork/v1/CreateSubnetRequest.java | 1381 +++ .../v1/CreateSubnetRequestOrBuilder.java | 170 + .../DeleteInterconnectAttachmentRequest.java | 918 ++ ...nterconnectAttachmentRequestOrBuilder.java | 103 + .../edgenetwork/v1/DeleteNetworkRequest.java | 904 ++ .../v1/DeleteNetworkRequestOrBuilder.java | 103 + .../edgenetwork/v1/DeleteRouterRequest.java | 904 ++ .../v1/DeleteRouterRequestOrBuilder.java | 103 + .../edgenetwork/v1/DeleteSubnetRequest.java | 904 ++ .../v1/DeleteSubnetRequestOrBuilder.java | 103 + .../v1/DiagnoseInterconnectRequest.java | 641 ++ .../DiagnoseInterconnectRequestOrBuilder.java | 54 + .../v1/DiagnoseInterconnectResponse.java | 974 ++ ...DiagnoseInterconnectResponseOrBuilder.java | 95 + .../v1/DiagnoseNetworkRequest.java | 639 ++ .../v1/DiagnoseNetworkRequestOrBuilder.java | 54 + .../v1/DiagnoseNetworkResponse.java | 1985 ++++ .../v1/DiagnoseNetworkResponseOrBuilder.java | 96 + .../edgenetwork/v1/DiagnoseRouterRequest.java | 639 ++ .../v1/DiagnoseRouterRequestOrBuilder.java | 54 + .../v1/DiagnoseRouterResponse.java | 966 ++ .../v1/DiagnoseRouterResponseOrBuilder.java | 95 + .../v1/GetInterconnectAttachmentRequest.java | 647 ++ ...nterconnectAttachmentRequestOrBuilder.java | 54 + .../v1/GetInterconnectRequest.java | 639 ++ .../v1/GetInterconnectRequestOrBuilder.java | 54 + .../edgenetwork/v1/GetNetworkRequest.java | 638 ++ .../v1/GetNetworkRequestOrBuilder.java | 54 + .../edgenetwork/v1/GetRouterRequest.java | 638 ++ .../v1/GetRouterRequestOrBuilder.java | 54 + .../edgenetwork/v1/GetSubnetRequest.java | 638 ++ .../v1/GetSubnetRequestOrBuilder.java | 54 + .../cloud/edgenetwork/v1/GetZoneRequest.java | 637 ++ .../v1/GetZoneRequestOrBuilder.java | 54 + .../edgenetwork/v1/InitializeZoneRequest.java | 639 ++ .../v1/InitializeZoneRequestOrBuilder.java | 54 + .../v1/InitializeZoneResponse.java | 432 + .../v1/InitializeZoneResponseOrBuilder.java | 24 + .../cloud/edgenetwork/v1/Interconnect.java | 2685 ++++++ .../v1/InterconnectAttachment.java | 2477 +++++ .../v1/InterconnectAttachmentName.java | 270 + .../v1/InterconnectAttachmentOrBuilder.java | 332 + .../v1/InterconnectDiagnostics.java | 8087 +++++++++++++++++ .../v1/InterconnectDiagnosticsOrBuilder.java | 172 + .../edgenetwork/v1/InterconnectName.java | 260 + .../edgenetwork/v1/InterconnectOrBuilder.java | 349 + .../edgenetwork/v1/LinkLayerAddress.java | 806 ++ .../v1/LinkLayerAddressOrBuilder.java | 75 + .../ListInterconnectAttachmentsRequest.java | 1294 +++ ...terconnectAttachmentsRequestOrBuilder.java | 143 + .../ListInterconnectAttachmentsResponse.java | 1480 +++ ...erconnectAttachmentsResponseOrBuilder.java | 165 + .../v1/ListInterconnectsRequest.java | 1282 +++ .../v1/ListInterconnectsRequestOrBuilder.java | 143 + .../v1/ListInterconnectsResponse.java | 1402 +++ .../ListInterconnectsResponseOrBuilder.java | 153 + .../edgenetwork/v1/ListNetworksRequest.java | 1281 +++ .../v1/ListNetworksRequestOrBuilder.java | 143 + .../edgenetwork/v1/ListNetworksResponse.java | 1394 +++ .../v1/ListNetworksResponseOrBuilder.java | 153 + .../edgenetwork/v1/ListRoutersRequest.java | 1281 +++ .../v1/ListRoutersRequestOrBuilder.java | 143 + .../edgenetwork/v1/ListRoutersResponse.java | 1393 +++ .../v1/ListRoutersResponseOrBuilder.java | 153 + .../edgenetwork/v1/ListSubnetsRequest.java | 1281 +++ .../v1/ListSubnetsRequestOrBuilder.java | 143 + .../edgenetwork/v1/ListSubnetsResponse.java | 1393 +++ .../v1/ListSubnetsResponseOrBuilder.java | 153 + .../edgenetwork/v1/ListZonesRequest.java | 1281 +++ .../v1/ListZonesRequestOrBuilder.java | 143 + .../edgenetwork/v1/ListZonesResponse.java | 1393 +++ .../v1/ListZonesResponseOrBuilder.java | 152 + .../cloud/edgenetwork/v1/LocationName.java | 192 + .../google/cloud/edgenetwork/v1/Network.java | 1806 ++++ .../cloud/edgenetwork/v1/NetworkName.java | 257 + .../edgenetwork/v1/NetworkOrBuilder.java | 226 + .../edgenetwork/v1/OperationMetadata.java | 1828 ++++ .../v1/OperationMetadataOrBuilder.java | 218 + .../cloud/edgenetwork/v1/ResourceState.java | 246 + .../cloud/edgenetwork/v1/ResourcesProto.java | 601 ++ .../google/cloud/edgenetwork/v1/Router.java | 8013 ++++++++++++++++ .../cloud/edgenetwork/v1/RouterName.java | 257 + .../cloud/edgenetwork/v1/RouterOrBuilder.java | 471 + .../cloud/edgenetwork/v1/RouterStatus.java | 4507 +++++++++ .../edgenetwork/v1/RouterStatusOrBuilder.java | 113 + .../cloud/edgenetwork/v1/ServiceProto.java | 820 ++ .../google/cloud/edgenetwork/v1/Subnet.java | 2714 ++++++ .../cloud/edgenetwork/v1/SubnetName.java | 257 + .../cloud/edgenetwork/v1/SubnetOrBuilder.java | 385 + .../cloud/edgenetwork/v1/SubnetStatus.java | 1338 +++ .../edgenetwork/v1/SubnetStatusOrBuilder.java | 133 + .../edgenetwork/v1/UpdateRouterRequest.java | 1309 +++ .../v1/UpdateRouterRequestOrBuilder.java | 162 + .../edgenetwork/v1/UpdateSubnetRequest.java | 1309 +++ .../v1/UpdateSubnetRequestOrBuilder.java | 162 + .../com/google/cloud/edgenetwork/v1/Zone.java | 1696 ++++ .../google/cloud/edgenetwork/v1/ZoneName.java | 217 + .../cloud/edgenetwork/v1/ZoneOrBuilder.java | 209 + .../cloud/edgenetwork/v1/resources.proto | 597 ++ .../google/cloud/edgenetwork/v1/service.proto | 1005 ++ .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../create/SyncCreateSetEndpoint.java | 41 + .../AsyncCreateInterconnectAttachment.java | 54 + .../AsyncCreateInterconnectAttachmentLRO.java | 54 + .../SyncCreateInterconnectAttachment.java | 50 + ...entStringInterconnectattachmentString.java | 49 + ...tZonenameInterconnectattachmentString.java | 49 + .../createnetwork/AsyncCreateNetwork.java | 53 + .../createnetwork/AsyncCreateNetworkLRO.java | 54 + .../createnetwork/SyncCreateNetwork.java | 49 + .../SyncCreateNetworkStringNetworkString.java | 44 + ...yncCreateNetworkZonenameNetworkString.java | 44 + .../createrouter/AsyncCreateRouter.java | 53 + .../createrouter/AsyncCreateRouterLRO.java | 54 + .../createrouter/SyncCreateRouter.java | 49 + .../SyncCreateRouterStringRouterString.java | 44 + .../SyncCreateRouterZonenameRouterString.java | 44 + .../createsubnet/AsyncCreateSubnet.java | 53 + .../createsubnet/AsyncCreateSubnetLRO.java | 54 + .../createsubnet/SyncCreateSubnet.java | 49 + .../SyncCreateSubnetStringSubnetString.java | 44 + .../SyncCreateSubnetZonenameSubnetString.java | 44 + .../AsyncDeleteInterconnectAttachment.java | 54 + .../AsyncDeleteInterconnectAttachmentLRO.java | 55 + .../SyncDeleteInterconnectAttachment.java | 50 + ...tAttachmentInterconnectattachmentname.java | 44 + ...yncDeleteInterconnectAttachmentString.java | 45 + .../deletenetwork/AsyncDeleteNetwork.java | 50 + .../deletenetwork/AsyncDeleteNetworkLRO.java | 52 + .../deletenetwork/SyncDeleteNetwork.java | 47 + .../SyncDeleteNetworkNetworkname.java | 42 + .../SyncDeleteNetworkString.java | 42 + .../deleterouter/AsyncDeleteRouter.java | 50 + .../deleterouter/AsyncDeleteRouterLRO.java | 52 + .../deleterouter/SyncDeleteRouter.java | 47 + .../SyncDeleteRouterRoutername.java | 42 + .../deleterouter/SyncDeleteRouterString.java | 42 + .../deletesubnet/AsyncDeleteSubnet.java | 50 + .../deletesubnet/AsyncDeleteSubnetLRO.java | 52 + .../deletesubnet/SyncDeleteSubnet.java | 47 + .../deletesubnet/SyncDeleteSubnetString.java | 42 + .../SyncDeleteSubnetSubnetname.java | 42 + .../AsyncDiagnoseInterconnect.java | 52 + .../SyncDiagnoseInterconnect.java | 48 + ...cDiagnoseInterconnectInterconnectname.java | 43 + .../SyncDiagnoseInterconnectString.java | 43 + .../diagnosenetwork/AsyncDiagnoseNetwork.java | 50 + .../diagnosenetwork/SyncDiagnoseNetwork.java | 46 + .../SyncDiagnoseNetworkNetworkname.java | 42 + .../SyncDiagnoseNetworkString.java | 42 + .../diagnoserouter/AsyncDiagnoseRouter.java | 50 + .../diagnoserouter/SyncDiagnoseRouter.java | 46 + .../SyncDiagnoseRouterRoutername.java | 42 + .../SyncDiagnoseRouterString.java | 42 + .../getinterconnect/AsyncGetInterconnect.java | 52 + .../getinterconnect/SyncGetInterconnect.java | 48 + .../SyncGetInterconnectInterconnectname.java | 43 + .../SyncGetInterconnectString.java | 43 + .../AsyncGetInterconnectAttachment.java | 53 + .../SyncGetInterconnectAttachment.java | 49 + ...tAttachmentInterconnectattachmentname.java | 44 + .../SyncGetInterconnectAttachmentString.java | 45 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../getnetwork/AsyncGetNetwork.java | 49 + .../getnetwork/SyncGetNetwork.java | 46 + .../getnetwork/SyncGetNetworkNetworkname.java | 42 + .../getnetwork/SyncGetNetworkString.java | 42 + .../edgenetwork/getrouter/AsyncGetRouter.java | 49 + .../edgenetwork/getrouter/SyncGetRouter.java | 46 + .../getrouter/SyncGetRouterRoutername.java | 42 + .../getrouter/SyncGetRouterString.java | 42 + .../edgenetwork/getsubnet/AsyncGetSubnet.java | 49 + .../edgenetwork/getsubnet/SyncGetSubnet.java | 46 + .../getsubnet/SyncGetSubnetString.java | 42 + .../getsubnet/SyncGetSubnetSubnetname.java | 42 + .../v1/edgenetwork/getzone/AsyncGetZone.java | 49 + .../v1/edgenetwork/getzone/SyncGetZone.java | 46 + .../getzone/SyncGetZoneString.java | 42 + .../getzone/SyncGetZoneZonename.java | 42 + .../initializezone/AsyncInitializeZone.java | 50 + .../initializezone/SyncInitializeZone.java | 46 + .../SyncInitializeZoneString.java | 42 + .../SyncInitializeZoneZonename.java | 42 + .../AsyncListInterconnectAttachments.java | 56 + ...AsyncListInterconnectAttachmentsPaged.java | 64 + .../SyncListInterconnectAttachments.java | 53 + ...SyncListInterconnectAttachmentsString.java | 45 + ...ncListInterconnectAttachmentsZonename.java | 45 + .../AsyncListInterconnects.java | 56 + .../AsyncListInterconnectsPaged.java | 64 + .../SyncListInterconnects.java | 52 + .../SyncListInterconnectsString.java | 44 + .../SyncListInterconnectsZonename.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../listnetworks/AsyncListNetworks.java | 55 + .../listnetworks/AsyncListNetworksPaged.java | 63 + .../listnetworks/SyncListNetworks.java | 52 + .../listnetworks/SyncListNetworksString.java | 44 + .../SyncListNetworksZonename.java | 44 + .../listrouters/AsyncListRouters.java | 55 + .../listrouters/AsyncListRoutersPaged.java | 63 + .../listrouters/SyncListRouters.java | 52 + .../listrouters/SyncListRoutersString.java | 44 + .../listrouters/SyncListRoutersZonename.java | 44 + .../listsubnets/AsyncListSubnets.java | 55 + .../listsubnets/AsyncListSubnetsPaged.java | 63 + .../listsubnets/SyncListSubnets.java | 52 + .../listsubnets/SyncListSubnetsString.java | 44 + .../listsubnets/SyncListSubnetsZonename.java | 44 + .../edgenetwork/listzones/AsyncListZones.java | 55 + .../listzones/AsyncListZonesPaged.java | 63 + .../edgenetwork/listzones/SyncListZones.java | 52 + .../listzones/SyncListZonesLocationname.java | 44 + .../listzones/SyncListZonesString.java | 44 + .../updaterouter/AsyncUpdateRouter.java | 52 + .../updaterouter/AsyncUpdateRouterLRO.java | 53 + .../updaterouter/SyncUpdateRouter.java | 48 + .../SyncUpdateRouterRouterFieldmask.java | 43 + .../updatesubnet/AsyncUpdateSubnet.java | 52 + .../updatesubnet/AsyncUpdateSubnetLRO.java | 53 + .../updatesubnet/SyncUpdateSubnet.java | 48 + .../SyncUpdateSubnetSubnetFieldmask.java | 43 + .../initializezone/SyncInitializeZone.java | 48 + .../initializezone/SyncInitializeZone.java | 49 + pom.xml | 1 + versions.txt | 3 + 265 files changed, 116440 insertions(+) create mode 100644 java-edgenetwork/.OwlBot.yaml create mode 100644 java-edgenetwork/.repo-metadata.json create mode 100644 java-edgenetwork/README.md create mode 100644 java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml create mode 100644 java-edgenetwork/google-cloud-edgenetwork/pom.xml create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClient.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkSettings.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/gapic_metadata.json create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/package-info.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStubSettings.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkCallableFactory.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkStub.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkCallableFactory.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkStub.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/main/resources/META-INF/native-image/com.google.cloud.edgenetwork.v1/reflect-config.json create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientHttpJsonTest.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientTest.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetwork.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetworkImpl.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockLocations.java create mode 100644 java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockLocationsImpl.java create mode 100644 java-edgenetwork/grpc-google-cloud-edgenetwork-v1/pom.xml create mode 100644 java-edgenetwork/grpc-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkGrpc.java create mode 100644 java-edgenetwork/owlbot.py create mode 100644 java-edgenetwork/pom.xml create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/clirr-ignored-differences.xml create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/pom.xml create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Interconnect.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachment.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnostics.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnosticsOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddress.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddressOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponse.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponseOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LocationName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Network.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadata.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadataOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourceState.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourcesProto.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Router.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatus.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatusOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ServiceProto.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Subnet.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatus.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatusOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequest.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequestOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Zone.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneName.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneOrBuilder.java create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/resources.proto create mode 100644 java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/service.proto create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetEndpoint.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachment.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachmentLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachment.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentStringInterconnectattachmentString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentZonenameInterconnectattachmentString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetworkLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkStringNetworkString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkZonenameNetworkString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouterLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterStringRouterString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterZonenameRouterString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnetLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetStringSubnetString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetZonenameSubnetString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachment.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachmentLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachment.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentInterconnectattachmentname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetworkLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkNetworkname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouterLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterRoutername.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnetLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetSubnetname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/AsyncDiagnoseInterconnect.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnect.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectInterconnectname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/AsyncDiagnoseNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkNetworkname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/AsyncDiagnoseRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterRoutername.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/AsyncGetInterconnect.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnect.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectInterconnectname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/AsyncGetInterconnectAttachment.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachment.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentInterconnectattachmentname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getlocation/AsyncGetLocation.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getlocation/SyncGetLocation.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/AsyncGetNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetwork.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkNetworkname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/AsyncGetRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterRoutername.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/AsyncGetSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetSubnetname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/AsyncGetZone.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZone.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/AsyncInitializeZone.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZone.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachments.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachmentsPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachments.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnects.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnectsPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnects.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/AsyncListLocations.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/AsyncListLocationsPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/SyncListLocations.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworks.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworksPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworks.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRouters.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRoutersPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRouters.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnets.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnetsPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnets.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsZonename.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZones.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZonesPaged.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZones.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesLocationname.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesString.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouterLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouter.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouterRouterFieldmask.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnetLRO.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnet.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnetSubnetFieldmask.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetworksettings/initializezone/SyncInitializeZone.java create mode 100644 java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/stub/edgenetworkstubsettings/initializezone/SyncInitializeZone.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index be1529c33618..3e242c217807 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -490,6 +490,13 @@ pom import + + com.google.cloud + google-cloud-edgenetwork-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-enterpriseknowledgegraph-bom diff --git a/java-edgenetwork/.OwlBot.yaml b/java-edgenetwork/.OwlBot.yaml new file mode 100644 index 000000000000..b7f47c1026d7 --- /dev/null +++ b/java-edgenetwork/.OwlBot.yaml @@ -0,0 +1,36 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://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. + + +deep-remove-regex: +- "/java-edgenetwork/grpc-google-.*/src" +- "/java-edgenetwork/proto-google-.*/src" +- "/java-edgenetwork/google-.*/src" +- "/java-edgenetwork/samples/snippets/generated" + +deep-preserve-regex: +- "/java-edgenetwork/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/edgenetwork/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-edgenetwork/$1/proto-google-cloud-edgenetwork-$1/src" +- source: "/google/cloud/edgenetwork/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-edgenetwork/$1/grpc-google-cloud-edgenetwork-$1/src" +- source: "/google/cloud/edgenetwork/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-edgenetwork/$1/google-cloud-edgenetwork/src" +- source: "/google/cloud/edgenetwork/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-edgenetwork/$1/samples/snippets/generated" + + +api-name: edgenetwork \ No newline at end of file diff --git a/java-edgenetwork/.repo-metadata.json b/java-edgenetwork/.repo-metadata.json new file mode 100644 index 000000000000..c9a904b1cd4b --- /dev/null +++ b/java-edgenetwork/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "edgenetwork", + "name_pretty": "Distributed Cloud Edge Network API", + "product_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs/overview", + "api_description": "Network management API for Distributed Cloud Edge.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-edgenetwork/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-edgenetwork", + "repo_short": "java-edgenetwork", + "distribution_name": "com.google.cloud:google-cloud-edgenetwork", + "api_id": "edgenetwork.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-edgenetwork/README.md b/java-edgenetwork/README.md new file mode 100644 index 000000000000..eab8db672c43 --- /dev/null +++ b/java-edgenetwork/README.md @@ -0,0 +1,225 @@ +# Google Distributed Cloud Edge Network API Client for Java + +Java idiomatic client for [Distributed Cloud Edge Network API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.28.0 + pom + import + + + + + + + com.google.cloud + google-cloud-edgenetwork + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.cloud + google-cloud-edgenetwork + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-edgenetwork:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-edgenetwork" % "0.0.0" +``` + + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Distributed Cloud Edge Network API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Distributed Cloud Edge Network API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Distributed Cloud Edge Network API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Distributed Cloud Edge Network API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-edgenetwork` library. See the [Quickstart](#quickstart) section +to add `google-cloud-edgenetwork` as a dependency in your code. + +## About Distributed Cloud Edge Network API + + +[Distributed Cloud Edge Network API][product-docs] Network management API for Distributed Cloud Edge. + +See the [Distributed Cloud Edge Network API client library docs][javadocs] to learn how to +use this Distributed Cloud Edge Network API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Distributed Cloud Edge Network API uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/distributed-cloud/edge/latest/docs/overview +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-edgenetwork/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-edgenetwork/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-edgenetwork.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-edgenetwork/0.0.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 +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/java-edgenetwork/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-edgenetwork/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-edgenetwork/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=edgenetwork.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml b/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml new file mode 100644 index 000000000000..8ccc307f870f --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.cloud + google-cloud-edgenetwork-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.26.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Distributed Cloud Edge Network API BOM + + BOM for Distributed Cloud Edge Network API + + + + true + + + + + + com.google.cloud + google-cloud-edgenetwork + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-edgenetwork-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-edgenetwork-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-edgenetwork/google-cloud-edgenetwork/pom.xml b/java-edgenetwork/google-cloud-edgenetwork/pom.xml new file mode 100644 index 000000000000..2f7fb462f93b --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-edgenetwork + 0.0.1-SNAPSHOT + jar + Google Distributed Cloud Edge Network API + Distributed Cloud Edge Network API Network management API for Distributed Cloud Edge. + + com.google.cloud + google-cloud-edgenetwork-parent + 0.0.1-SNAPSHOT + + + google-cloud-edgenetwork + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-edgenetwork-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-edgenetwork-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClient.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClient.java new file mode 100644 index 000000000000..3e4284a38f5f --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClient.java @@ -0,0 +1,4595 @@ +/* + * 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.edgenetwork.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +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.edgenetwork.v1.stub.EdgeNetworkStub; +import com.google.cloud.edgenetwork.v1.stub.EdgeNetworkStubSettings; +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.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: EdgeNetwork API provides managed, highly available cloud dynamic network + * configuration service to the GEC customer to enable edge application and network function + * solutions. This allows the customers to easily define and configure the network setup and + * property to meet the workload requirement. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+ *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+ *   InitializeZoneResponse response = edgeNetworkClient.initializeZone(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the EdgeNetworkClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of EdgeNetworkSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * EdgeNetworkSettings edgeNetworkSettings =
+ *     EdgeNetworkSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * EdgeNetworkSettings edgeNetworkSettings =
+ *     EdgeNetworkSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * EdgeNetworkSettings edgeNetworkSettings = EdgeNetworkSettings.newHttpJsonBuilder().build();
+ * EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class EdgeNetworkClient implements BackgroundResource { + private final EdgeNetworkSettings settings; + private final EdgeNetworkStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of EdgeNetworkClient with default settings. */ + public static final EdgeNetworkClient create() throws IOException { + return create(EdgeNetworkSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EdgeNetworkClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final EdgeNetworkClient create(EdgeNetworkSettings settings) throws IOException { + return new EdgeNetworkClient(settings); + } + + /** + * Constructs an instance of EdgeNetworkClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(EdgeNetworkSettings). + */ + public static final EdgeNetworkClient create(EdgeNetworkStub stub) { + return new EdgeNetworkClient(stub); + } + + /** + * Constructs an instance of EdgeNetworkClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected EdgeNetworkClient(EdgeNetworkSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EdgeNetworkStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected EdgeNetworkClient(EdgeNetworkStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final EdgeNetworkSettings getSettings() { + return settings; + } + + public EdgeNetworkStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   InitializeZoneResponse response = edgeNetworkClient.initializeZone(name);
+   * }
+   * }
+ * + * @param name Required. The name of the zone resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InitializeZoneResponse initializeZone(ZoneName name) { + InitializeZoneRequest request = + InitializeZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return initializeZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   InitializeZoneResponse response = edgeNetworkClient.initializeZone(name);
+   * }
+   * }
+ * + * @param name Required. The name of the zone resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InitializeZoneResponse initializeZone(String name) { + InitializeZoneRequest request = InitializeZoneRequest.newBuilder().setName(name).build(); + return initializeZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   InitializeZoneRequest request =
+   *       InitializeZoneRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .build();
+   *   InitializeZoneResponse response = edgeNetworkClient.initializeZone(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 InitializeZoneResponse initializeZone(InitializeZoneRequest request) { + return initializeZoneCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   InitializeZoneRequest request =
+   *       InitializeZoneRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.initializeZoneCallable().futureCall(request);
+   *   // Do something.
+   *   InitializeZoneResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + initializeZoneCallable() { + return stub.initializeZoneCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Zone element : edgeNetworkClient.listZones(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListZonesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(LocationName parent) { + ListZonesRequest request = + ListZonesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listZones(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Zone element : edgeNetworkClient.listZones(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListZonesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(String parent) { + ListZonesRequest request = ListZonesRequest.newBuilder().setParent(parent).build(); + return listZones(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListZonesRequest request =
+   *       ListZonesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Zone element : edgeNetworkClient.listZones(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 ListZonesPagedResponse listZones(ListZonesRequest request) { + return listZonesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListZonesRequest request =
+   *       ListZonesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.listZonesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Zone element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listZonesPagedCallable() { + return stub.listZonesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListZonesRequest request =
+   *       ListZonesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListZonesResponse response = edgeNetworkClient.listZonesCallable().call(request);
+   *     for (Zone element : response.getZonesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listZonesCallable() { + return stub.listZonesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   Zone response = edgeNetworkClient.getZone(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(ZoneName name) { + GetZoneRequest request = + GetZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   Zone response = edgeNetworkClient.getZone(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(String name) { + GetZoneRequest request = GetZoneRequest.newBuilder().setName(name).build(); + return getZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetZoneRequest request =
+   *       GetZoneRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .build();
+   *   Zone response = edgeNetworkClient.getZone(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 Zone getZone(GetZoneRequest request) { + return getZoneCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetZoneRequest request =
+   *       GetZoneRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.getZoneCallable().futureCall(request);
+   *   // Do something.
+   *   Zone response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getZoneCallable() { + return stub.getZoneCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   for (Network element : edgeNetworkClient.listNetworks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListNetworksRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworksPagedResponse listNetworks(ZoneName parent) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNetworks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   for (Network element : edgeNetworkClient.listNetworks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListNetworksRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworksPagedResponse listNetworks(String parent) { + ListNetworksRequest request = ListNetworksRequest.newBuilder().setParent(parent).build(); + return listNetworks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListNetworksRequest request =
+   *       ListNetworksRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Network element : edgeNetworkClient.listNetworks(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 ListNetworksPagedResponse listNetworks(ListNetworksRequest request) { + return listNetworksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListNetworksRequest request =
+   *       ListNetworksRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.listNetworksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Network element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNetworksPagedCallable() { + return stub.listNetworksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListNetworksRequest request =
+   *       ListNetworksRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListNetworksResponse response = edgeNetworkClient.listNetworksCallable().call(request);
+   *     for (Network element : response.getNetworksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNetworksCallable() { + return stub.listNetworksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]");
+   *   Network response = edgeNetworkClient.getNetwork(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Network getNetwork(NetworkName name) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString();
+   *   Network response = edgeNetworkClient.getNetwork(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Network getNetwork(String name) { + GetNetworkRequest request = GetNetworkRequest.newBuilder().setName(name).build(); + return getNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetNetworkRequest request =
+   *       GetNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .build();
+   *   Network response = edgeNetworkClient.getNetwork(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 Network getNetwork(GetNetworkRequest request) { + return getNetworkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetNetworkRequest request =
+   *       GetNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.getNetworkCallable().futureCall(request);
+   *   // Do something.
+   *   Network response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNetworkCallable() { + return stub.getNetworkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]");
+   *   DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(name);
+   * }
+   * }
+ * + * @param name Required. The name of the network resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseNetworkResponse diagnoseNetwork(NetworkName name) { + DiagnoseNetworkRequest request = + DiagnoseNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return diagnoseNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString();
+   *   DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(name);
+   * }
+   * }
+ * + * @param name Required. The name of the network resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseNetworkResponse diagnoseNetwork(String name) { + DiagnoseNetworkRequest request = DiagnoseNetworkRequest.newBuilder().setName(name).build(); + return diagnoseNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DiagnoseNetworkRequest request =
+   *       DiagnoseNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .build();
+   *   DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(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 DiagnoseNetworkResponse diagnoseNetwork(DiagnoseNetworkRequest request) { + return diagnoseNetworkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DiagnoseNetworkRequest request =
+   *       DiagnoseNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.diagnoseNetworkCallable().futureCall(request);
+   *   // Do something.
+   *   DiagnoseNetworkResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + diagnoseNetworkCallable() { + return stub.diagnoseNetworkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   Network network = Network.newBuilder().build();
+   *   String networkId = "networkId2062782441";
+   *   Network response = edgeNetworkClient.createNetworkAsync(parent, network, networkId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param network Required. The resource being created + * @param networkId Required. Id of the requesting object If auto-generating Id server-side, + * remove this field and network_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNetworkAsync( + ZoneName parent, Network network, String networkId) { + CreateNetworkRequest request = + CreateNetworkRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNetwork(network) + .setNetworkId(networkId) + .build(); + return createNetworkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   Network network = Network.newBuilder().build();
+   *   String networkId = "networkId2062782441";
+   *   Network response = edgeNetworkClient.createNetworkAsync(parent, network, networkId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param network Required. The resource being created + * @param networkId Required. Id of the requesting object If auto-generating Id server-side, + * remove this field and network_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createNetworkAsync( + String parent, Network network, String networkId) { + CreateNetworkRequest request = + CreateNetworkRequest.newBuilder() + .setParent(parent) + .setNetwork(network) + .setNetworkId(networkId) + .build(); + return createNetworkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateNetworkRequest request =
+   *       CreateNetworkRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setNetworkId("networkId2062782441")
+   *           .setNetwork(Network.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Network response = edgeNetworkClient.createNetworkAsync(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 createNetworkAsync( + CreateNetworkRequest request) { + return createNetworkOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateNetworkRequest request =
+   *       CreateNetworkRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setNetworkId("networkId2062782441")
+   *           .setNetwork(Network.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.createNetworkOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Network response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createNetworkOperationCallable() { + return stub.createNetworkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateNetworkRequest request =
+   *       CreateNetworkRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setNetworkId("networkId2062782441")
+   *           .setNetwork(Network.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.createNetworkCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNetworkCallable() { + return stub.createNetworkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]");
+   *   edgeNetworkClient.deleteNetworkAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNetworkAsync(NetworkName name) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteNetworkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString();
+   *   edgeNetworkClient.deleteNetworkAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNetworkAsync(String name) { + DeleteNetworkRequest request = DeleteNetworkRequest.newBuilder().setName(name).build(); + return deleteNetworkAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteNetworkRequest request =
+   *       DeleteNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   edgeNetworkClient.deleteNetworkAsync(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 deleteNetworkAsync( + DeleteNetworkRequest request) { + return deleteNetworkOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteNetworkRequest request =
+   *       DeleteNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.deleteNetworkOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteNetworkOperationCallable() { + return stub.deleteNetworkOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Network. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteNetworkRequest request =
+   *       DeleteNetworkRequest.newBuilder()
+   *           .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.deleteNetworkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteNetworkCallable() { + return stub.deleteNetworkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   for (Subnet element : edgeNetworkClient.listSubnets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListSubnetsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(ZoneName parent) { + ListSubnetsRequest request = + ListSubnetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSubnets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   for (Subnet element : edgeNetworkClient.listSubnets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListSubnetsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(String parent) { + ListSubnetsRequest request = ListSubnetsRequest.newBuilder().setParent(parent).build(); + return listSubnets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListSubnetsRequest request =
+   *       ListSubnetsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Subnet element : edgeNetworkClient.listSubnets(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 ListSubnetsPagedResponse listSubnets(ListSubnetsRequest request) { + return listSubnetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListSubnetsRequest request =
+   *       ListSubnetsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.listSubnetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Subnet element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSubnetsPagedCallable() { + return stub.listSubnetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListSubnetsRequest request =
+   *       ListSubnetsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSubnetsResponse response = edgeNetworkClient.listSubnetsCallable().call(request);
+   *     for (Subnet element : response.getSubnetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSubnetsCallable() { + return stub.listSubnetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]");
+   *   Subnet response = edgeNetworkClient.getSubnet(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(SubnetName name) { + GetSubnetRequest request = + GetSubnetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSubnet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString();
+   *   Subnet response = edgeNetworkClient.getSubnet(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(String name) { + GetSubnetRequest request = GetSubnetRequest.newBuilder().setName(name).build(); + return getSubnet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetSubnetRequest request =
+   *       GetSubnetRequest.newBuilder()
+   *           .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString())
+   *           .build();
+   *   Subnet response = edgeNetworkClient.getSubnet(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 Subnet getSubnet(GetSubnetRequest request) { + return getSubnetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetSubnetRequest request =
+   *       GetSubnetRequest.newBuilder()
+   *           .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString())
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.getSubnetCallable().futureCall(request);
+   *   // Do something.
+   *   Subnet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSubnetCallable() { + return stub.getSubnetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Subnet in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   Subnet subnet = Subnet.newBuilder().build();
+   *   String subnetId = "subnetId-2066159272";
+   *   Subnet response = edgeNetworkClient.createSubnetAsync(parent, subnet, subnetId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param subnet Required. The resource being created + * @param subnetId Required. Id of the requesting object If auto-generating Id server-side, remove + * this field and subnet_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSubnetAsync( + ZoneName parent, Subnet subnet, String subnetId) { + CreateSubnetRequest request = + CreateSubnetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSubnet(subnet) + .setSubnetId(subnetId) + .build(); + return createSubnetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Subnet in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   Subnet subnet = Subnet.newBuilder().build();
+   *   String subnetId = "subnetId-2066159272";
+   *   Subnet response = edgeNetworkClient.createSubnetAsync(parent, subnet, subnetId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param subnet Required. The resource being created + * @param subnetId Required. Id of the requesting object If auto-generating Id server-side, remove + * this field and subnet_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSubnetAsync( + String parent, Subnet subnet, String subnetId) { + CreateSubnetRequest request = + CreateSubnetRequest.newBuilder() + .setParent(parent) + .setSubnet(subnet) + .setSubnetId(subnetId) + .build(); + return createSubnetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Subnet in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateSubnetRequest request =
+   *       CreateSubnetRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setSubnetId("subnetId-2066159272")
+   *           .setSubnet(Subnet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Subnet response = edgeNetworkClient.createSubnetAsync(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 createSubnetAsync( + CreateSubnetRequest request) { + return createSubnetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Subnet in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateSubnetRequest request =
+   *       CreateSubnetRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setSubnetId("subnetId-2066159272")
+   *           .setSubnet(Subnet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.createSubnetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Subnet response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createSubnetOperationCallable() { + return stub.createSubnetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Subnet in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateSubnetRequest request =
+   *       CreateSubnetRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setSubnetId("subnetId-2066159272")
+   *           .setSubnet(Subnet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.createSubnetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSubnetCallable() { + return stub.createSubnetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   Subnet subnet = Subnet.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Subnet response = edgeNetworkClient.updateSubnetAsync(subnet, updateMask).get();
+   * }
+   * }
+ * + * @param subnet Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Subnet resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSubnetAsync( + Subnet subnet, FieldMask updateMask) { + UpdateSubnetRequest request = + UpdateSubnetRequest.newBuilder().setSubnet(subnet).setUpdateMask(updateMask).build(); + return updateSubnetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   UpdateSubnetRequest request =
+   *       UpdateSubnetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSubnet(Subnet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Subnet response = edgeNetworkClient.updateSubnetAsync(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 updateSubnetAsync( + UpdateSubnetRequest request) { + return updateSubnetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   UpdateSubnetRequest request =
+   *       UpdateSubnetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSubnet(Subnet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.updateSubnetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Subnet response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateSubnetOperationCallable() { + return stub.updateSubnetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   UpdateSubnetRequest request =
+   *       UpdateSubnetRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSubnet(Subnet.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.updateSubnetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSubnetCallable() { + return stub.updateSubnetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]");
+   *   edgeNetworkClient.deleteSubnetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSubnetAsync(SubnetName name) { + DeleteSubnetRequest request = + DeleteSubnetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteSubnetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString();
+   *   edgeNetworkClient.deleteSubnetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSubnetAsync(String name) { + DeleteSubnetRequest request = DeleteSubnetRequest.newBuilder().setName(name).build(); + return deleteSubnetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteSubnetRequest request =
+   *       DeleteSubnetRequest.newBuilder()
+   *           .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   edgeNetworkClient.deleteSubnetAsync(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 deleteSubnetAsync( + DeleteSubnetRequest request) { + return deleteSubnetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteSubnetRequest request =
+   *       DeleteSubnetRequest.newBuilder()
+   *           .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.deleteSubnetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteSubnetOperationCallable() { + return stub.deleteSubnetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Subnet. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteSubnetRequest request =
+   *       DeleteSubnetRequest.newBuilder()
+   *           .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.deleteSubnetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSubnetCallable() { + return stub.deleteSubnetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   for (Interconnect element : edgeNetworkClient.listInterconnects(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInterconnectsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectsPagedResponse listInterconnects(ZoneName parent) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInterconnects(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   for (Interconnect element : edgeNetworkClient.listInterconnects(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInterconnectsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectsPagedResponse listInterconnects(String parent) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder().setParent(parent).build(); + return listInterconnects(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListInterconnectsRequest request =
+   *       ListInterconnectsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Interconnect element : edgeNetworkClient.listInterconnects(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 ListInterconnectsPagedResponse listInterconnects(ListInterconnectsRequest request) { + return listInterconnectsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListInterconnectsRequest request =
+   *       ListInterconnectsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.listInterconnectsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Interconnect element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInterconnectsPagedCallable() { + return stub.listInterconnectsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListInterconnectsRequest request =
+   *       ListInterconnectsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInterconnectsResponse response =
+   *         edgeNetworkClient.listInterconnectsCallable().call(request);
+   *     for (Interconnect element : response.getInterconnectsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInterconnectsCallable() { + return stub.listInterconnectsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   InterconnectName name =
+   *       InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]");
+   *   Interconnect response = edgeNetworkClient.getInterconnect(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Interconnect getInterconnect(InterconnectName name) { + GetInterconnectRequest request = + GetInterconnectRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name =
+   *       InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]").toString();
+   *   Interconnect response = edgeNetworkClient.getInterconnect(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Interconnect getInterconnect(String name) { + GetInterconnectRequest request = GetInterconnectRequest.newBuilder().setName(name).build(); + return getInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetInterconnectRequest request =
+   *       GetInterconnectRequest.newBuilder()
+   *           .setName(
+   *               InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]")
+   *                   .toString())
+   *           .build();
+   *   Interconnect response = edgeNetworkClient.getInterconnect(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 Interconnect getInterconnect(GetInterconnectRequest request) { + return getInterconnectCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetInterconnectRequest request =
+   *       GetInterconnectRequest.newBuilder()
+   *           .setName(
+   *               InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.getInterconnectCallable().futureCall(request);
+   *   // Do something.
+   *   Interconnect response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInterconnectCallable() { + return stub.getInterconnectCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   InterconnectName name =
+   *       InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]");
+   *   DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(name);
+   * }
+   * }
+ * + * @param name Required. The name of the interconnect resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseInterconnectResponse diagnoseInterconnect(InterconnectName name) { + DiagnoseInterconnectRequest request = + DiagnoseInterconnectRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return diagnoseInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name =
+   *       InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]").toString();
+   *   DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(name);
+   * }
+   * }
+ * + * @param name Required. The name of the interconnect resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseInterconnectResponse diagnoseInterconnect(String name) { + DiagnoseInterconnectRequest request = + DiagnoseInterconnectRequest.newBuilder().setName(name).build(); + return diagnoseInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DiagnoseInterconnectRequest request =
+   *       DiagnoseInterconnectRequest.newBuilder()
+   *           .setName(
+   *               InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]")
+   *                   .toString())
+   *           .build();
+   *   DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(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 DiagnoseInterconnectResponse diagnoseInterconnect( + DiagnoseInterconnectRequest request) { + return diagnoseInterconnectCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DiagnoseInterconnectRequest request =
+   *       DiagnoseInterconnectRequest.newBuilder()
+   *           .setName(
+   *               InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.diagnoseInterconnectCallable().futureCall(request);
+   *   // Do something.
+   *   DiagnoseInterconnectResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + diagnoseInterconnectCallable() { + return stub.diagnoseInterconnectCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   for (InterconnectAttachment element :
+   *       edgeNetworkClient.listInterconnectAttachments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInterconnectAttachmentsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachments( + ZoneName parent) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInterconnectAttachments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   for (InterconnectAttachment element :
+   *       edgeNetworkClient.listInterconnectAttachments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInterconnectAttachmentsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachments(String parent) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder().setParent(parent).build(); + return listInterconnectAttachments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListInterconnectAttachmentsRequest request =
+   *       ListInterconnectAttachmentsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (InterconnectAttachment element :
+   *       edgeNetworkClient.listInterconnectAttachments(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 ListInterconnectAttachmentsPagedResponse listInterconnectAttachments( + ListInterconnectAttachmentsRequest request) { + return listInterconnectAttachmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListInterconnectAttachmentsRequest request =
+   *       ListInterconnectAttachmentsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.listInterconnectAttachmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (InterconnectAttachment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsPagedCallable() { + return stub.listInterconnectAttachmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListInterconnectAttachmentsRequest request =
+   *       ListInterconnectAttachmentsRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInterconnectAttachmentsResponse response =
+   *         edgeNetworkClient.listInterconnectAttachmentsCallable().call(request);
+   *     for (InterconnectAttachment element : response.getInterconnectAttachmentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + listInterconnectAttachmentsCallable() { + return stub.listInterconnectAttachmentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   InterconnectAttachmentName name =
+   *       InterconnectAttachmentName.of(
+   *           "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]");
+   *   InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InterconnectAttachment getInterconnectAttachment(InterconnectAttachmentName name) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInterconnectAttachment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name =
+   *       InterconnectAttachmentName.of(
+   *               "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *           .toString();
+   *   InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InterconnectAttachment getInterconnectAttachment(String name) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder().setName(name).build(); + return getInterconnectAttachment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetInterconnectAttachmentRequest request =
+   *       GetInterconnectAttachmentRequest.newBuilder()
+   *           .setName(
+   *               InterconnectAttachmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *                   .toString())
+   *           .build();
+   *   InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(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 InterconnectAttachment getInterconnectAttachment( + GetInterconnectAttachmentRequest request) { + return getInterconnectAttachmentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetInterconnectAttachmentRequest request =
+   *       GetInterconnectAttachmentRequest.newBuilder()
+   *           .setName(
+   *               InterconnectAttachmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.getInterconnectAttachmentCallable().futureCall(request);
+   *   // Do something.
+   *   InterconnectAttachment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getInterconnectAttachmentCallable() { + return stub.getInterconnectAttachmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InterconnectAttachment in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build();
+   *   String interconnectAttachmentId = "interconnectAttachmentId1053538636";
+   *   InterconnectAttachment response =
+   *       edgeNetworkClient
+   *           .createInterconnectAttachmentAsync(
+   *               parent, interconnectAttachment, interconnectAttachmentId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param interconnectAttachment Required. The resource being created + * @param interconnectAttachmentId Required. Id of the requesting object If auto-generating Id + * server-side, remove this field and interconnect_attachment_id from the method_signature of + * Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createInterconnectAttachmentAsync( + ZoneName parent, + InterconnectAttachment interconnectAttachment, + String interconnectAttachmentId) { + CreateInterconnectAttachmentRequest request = + CreateInterconnectAttachmentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInterconnectAttachment(interconnectAttachment) + .setInterconnectAttachmentId(interconnectAttachmentId) + .build(); + return createInterconnectAttachmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InterconnectAttachment in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build();
+   *   String interconnectAttachmentId = "interconnectAttachmentId1053538636";
+   *   InterconnectAttachment response =
+   *       edgeNetworkClient
+   *           .createInterconnectAttachmentAsync(
+   *               parent, interconnectAttachment, interconnectAttachmentId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param interconnectAttachment Required. The resource being created + * @param interconnectAttachmentId Required. Id of the requesting object If auto-generating Id + * server-side, remove this field and interconnect_attachment_id from the method_signature of + * Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createInterconnectAttachmentAsync( + String parent, + InterconnectAttachment interconnectAttachment, + String interconnectAttachmentId) { + CreateInterconnectAttachmentRequest request = + CreateInterconnectAttachmentRequest.newBuilder() + .setParent(parent) + .setInterconnectAttachment(interconnectAttachment) + .setInterconnectAttachmentId(interconnectAttachmentId) + .build(); + return createInterconnectAttachmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InterconnectAttachment in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateInterconnectAttachmentRequest request =
+   *       CreateInterconnectAttachmentRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setInterconnectAttachmentId("interconnectAttachmentId1053538636")
+   *           .setInterconnectAttachment(InterconnectAttachment.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   InterconnectAttachment response =
+   *       edgeNetworkClient.createInterconnectAttachmentAsync(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 + createInterconnectAttachmentAsync(CreateInterconnectAttachmentRequest request) { + return createInterconnectAttachmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InterconnectAttachment in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateInterconnectAttachmentRequest request =
+   *       CreateInterconnectAttachmentRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setInterconnectAttachmentId("interconnectAttachmentId1053538636")
+   *           .setInterconnectAttachment(InterconnectAttachment.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.createInterconnectAttachmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   InterconnectAttachment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable() { + return stub.createInterconnectAttachmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InterconnectAttachment in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateInterconnectAttachmentRequest request =
+   *       CreateInterconnectAttachmentRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setInterconnectAttachmentId("interconnectAttachmentId1053538636")
+   *           .setInterconnectAttachment(InterconnectAttachment.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.createInterconnectAttachmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createInterconnectAttachmentCallable() { + return stub.createInterconnectAttachmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   InterconnectAttachmentName name =
+   *       InterconnectAttachmentName.of(
+   *           "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]");
+   *   edgeNetworkClient.deleteInterconnectAttachmentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInterconnectAttachmentAsync( + InterconnectAttachmentName name) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteInterconnectAttachmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name =
+   *       InterconnectAttachmentName.of(
+   *               "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *           .toString();
+   *   edgeNetworkClient.deleteInterconnectAttachmentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInterconnectAttachmentAsync( + String name) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder().setName(name).build(); + return deleteInterconnectAttachmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteInterconnectAttachmentRequest request =
+   *       DeleteInterconnectAttachmentRequest.newBuilder()
+   *           .setName(
+   *               InterconnectAttachmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   edgeNetworkClient.deleteInterconnectAttachmentAsync(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 deleteInterconnectAttachmentAsync( + DeleteInterconnectAttachmentRequest request) { + return deleteInterconnectAttachmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteInterconnectAttachmentRequest request =
+   *       DeleteInterconnectAttachmentRequest.newBuilder()
+   *           .setName(
+   *               InterconnectAttachmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.deleteInterconnectAttachmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInterconnectAttachmentOperationCallable() { + return stub.deleteInterconnectAttachmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single InterconnectAttachment. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteInterconnectAttachmentRequest request =
+   *       DeleteInterconnectAttachmentRequest.newBuilder()
+   *           .setName(
+   *               InterconnectAttachmentName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.deleteInterconnectAttachmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteInterconnectAttachmentCallable() { + return stub.deleteInterconnectAttachmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   for (Router element : edgeNetworkClient.listRouters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListRoutersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutersPagedResponse listRouters(ZoneName parent) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRouters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   for (Router element : edgeNetworkClient.listRouters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListRoutersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutersPagedResponse listRouters(String parent) { + ListRoutersRequest request = ListRoutersRequest.newBuilder().setParent(parent).build(); + return listRouters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListRoutersRequest request =
+   *       ListRoutersRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Router element : edgeNetworkClient.listRouters(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 ListRoutersPagedResponse listRouters(ListRoutersRequest request) { + return listRoutersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListRoutersRequest request =
+   *       ListRoutersRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.listRoutersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Router element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRoutersPagedCallable() { + return stub.listRoutersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListRoutersRequest request =
+   *       ListRoutersRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListRoutersResponse response = edgeNetworkClient.listRoutersCallable().call(request);
+   *     for (Router element : response.getRoutersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRoutersCallable() { + return stub.listRoutersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]");
+   *   Router response = edgeNetworkClient.getRouter(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Router getRouter(RouterName name) { + GetRouterRequest request = + GetRouterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString();
+   *   Router response = edgeNetworkClient.getRouter(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Router getRouter(String name) { + GetRouterRequest request = GetRouterRequest.newBuilder().setName(name).build(); + return getRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetRouterRequest request =
+   *       GetRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .build();
+   *   Router response = edgeNetworkClient.getRouter(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 Router getRouter(GetRouterRequest request) { + return getRouterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetRouterRequest request =
+   *       GetRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.getRouterCallable().futureCall(request);
+   *   // Do something.
+   *   Router response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRouterCallable() { + return stub.getRouterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]");
+   *   DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(name);
+   * }
+   * }
+ * + * @param name Required. The name of the router resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseRouterResponse diagnoseRouter(RouterName name) { + DiagnoseRouterRequest request = + DiagnoseRouterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return diagnoseRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString();
+   *   DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(name);
+   * }
+   * }
+ * + * @param name Required. The name of the router resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseRouterResponse diagnoseRouter(String name) { + DiagnoseRouterRequest request = DiagnoseRouterRequest.newBuilder().setName(name).build(); + return diagnoseRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DiagnoseRouterRequest request =
+   *       DiagnoseRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .build();
+   *   DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(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 DiagnoseRouterResponse diagnoseRouter(DiagnoseRouterRequest request) { + return diagnoseRouterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DiagnoseRouterRequest request =
+   *       DiagnoseRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.diagnoseRouterCallable().futureCall(request);
+   *   // Do something.
+   *   DiagnoseRouterResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + diagnoseRouterCallable() { + return stub.diagnoseRouterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Router in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   Router router = Router.newBuilder().build();
+   *   String routerId = "routerId5435972";
+   *   Router response = edgeNetworkClient.createRouterAsync(parent, router, routerId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param router Required. The resource being created + * @param routerId Required. Id of the requesting object If auto-generating Id server-side, remove + * this field and router_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRouterAsync( + ZoneName parent, Router router, String routerId) { + CreateRouterRequest request = + CreateRouterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRouter(router) + .setRouterId(routerId) + .build(); + return createRouterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Router in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   Router router = Router.newBuilder().build();
+   *   String routerId = "routerId5435972";
+   *   Router response = edgeNetworkClient.createRouterAsync(parent, router, routerId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param router Required. The resource being created + * @param routerId Required. Id of the requesting object If auto-generating Id server-side, remove + * this field and router_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRouterAsync( + String parent, Router router, String routerId) { + CreateRouterRequest request = + CreateRouterRequest.newBuilder() + .setParent(parent) + .setRouter(router) + .setRouterId(routerId) + .build(); + return createRouterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Router in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateRouterRequest request =
+   *       CreateRouterRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setRouterId("routerId5435972")
+   *           .setRouter(Router.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Router response = edgeNetworkClient.createRouterAsync(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 createRouterAsync( + CreateRouterRequest request) { + return createRouterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Router in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateRouterRequest request =
+   *       CreateRouterRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setRouterId("routerId5435972")
+   *           .setRouter(Router.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.createRouterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Router response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createRouterOperationCallable() { + return stub.createRouterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Router in a given project and 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   CreateRouterRequest request =
+   *       CreateRouterRequest.newBuilder()
+   *           .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setRouterId("routerId5435972")
+   *           .setRouter(Router.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.createRouterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRouterCallable() { + return stub.createRouterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   Router router = Router.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Router response = edgeNetworkClient.updateRouterAsync(router, updateMask).get();
+   * }
+   * }
+ * + * @param router Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Router resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateRouterAsync( + Router router, FieldMask updateMask) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder().setRouter(router).setUpdateMask(updateMask).build(); + return updateRouterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   UpdateRouterRequest request =
+   *       UpdateRouterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRouter(Router.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Router response = edgeNetworkClient.updateRouterAsync(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 updateRouterAsync( + UpdateRouterRequest request) { + return updateRouterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   UpdateRouterRequest request =
+   *       UpdateRouterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRouter(Router.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.updateRouterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Router response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateRouterOperationCallable() { + return stub.updateRouterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   UpdateRouterRequest request =
+   *       UpdateRouterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRouter(Router.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.updateRouterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateRouterCallable() { + return stub.updateRouterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]");
+   *   edgeNetworkClient.deleteRouterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRouterAsync(RouterName name) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteRouterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString();
+   *   edgeNetworkClient.deleteRouterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRouterAsync(String name) { + DeleteRouterRequest request = DeleteRouterRequest.newBuilder().setName(name).build(); + return deleteRouterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteRouterRequest request =
+   *       DeleteRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   edgeNetworkClient.deleteRouterAsync(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 deleteRouterAsync( + DeleteRouterRequest request) { + return deleteRouterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteRouterRequest request =
+   *       DeleteRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       edgeNetworkClient.deleteRouterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRouterOperationCallable() { + return stub.deleteRouterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Router. + * + *

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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   DeleteRouterRequest request =
+   *       DeleteRouterRequest.newBuilder()
+   *           .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = edgeNetworkClient.deleteRouterCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRouterCallable() { + return stub.deleteRouterCallable(); + } + + // 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = edgeNetworkClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListZonesPagedResponse + extends AbstractPagedListResponse< + ListZonesRequest, ListZonesResponse, Zone, ListZonesPage, ListZonesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListZonesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListZonesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListZonesPagedResponse(ListZonesPage page) { + super(page, ListZonesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListZonesPage + extends AbstractPage { + + private ListZonesPage( + PageContext context, + ListZonesResponse response) { + super(context, response); + } + + private static ListZonesPage createEmptyPage() { + return new ListZonesPage(null, null); + } + + @Override + protected ListZonesPage createPage( + PageContext context, + ListZonesResponse response) { + return new ListZonesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListZonesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListZonesRequest, ListZonesResponse, Zone, ListZonesPage, ListZonesFixedSizeCollection> { + + private ListZonesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListZonesFixedSizeCollection createEmptyCollection() { + return new ListZonesFixedSizeCollection(null, 0); + } + + @Override + protected ListZonesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListZonesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNetworksPagedResponse + extends AbstractPagedListResponse< + ListNetworksRequest, + ListNetworksResponse, + Network, + ListNetworksPage, + ListNetworksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNetworksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNetworksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNetworksPagedResponse(ListNetworksPage page) { + super(page, ListNetworksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNetworksPage + extends AbstractPage { + + private ListNetworksPage( + PageContext context, + ListNetworksResponse response) { + super(context, response); + } + + private static ListNetworksPage createEmptyPage() { + return new ListNetworksPage(null, null); + } + + @Override + protected ListNetworksPage createPage( + PageContext context, + ListNetworksResponse response) { + return new ListNetworksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNetworksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNetworksRequest, + ListNetworksResponse, + Network, + ListNetworksPage, + ListNetworksFixedSizeCollection> { + + private ListNetworksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNetworksFixedSizeCollection createEmptyCollection() { + return new ListNetworksFixedSizeCollection(null, 0); + } + + @Override + protected ListNetworksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNetworksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSubnetsPagedResponse + extends AbstractPagedListResponse< + ListSubnetsRequest, + ListSubnetsResponse, + Subnet, + ListSubnetsPage, + ListSubnetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSubnetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSubnetsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSubnetsPagedResponse(ListSubnetsPage page) { + super(page, ListSubnetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSubnetsPage + extends AbstractPage { + + private ListSubnetsPage( + PageContext context, + ListSubnetsResponse response) { + super(context, response); + } + + private static ListSubnetsPage createEmptyPage() { + return new ListSubnetsPage(null, null); + } + + @Override + protected ListSubnetsPage createPage( + PageContext context, + ListSubnetsResponse response) { + return new ListSubnetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSubnetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSubnetsRequest, + ListSubnetsResponse, + Subnet, + ListSubnetsPage, + ListSubnetsFixedSizeCollection> { + + private ListSubnetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSubnetsFixedSizeCollection createEmptyCollection() { + return new ListSubnetsFixedSizeCollection(null, 0); + } + + @Override + protected ListSubnetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSubnetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInterconnectsPagedResponse + extends AbstractPagedListResponse< + ListInterconnectsRequest, + ListInterconnectsResponse, + Interconnect, + ListInterconnectsPage, + ListInterconnectsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInterconnectsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInterconnectsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInterconnectsPagedResponse(ListInterconnectsPage page) { + super(page, ListInterconnectsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInterconnectsPage + extends AbstractPage< + ListInterconnectsRequest, + ListInterconnectsResponse, + Interconnect, + ListInterconnectsPage> { + + private ListInterconnectsPage( + PageContext context, + ListInterconnectsResponse response) { + super(context, response); + } + + private static ListInterconnectsPage createEmptyPage() { + return new ListInterconnectsPage(null, null); + } + + @Override + protected ListInterconnectsPage createPage( + PageContext context, + ListInterconnectsResponse response) { + return new ListInterconnectsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInterconnectsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInterconnectsRequest, + ListInterconnectsResponse, + Interconnect, + ListInterconnectsPage, + ListInterconnectsFixedSizeCollection> { + + private ListInterconnectsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInterconnectsFixedSizeCollection createEmptyCollection() { + return new ListInterconnectsFixedSizeCollection(null, 0); + } + + @Override + protected ListInterconnectsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInterconnectsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInterconnectAttachmentsPagedResponse + extends AbstractPagedListResponse< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment, + ListInterconnectAttachmentsPage, + ListInterconnectAttachmentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInterconnectAttachmentsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInterconnectAttachmentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInterconnectAttachmentsPagedResponse(ListInterconnectAttachmentsPage page) { + super(page, ListInterconnectAttachmentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInterconnectAttachmentsPage + extends AbstractPage< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment, + ListInterconnectAttachmentsPage> { + + private ListInterconnectAttachmentsPage( + PageContext< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment> + context, + ListInterconnectAttachmentsResponse response) { + super(context, response); + } + + private static ListInterconnectAttachmentsPage createEmptyPage() { + return new ListInterconnectAttachmentsPage(null, null); + } + + @Override + protected ListInterconnectAttachmentsPage createPage( + PageContext< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment> + context, + ListInterconnectAttachmentsResponse response) { + return new ListInterconnectAttachmentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInterconnectAttachmentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment, + ListInterconnectAttachmentsPage, + ListInterconnectAttachmentsFixedSizeCollection> { + + private ListInterconnectAttachmentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInterconnectAttachmentsFixedSizeCollection createEmptyCollection() { + return new ListInterconnectAttachmentsFixedSizeCollection(null, 0); + } + + @Override + protected ListInterconnectAttachmentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInterconnectAttachmentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRoutersPagedResponse + extends AbstractPagedListResponse< + ListRoutersRequest, + ListRoutersResponse, + Router, + ListRoutersPage, + ListRoutersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRoutersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListRoutersPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListRoutersPagedResponse(ListRoutersPage page) { + super(page, ListRoutersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRoutersPage + extends AbstractPage { + + private ListRoutersPage( + PageContext context, + ListRoutersResponse response) { + super(context, response); + } + + private static ListRoutersPage createEmptyPage() { + return new ListRoutersPage(null, null); + } + + @Override + protected ListRoutersPage createPage( + PageContext context, + ListRoutersResponse response) { + return new ListRoutersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRoutersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRoutersRequest, + ListRoutersResponse, + Router, + ListRoutersPage, + ListRoutersFixedSizeCollection> { + + private ListRoutersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRoutersFixedSizeCollection createEmptyCollection() { + return new ListRoutersFixedSizeCollection(null, 0); + } + + @Override + protected ListRoutersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRoutersFixedSizeCollection(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-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkSettings.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkSettings.java new file mode 100644 index 000000000000..369315c55196 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkSettings.java @@ -0,0 +1,653 @@ +/* + * 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.edgenetwork.v1; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +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.edgenetwork.v1.stub.EdgeNetworkStubSettings; +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.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EdgeNetworkClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (edgenetwork.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of initializeZone to 30 seconds: + * + *

{@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
+ * EdgeNetworkSettings.Builder edgeNetworkSettingsBuilder = EdgeNetworkSettings.newBuilder();
+ * edgeNetworkSettingsBuilder
+ *     .initializeZoneSettings()
+ *     .setRetrySettings(
+ *         edgeNetworkSettingsBuilder
+ *             .initializeZoneSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EdgeNetworkSettings edgeNetworkSettings = edgeNetworkSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EdgeNetworkSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to initializeZone. */ + public UnaryCallSettings initializeZoneSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).initializeZoneSettings(); + } + + /** Returns the object with the settings used for calls to listZones. */ + public PagedCallSettings + listZonesSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listZonesSettings(); + } + + /** Returns the object with the settings used for calls to getZone. */ + public UnaryCallSettings getZoneSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getZoneSettings(); + } + + /** Returns the object with the settings used for calls to listNetworks. */ + public PagedCallSettings + listNetworksSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listNetworksSettings(); + } + + /** Returns the object with the settings used for calls to getNetwork. */ + public UnaryCallSettings getNetworkSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getNetworkSettings(); + } + + /** Returns the object with the settings used for calls to diagnoseNetwork. */ + public UnaryCallSettings + diagnoseNetworkSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).diagnoseNetworkSettings(); + } + + /** Returns the object with the settings used for calls to createNetwork. */ + public UnaryCallSettings createNetworkSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createNetworkSettings(); + } + + /** Returns the object with the settings used for calls to createNetwork. */ + public OperationCallSettings + createNetworkOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createNetworkOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteNetwork. */ + public UnaryCallSettings deleteNetworkSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteNetworkSettings(); + } + + /** Returns the object with the settings used for calls to deleteNetwork. */ + public OperationCallSettings + deleteNetworkOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteNetworkOperationSettings(); + } + + /** Returns the object with the settings used for calls to listSubnets. */ + public PagedCallSettings + listSubnetsSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listSubnetsSettings(); + } + + /** Returns the object with the settings used for calls to getSubnet. */ + public UnaryCallSettings getSubnetSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getSubnetSettings(); + } + + /** Returns the object with the settings used for calls to createSubnet. */ + public UnaryCallSettings createSubnetSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createSubnetSettings(); + } + + /** Returns the object with the settings used for calls to createSubnet. */ + public OperationCallSettings + createSubnetOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createSubnetOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSubnet. */ + public UnaryCallSettings updateSubnetSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).updateSubnetSettings(); + } + + /** Returns the object with the settings used for calls to updateSubnet. */ + public OperationCallSettings + updateSubnetOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).updateSubnetOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteSubnet. */ + public UnaryCallSettings deleteSubnetSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteSubnetSettings(); + } + + /** Returns the object with the settings used for calls to deleteSubnet. */ + public OperationCallSettings + deleteSubnetOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteSubnetOperationSettings(); + } + + /** Returns the object with the settings used for calls to listInterconnects. */ + public PagedCallSettings< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + listInterconnectsSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listInterconnectsSettings(); + } + + /** Returns the object with the settings used for calls to getInterconnect. */ + public UnaryCallSettings getInterconnectSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getInterconnectSettings(); + } + + /** Returns the object with the settings used for calls to diagnoseInterconnect. */ + public UnaryCallSettings + diagnoseInterconnectSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).diagnoseInterconnectSettings(); + } + + /** Returns the object with the settings used for calls to listInterconnectAttachments. */ + public PagedCallSettings< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listInterconnectAttachmentsSettings(); + } + + /** Returns the object with the settings used for calls to getInterconnectAttachment. */ + public UnaryCallSettings + getInterconnectAttachmentSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getInterconnectAttachmentSettings(); + } + + /** Returns the object with the settings used for calls to createInterconnectAttachment. */ + public UnaryCallSettings + createInterconnectAttachmentSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createInterconnectAttachmentSettings(); + } + + /** Returns the object with the settings used for calls to createInterconnectAttachment. */ + public OperationCallSettings< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()) + .createInterconnectAttachmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInterconnectAttachment. */ + public UnaryCallSettings + deleteInterconnectAttachmentSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteInterconnectAttachmentSettings(); + } + + /** Returns the object with the settings used for calls to deleteInterconnectAttachment. */ + public OperationCallSettings + deleteInterconnectAttachmentOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()) + .deleteInterconnectAttachmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to listRouters. */ + public PagedCallSettings + listRoutersSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listRoutersSettings(); + } + + /** Returns the object with the settings used for calls to getRouter. */ + public UnaryCallSettings getRouterSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getRouterSettings(); + } + + /** Returns the object with the settings used for calls to diagnoseRouter. */ + public UnaryCallSettings diagnoseRouterSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).diagnoseRouterSettings(); + } + + /** Returns the object with the settings used for calls to createRouter. */ + public UnaryCallSettings createRouterSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createRouterSettings(); + } + + /** Returns the object with the settings used for calls to createRouter. */ + public OperationCallSettings + createRouterOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).createRouterOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateRouter. */ + public UnaryCallSettings updateRouterSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).updateRouterSettings(); + } + + /** Returns the object with the settings used for calls to updateRouter. */ + public OperationCallSettings + updateRouterOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).updateRouterOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteRouter. */ + public UnaryCallSettings deleteRouterSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteRouterSettings(); + } + + /** Returns the object with the settings used for calls to deleteRouter. */ + public OperationCallSettings + deleteRouterOperationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).deleteRouterOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((EdgeNetworkStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final EdgeNetworkSettings create(EdgeNetworkStubSettings stub) throws IOException { + return new EdgeNetworkSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EdgeNetworkStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EdgeNetworkStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EdgeNetworkStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EdgeNetworkStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EdgeNetworkStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return EdgeNetworkStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EdgeNetworkStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EdgeNetworkStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EdgeNetworkSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EdgeNetworkSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(EdgeNetworkStubSettings.newBuilder(clientContext)); + } + + protected Builder(EdgeNetworkSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EdgeNetworkStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(EdgeNetworkStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(EdgeNetworkStubSettings.newHttpJsonBuilder()); + } + + public EdgeNetworkStubSettings.Builder getStubSettingsBuilder() { + return ((EdgeNetworkStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to initializeZone. */ + public UnaryCallSettings.Builder + initializeZoneSettings() { + return getStubSettingsBuilder().initializeZoneSettings(); + } + + /** Returns the builder for the settings used for calls to listZones. */ + public PagedCallSettings.Builder + listZonesSettings() { + return getStubSettingsBuilder().listZonesSettings(); + } + + /** Returns the builder for the settings used for calls to getZone. */ + public UnaryCallSettings.Builder getZoneSettings() { + return getStubSettingsBuilder().getZoneSettings(); + } + + /** Returns the builder for the settings used for calls to listNetworks. */ + public PagedCallSettings.Builder< + ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> + listNetworksSettings() { + return getStubSettingsBuilder().listNetworksSettings(); + } + + /** Returns the builder for the settings used for calls to getNetwork. */ + public UnaryCallSettings.Builder getNetworkSettings() { + return getStubSettingsBuilder().getNetworkSettings(); + } + + /** Returns the builder for the settings used for calls to diagnoseNetwork. */ + public UnaryCallSettings.Builder + diagnoseNetworkSettings() { + return getStubSettingsBuilder().diagnoseNetworkSettings(); + } + + /** Returns the builder for the settings used for calls to createNetwork. */ + public UnaryCallSettings.Builder createNetworkSettings() { + return getStubSettingsBuilder().createNetworkSettings(); + } + + /** Returns the builder for the settings used for calls to createNetwork. */ + public OperationCallSettings.Builder + createNetworkOperationSettings() { + return getStubSettingsBuilder().createNetworkOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNetwork. */ + public UnaryCallSettings.Builder deleteNetworkSettings() { + return getStubSettingsBuilder().deleteNetworkSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNetwork. */ + public OperationCallSettings.Builder + deleteNetworkOperationSettings() { + return getStubSettingsBuilder().deleteNetworkOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listSubnets. */ + public PagedCallSettings.Builder< + ListSubnetsRequest, ListSubnetsResponse, ListSubnetsPagedResponse> + listSubnetsSettings() { + return getStubSettingsBuilder().listSubnetsSettings(); + } + + /** Returns the builder for the settings used for calls to getSubnet. */ + public UnaryCallSettings.Builder getSubnetSettings() { + return getStubSettingsBuilder().getSubnetSettings(); + } + + /** Returns the builder for the settings used for calls to createSubnet. */ + public UnaryCallSettings.Builder createSubnetSettings() { + return getStubSettingsBuilder().createSubnetSettings(); + } + + /** Returns the builder for the settings used for calls to createSubnet. */ + public OperationCallSettings.Builder + createSubnetOperationSettings() { + return getStubSettingsBuilder().createSubnetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSubnet. */ + public UnaryCallSettings.Builder updateSubnetSettings() { + return getStubSettingsBuilder().updateSubnetSettings(); + } + + /** Returns the builder for the settings used for calls to updateSubnet. */ + public OperationCallSettings.Builder + updateSubnetOperationSettings() { + return getStubSettingsBuilder().updateSubnetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSubnet. */ + public UnaryCallSettings.Builder deleteSubnetSettings() { + return getStubSettingsBuilder().deleteSubnetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSubnet. */ + public OperationCallSettings.Builder + deleteSubnetOperationSettings() { + return getStubSettingsBuilder().deleteSubnetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listInterconnects. */ + public PagedCallSettings.Builder< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + listInterconnectsSettings() { + return getStubSettingsBuilder().listInterconnectsSettings(); + } + + /** Returns the builder for the settings used for calls to getInterconnect. */ + public UnaryCallSettings.Builder + getInterconnectSettings() { + return getStubSettingsBuilder().getInterconnectSettings(); + } + + /** Returns the builder for the settings used for calls to diagnoseInterconnect. */ + public UnaryCallSettings.Builder + diagnoseInterconnectSettings() { + return getStubSettingsBuilder().diagnoseInterconnectSettings(); + } + + /** Returns the builder for the settings used for calls to listInterconnectAttachments. */ + public PagedCallSettings.Builder< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsSettings() { + return getStubSettingsBuilder().listInterconnectAttachmentsSettings(); + } + + /** Returns the builder for the settings used for calls to getInterconnectAttachment. */ + public UnaryCallSettings.Builder + getInterconnectAttachmentSettings() { + return getStubSettingsBuilder().getInterconnectAttachmentSettings(); + } + + /** Returns the builder for the settings used for calls to createInterconnectAttachment. */ + public UnaryCallSettings.Builder + createInterconnectAttachmentSettings() { + return getStubSettingsBuilder().createInterconnectAttachmentSettings(); + } + + /** Returns the builder for the settings used for calls to createInterconnectAttachment. */ + public OperationCallSettings.Builder< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationSettings() { + return getStubSettingsBuilder().createInterconnectAttachmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInterconnectAttachment. */ + public UnaryCallSettings.Builder + deleteInterconnectAttachmentSettings() { + return getStubSettingsBuilder().deleteInterconnectAttachmentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInterconnectAttachment. */ + public OperationCallSettings.Builder< + DeleteInterconnectAttachmentRequest, Empty, OperationMetadata> + deleteInterconnectAttachmentOperationSettings() { + return getStubSettingsBuilder().deleteInterconnectAttachmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listRouters. */ + public PagedCallSettings.Builder< + ListRoutersRequest, ListRoutersResponse, ListRoutersPagedResponse> + listRoutersSettings() { + return getStubSettingsBuilder().listRoutersSettings(); + } + + /** Returns the builder for the settings used for calls to getRouter. */ + public UnaryCallSettings.Builder getRouterSettings() { + return getStubSettingsBuilder().getRouterSettings(); + } + + /** Returns the builder for the settings used for calls to diagnoseRouter. */ + public UnaryCallSettings.Builder + diagnoseRouterSettings() { + return getStubSettingsBuilder().diagnoseRouterSettings(); + } + + /** Returns the builder for the settings used for calls to createRouter. */ + public UnaryCallSettings.Builder createRouterSettings() { + return getStubSettingsBuilder().createRouterSettings(); + } + + /** Returns the builder for the settings used for calls to createRouter. */ + public OperationCallSettings.Builder + createRouterOperationSettings() { + return getStubSettingsBuilder().createRouterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateRouter. */ + public UnaryCallSettings.Builder updateRouterSettings() { + return getStubSettingsBuilder().updateRouterSettings(); + } + + /** Returns the builder for the settings used for calls to updateRouter. */ + public OperationCallSettings.Builder + updateRouterOperationSettings() { + return getStubSettingsBuilder().updateRouterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRouter. */ + public UnaryCallSettings.Builder deleteRouterSettings() { + return getStubSettingsBuilder().deleteRouterSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRouter. */ + public OperationCallSettings.Builder + deleteRouterOperationSettings() { + return getStubSettingsBuilder().deleteRouterOperationSettings(); + } + + /** 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(); + } + + @Override + public EdgeNetworkSettings build() throws IOException { + return new EdgeNetworkSettings(this); + } + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/gapic_metadata.json b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/gapic_metadata.json new file mode 100644 index 000000000000..a00c43788ea9 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/gapic_metadata.json @@ -0,0 +1,102 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.edgenetwork.v1", + "libraryPackage": "com.google.cloud.edgenetwork.v1", + "services": { + "EdgeNetwork": { + "clients": { + "grpc": { + "libraryClient": "EdgeNetworkClient", + "rpcs": { + "CreateInterconnectAttachment": { + "methods": ["createInterconnectAttachmentAsync", "createInterconnectAttachmentAsync", "createInterconnectAttachmentAsync", "createInterconnectAttachmentOperationCallable", "createInterconnectAttachmentCallable"] + }, + "CreateNetwork": { + "methods": ["createNetworkAsync", "createNetworkAsync", "createNetworkAsync", "createNetworkOperationCallable", "createNetworkCallable"] + }, + "CreateRouter": { + "methods": ["createRouterAsync", "createRouterAsync", "createRouterAsync", "createRouterOperationCallable", "createRouterCallable"] + }, + "CreateSubnet": { + "methods": ["createSubnetAsync", "createSubnetAsync", "createSubnetAsync", "createSubnetOperationCallable", "createSubnetCallable"] + }, + "DeleteInterconnectAttachment": { + "methods": ["deleteInterconnectAttachmentAsync", "deleteInterconnectAttachmentAsync", "deleteInterconnectAttachmentAsync", "deleteInterconnectAttachmentOperationCallable", "deleteInterconnectAttachmentCallable"] + }, + "DeleteNetwork": { + "methods": ["deleteNetworkAsync", "deleteNetworkAsync", "deleteNetworkAsync", "deleteNetworkOperationCallable", "deleteNetworkCallable"] + }, + "DeleteRouter": { + "methods": ["deleteRouterAsync", "deleteRouterAsync", "deleteRouterAsync", "deleteRouterOperationCallable", "deleteRouterCallable"] + }, + "DeleteSubnet": { + "methods": ["deleteSubnetAsync", "deleteSubnetAsync", "deleteSubnetAsync", "deleteSubnetOperationCallable", "deleteSubnetCallable"] + }, + "DiagnoseInterconnect": { + "methods": ["diagnoseInterconnect", "diagnoseInterconnect", "diagnoseInterconnect", "diagnoseInterconnectCallable"] + }, + "DiagnoseNetwork": { + "methods": ["diagnoseNetwork", "diagnoseNetwork", "diagnoseNetwork", "diagnoseNetworkCallable"] + }, + "DiagnoseRouter": { + "methods": ["diagnoseRouter", "diagnoseRouter", "diagnoseRouter", "diagnoseRouterCallable"] + }, + "GetInterconnect": { + "methods": ["getInterconnect", "getInterconnect", "getInterconnect", "getInterconnectCallable"] + }, + "GetInterconnectAttachment": { + "methods": ["getInterconnectAttachment", "getInterconnectAttachment", "getInterconnectAttachment", "getInterconnectAttachmentCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetNetwork": { + "methods": ["getNetwork", "getNetwork", "getNetwork", "getNetworkCallable"] + }, + "GetRouter": { + "methods": ["getRouter", "getRouter", "getRouter", "getRouterCallable"] + }, + "GetSubnet": { + "methods": ["getSubnet", "getSubnet", "getSubnet", "getSubnetCallable"] + }, + "GetZone": { + "methods": ["getZone", "getZone", "getZone", "getZoneCallable"] + }, + "InitializeZone": { + "methods": ["initializeZone", "initializeZone", "initializeZone", "initializeZoneCallable"] + }, + "ListInterconnectAttachments": { + "methods": ["listInterconnectAttachments", "listInterconnectAttachments", "listInterconnectAttachments", "listInterconnectAttachmentsPagedCallable", "listInterconnectAttachmentsCallable"] + }, + "ListInterconnects": { + "methods": ["listInterconnects", "listInterconnects", "listInterconnects", "listInterconnectsPagedCallable", "listInterconnectsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListNetworks": { + "methods": ["listNetworks", "listNetworks", "listNetworks", "listNetworksPagedCallable", "listNetworksCallable"] + }, + "ListRouters": { + "methods": ["listRouters", "listRouters", "listRouters", "listRoutersPagedCallable", "listRoutersCallable"] + }, + "ListSubnets": { + "methods": ["listSubnets", "listSubnets", "listSubnets", "listSubnetsPagedCallable", "listSubnetsCallable"] + }, + "ListZones": { + "methods": ["listZones", "listZones", "listZones", "listZonesPagedCallable", "listZonesCallable"] + }, + "UpdateRouter": { + "methods": ["updateRouterAsync", "updateRouterAsync", "updateRouterOperationCallable", "updateRouterCallable"] + }, + "UpdateSubnet": { + "methods": ["updateSubnetAsync", "updateSubnetAsync", "updateSubnetOperationCallable", "updateSubnetCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/package-info.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/package-info.java new file mode 100644 index 000000000000..83fb44c251ad --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/package-info.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. + */ + +/** + * A client to Distributed Cloud Edge Network API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= EdgeNetworkClient ======================= + * + *

Service Description: EdgeNetwork API provides managed, highly available cloud dynamic network + * configuration service to the GEC customer to enable edge application and network function + * solutions. This allows the customers to easily define and configure the network setup and + * property to meet the workload requirement. + * + *

Sample for EdgeNetworkClient: + * + *

{@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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
+ *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+ *   InitializeZoneResponse response = edgeNetworkClient.initializeZone(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.edgenetwork.v1; + +import javax.annotation.Generated; diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java new file mode 100644 index 000000000000..7935ca5a10a9 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java @@ -0,0 +1,307 @@ +/* + * 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.edgenetwork.v1.stub; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +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.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.GetInterconnectRequest; +import com.google.cloud.edgenetwork.v1.GetNetworkRequest; +import com.google.cloud.edgenetwork.v1.GetRouterRequest; +import com.google.cloud.edgenetwork.v1.GetSubnetRequest; +import com.google.cloud.edgenetwork.v1.GetZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectsResponse; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.ListNetworksResponse; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.ListRoutersResponse; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.ListSubnetsResponse; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.ListZonesResponse; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.cloud.edgenetwork.v1.Zone; +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.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the EdgeNetwork service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class EdgeNetworkStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable initializeZoneCallable() { + throw new UnsupportedOperationException("Not implemented: initializeZoneCallable()"); + } + + public UnaryCallable listZonesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listZonesPagedCallable()"); + } + + public UnaryCallable listZonesCallable() { + throw new UnsupportedOperationException("Not implemented: listZonesCallable()"); + } + + public UnaryCallable getZoneCallable() { + throw new UnsupportedOperationException("Not implemented: getZoneCallable()"); + } + + public UnaryCallable listNetworksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNetworksPagedCallable()"); + } + + public UnaryCallable listNetworksCallable() { + throw new UnsupportedOperationException("Not implemented: listNetworksCallable()"); + } + + public UnaryCallable getNetworkCallable() { + throw new UnsupportedOperationException("Not implemented: getNetworkCallable()"); + } + + public UnaryCallable diagnoseNetworkCallable() { + throw new UnsupportedOperationException("Not implemented: diagnoseNetworkCallable()"); + } + + public OperationCallable + createNetworkOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createNetworkOperationCallable()"); + } + + public UnaryCallable createNetworkCallable() { + throw new UnsupportedOperationException("Not implemented: createNetworkCallable()"); + } + + public OperationCallable + deleteNetworkOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNetworkOperationCallable()"); + } + + public UnaryCallable deleteNetworkCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNetworkCallable()"); + } + + public UnaryCallable listSubnetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSubnetsPagedCallable()"); + } + + public UnaryCallable listSubnetsCallable() { + throw new UnsupportedOperationException("Not implemented: listSubnetsCallable()"); + } + + public UnaryCallable getSubnetCallable() { + throw new UnsupportedOperationException("Not implemented: getSubnetCallable()"); + } + + public OperationCallable + createSubnetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createSubnetOperationCallable()"); + } + + public UnaryCallable createSubnetCallable() { + throw new UnsupportedOperationException("Not implemented: createSubnetCallable()"); + } + + public OperationCallable + updateSubnetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSubnetOperationCallable()"); + } + + public UnaryCallable updateSubnetCallable() { + throw new UnsupportedOperationException("Not implemented: updateSubnetCallable()"); + } + + public OperationCallable + deleteSubnetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSubnetOperationCallable()"); + } + + public UnaryCallable deleteSubnetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSubnetCallable()"); + } + + public UnaryCallable + listInterconnectsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInterconnectsPagedCallable()"); + } + + public UnaryCallable + listInterconnectsCallable() { + throw new UnsupportedOperationException("Not implemented: listInterconnectsCallable()"); + } + + public UnaryCallable getInterconnectCallable() { + throw new UnsupportedOperationException("Not implemented: getInterconnectCallable()"); + } + + public UnaryCallable + diagnoseInterconnectCallable() { + throw new UnsupportedOperationException("Not implemented: diagnoseInterconnectCallable()"); + } + + public UnaryCallable + listInterconnectAttachmentsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInterconnectAttachmentsPagedCallable()"); + } + + public UnaryCallable + listInterconnectAttachmentsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInterconnectAttachmentsCallable()"); + } + + public UnaryCallable + getInterconnectAttachmentCallable() { + throw new UnsupportedOperationException("Not implemented: getInterconnectAttachmentCallable()"); + } + + public OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createInterconnectAttachmentOperationCallable()"); + } + + public UnaryCallable + createInterconnectAttachmentCallable() { + throw new UnsupportedOperationException( + "Not implemented: createInterconnectAttachmentCallable()"); + } + + public OperationCallable + deleteInterconnectAttachmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteInterconnectAttachmentOperationCallable()"); + } + + public UnaryCallable + deleteInterconnectAttachmentCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteInterconnectAttachmentCallable()"); + } + + public UnaryCallable listRoutersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRoutersPagedCallable()"); + } + + public UnaryCallable listRoutersCallable() { + throw new UnsupportedOperationException("Not implemented: listRoutersCallable()"); + } + + public UnaryCallable getRouterCallable() { + throw new UnsupportedOperationException("Not implemented: getRouterCallable()"); + } + + public UnaryCallable diagnoseRouterCallable() { + throw new UnsupportedOperationException("Not implemented: diagnoseRouterCallable()"); + } + + public OperationCallable + createRouterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createRouterOperationCallable()"); + } + + public UnaryCallable createRouterCallable() { + throw new UnsupportedOperationException("Not implemented: createRouterCallable()"); + } + + public OperationCallable + updateRouterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateRouterOperationCallable()"); + } + + public UnaryCallable updateRouterCallable() { + throw new UnsupportedOperationException("Not implemented: updateRouterCallable()"); + } + + public OperationCallable + deleteRouterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRouterOperationCallable()"); + } + + public UnaryCallable deleteRouterCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRouterCallable()"); + } + + 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()"); + } + + @Override + public abstract void close(); +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStubSettings.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStubSettings.java new file mode 100644 index 000000000000..e250199b3c4b --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStubSettings.java @@ -0,0 +1,1958 @@ +/* + * 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.edgenetwork.v1.stub; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +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.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.GetInterconnectRequest; +import com.google.cloud.edgenetwork.v1.GetNetworkRequest; +import com.google.cloud.edgenetwork.v1.GetRouterRequest; +import com.google.cloud.edgenetwork.v1.GetSubnetRequest; +import com.google.cloud.edgenetwork.v1.GetZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectsResponse; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.ListNetworksResponse; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.ListRoutersResponse; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.ListSubnetsResponse; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.ListZonesResponse; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.cloud.edgenetwork.v1.Zone; +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.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link EdgeNetworkStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (edgenetwork.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of initializeZone to 30 seconds: + * + *

{@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
+ * EdgeNetworkStubSettings.Builder edgeNetworkSettingsBuilder =
+ *     EdgeNetworkStubSettings.newBuilder();
+ * edgeNetworkSettingsBuilder
+ *     .initializeZoneSettings()
+ *     .setRetrySettings(
+ *         edgeNetworkSettingsBuilder
+ *             .initializeZoneSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EdgeNetworkStubSettings edgeNetworkSettings = edgeNetworkSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EdgeNetworkStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + initializeZoneSettings; + private final PagedCallSettings + listZonesSettings; + private final UnaryCallSettings getZoneSettings; + private final PagedCallSettings< + ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> + listNetworksSettings; + private final UnaryCallSettings getNetworkSettings; + private final UnaryCallSettings + diagnoseNetworkSettings; + private final UnaryCallSettings createNetworkSettings; + private final OperationCallSettings + createNetworkOperationSettings; + private final UnaryCallSettings deleteNetworkSettings; + private final OperationCallSettings + deleteNetworkOperationSettings; + private final PagedCallSettings + listSubnetsSettings; + private final UnaryCallSettings getSubnetSettings; + private final UnaryCallSettings createSubnetSettings; + private final OperationCallSettings + createSubnetOperationSettings; + private final UnaryCallSettings updateSubnetSettings; + private final OperationCallSettings + updateSubnetOperationSettings; + private final UnaryCallSettings deleteSubnetSettings; + private final OperationCallSettings + deleteSubnetOperationSettings; + private final PagedCallSettings< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + listInterconnectsSettings; + private final UnaryCallSettings getInterconnectSettings; + private final UnaryCallSettings + diagnoseInterconnectSettings; + private final PagedCallSettings< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsSettings; + private final UnaryCallSettings + getInterconnectAttachmentSettings; + private final UnaryCallSettings + createInterconnectAttachmentSettings; + private final OperationCallSettings< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationSettings; + private final UnaryCallSettings + deleteInterconnectAttachmentSettings; + private final OperationCallSettings + deleteInterconnectAttachmentOperationSettings; + private final PagedCallSettings + listRoutersSettings; + private final UnaryCallSettings getRouterSettings; + private final UnaryCallSettings + diagnoseRouterSettings; + private final UnaryCallSettings createRouterSettings; + private final OperationCallSettings + createRouterOperationSettings; + private final UnaryCallSettings updateRouterSettings; + private final OperationCallSettings + updateRouterOperationSettings; + private final UnaryCallSettings deleteRouterSettings; + private final OperationCallSettings + deleteRouterOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_ZONES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListZonesRequest injectToken(ListZonesRequest payload, String token) { + return ListZonesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListZonesRequest injectPageSize(ListZonesRequest payload, int pageSize) { + return ListZonesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListZonesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListZonesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListZonesResponse payload) { + return payload.getZonesList() == null + ? ImmutableList.of() + : payload.getZonesList(); + } + }; + + private static final PagedListDescriptor + LIST_NETWORKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNetworksRequest injectToken(ListNetworksRequest payload, String token) { + return ListNetworksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNetworksRequest injectPageSize(ListNetworksRequest payload, int pageSize) { + return ListNetworksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNetworksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNetworksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNetworksResponse payload) { + return payload.getNetworksList() == null + ? ImmutableList.of() + : payload.getNetworksList(); + } + }; + + private static final PagedListDescriptor + LIST_SUBNETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSubnetsRequest injectToken(ListSubnetsRequest payload, String token) { + return ListSubnetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSubnetsRequest injectPageSize(ListSubnetsRequest payload, int pageSize) { + return ListSubnetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSubnetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSubnetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSubnetsResponse payload) { + return payload.getSubnetsList() == null + ? ImmutableList.of() + : payload.getSubnetsList(); + } + }; + + private static final PagedListDescriptor< + ListInterconnectsRequest, ListInterconnectsResponse, Interconnect> + LIST_INTERCONNECTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListInterconnectsRequest, ListInterconnectsResponse, Interconnect>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInterconnectsRequest injectToken( + ListInterconnectsRequest payload, String token) { + return ListInterconnectsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInterconnectsRequest injectPageSize( + ListInterconnectsRequest payload, int pageSize) { + return ListInterconnectsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInterconnectsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInterconnectsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInterconnectsResponse payload) { + return payload.getInterconnectsList() == null + ? ImmutableList.of() + : payload.getInterconnectsList(); + } + }; + + private static final PagedListDescriptor< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment> + LIST_INTERCONNECT_ATTACHMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInterconnectAttachmentsRequest injectToken( + ListInterconnectAttachmentsRequest payload, String token) { + return ListInterconnectAttachmentsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListInterconnectAttachmentsRequest injectPageSize( + ListInterconnectAttachmentsRequest payload, int pageSize) { + return ListInterconnectAttachmentsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListInterconnectAttachmentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInterconnectAttachmentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListInterconnectAttachmentsResponse payload) { + return payload.getInterconnectAttachmentsList() == null + ? ImmutableList.of() + : payload.getInterconnectAttachmentsList(); + } + }; + + private static final PagedListDescriptor + LIST_ROUTERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRoutersRequest injectToken(ListRoutersRequest payload, String token) { + return ListRoutersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRoutersRequest injectPageSize(ListRoutersRequest payload, int pageSize) { + return ListRoutersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRoutersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRoutersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRoutersResponse payload) { + return payload.getRoutersList() == null + ? ImmutableList.of() + : payload.getRoutersList(); + } + }; + + 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< + ListZonesRequest, ListZonesResponse, ListZonesPagedResponse> + LIST_ZONES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListZonesRequest, ListZonesResponse, ListZonesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListZonesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ZONES_PAGE_STR_DESC, request, context); + return ListZonesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> + LIST_NETWORKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNetworksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NETWORKS_PAGE_STR_DESC, request, context); + return ListNetworksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSubnetsRequest, ListSubnetsResponse, ListSubnetsPagedResponse> + LIST_SUBNETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSubnetsRequest, ListSubnetsResponse, ListSubnetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSubnetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SUBNETS_PAGE_STR_DESC, request, context); + return ListSubnetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + LIST_INTERCONNECTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInterconnectsRequest, + ListInterconnectsResponse, + ListInterconnectsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInterconnectsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_INTERCONNECTS_PAGE_STR_DESC, request, context); + return ListInterconnectsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + LIST_INTERCONNECT_ATTACHMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + callable, + ListInterconnectAttachmentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + InterconnectAttachment> + pageContext = + PageContext.create( + callable, LIST_INTERCONNECT_ATTACHMENTS_PAGE_STR_DESC, request, context); + return ListInterconnectAttachmentsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRoutersRequest, ListRoutersResponse, ListRoutersPagedResponse> + LIST_ROUTERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRoutersRequest, ListRoutersResponse, ListRoutersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRoutersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ROUTERS_PAGE_STR_DESC, request, context); + return ListRoutersPagedResponse.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 initializeZone. */ + public UnaryCallSettings initializeZoneSettings() { + return initializeZoneSettings; + } + + /** Returns the object with the settings used for calls to listZones. */ + public PagedCallSettings + listZonesSettings() { + return listZonesSettings; + } + + /** Returns the object with the settings used for calls to getZone. */ + public UnaryCallSettings getZoneSettings() { + return getZoneSettings; + } + + /** Returns the object with the settings used for calls to listNetworks. */ + public PagedCallSettings + listNetworksSettings() { + return listNetworksSettings; + } + + /** Returns the object with the settings used for calls to getNetwork. */ + public UnaryCallSettings getNetworkSettings() { + return getNetworkSettings; + } + + /** Returns the object with the settings used for calls to diagnoseNetwork. */ + public UnaryCallSettings + diagnoseNetworkSettings() { + return diagnoseNetworkSettings; + } + + /** Returns the object with the settings used for calls to createNetwork. */ + public UnaryCallSettings createNetworkSettings() { + return createNetworkSettings; + } + + /** Returns the object with the settings used for calls to createNetwork. */ + public OperationCallSettings + createNetworkOperationSettings() { + return createNetworkOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteNetwork. */ + public UnaryCallSettings deleteNetworkSettings() { + return deleteNetworkSettings; + } + + /** Returns the object with the settings used for calls to deleteNetwork. */ + public OperationCallSettings + deleteNetworkOperationSettings() { + return deleteNetworkOperationSettings; + } + + /** Returns the object with the settings used for calls to listSubnets. */ + public PagedCallSettings + listSubnetsSettings() { + return listSubnetsSettings; + } + + /** Returns the object with the settings used for calls to getSubnet. */ + public UnaryCallSettings getSubnetSettings() { + return getSubnetSettings; + } + + /** Returns the object with the settings used for calls to createSubnet. */ + public UnaryCallSettings createSubnetSettings() { + return createSubnetSettings; + } + + /** Returns the object with the settings used for calls to createSubnet. */ + public OperationCallSettings + createSubnetOperationSettings() { + return createSubnetOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSubnet. */ + public UnaryCallSettings updateSubnetSettings() { + return updateSubnetSettings; + } + + /** Returns the object with the settings used for calls to updateSubnet. */ + public OperationCallSettings + updateSubnetOperationSettings() { + return updateSubnetOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteSubnet. */ + public UnaryCallSettings deleteSubnetSettings() { + return deleteSubnetSettings; + } + + /** Returns the object with the settings used for calls to deleteSubnet. */ + public OperationCallSettings + deleteSubnetOperationSettings() { + return deleteSubnetOperationSettings; + } + + /** Returns the object with the settings used for calls to listInterconnects. */ + public PagedCallSettings< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + listInterconnectsSettings() { + return listInterconnectsSettings; + } + + /** Returns the object with the settings used for calls to getInterconnect. */ + public UnaryCallSettings getInterconnectSettings() { + return getInterconnectSettings; + } + + /** Returns the object with the settings used for calls to diagnoseInterconnect. */ + public UnaryCallSettings + diagnoseInterconnectSettings() { + return diagnoseInterconnectSettings; + } + + /** Returns the object with the settings used for calls to listInterconnectAttachments. */ + public PagedCallSettings< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsSettings() { + return listInterconnectAttachmentsSettings; + } + + /** Returns the object with the settings used for calls to getInterconnectAttachment. */ + public UnaryCallSettings + getInterconnectAttachmentSettings() { + return getInterconnectAttachmentSettings; + } + + /** Returns the object with the settings used for calls to createInterconnectAttachment. */ + public UnaryCallSettings + createInterconnectAttachmentSettings() { + return createInterconnectAttachmentSettings; + } + + /** Returns the object with the settings used for calls to createInterconnectAttachment. */ + public OperationCallSettings< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationSettings() { + return createInterconnectAttachmentOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInterconnectAttachment. */ + public UnaryCallSettings + deleteInterconnectAttachmentSettings() { + return deleteInterconnectAttachmentSettings; + } + + /** Returns the object with the settings used for calls to deleteInterconnectAttachment. */ + public OperationCallSettings + deleteInterconnectAttachmentOperationSettings() { + return deleteInterconnectAttachmentOperationSettings; + } + + /** Returns the object with the settings used for calls to listRouters. */ + public PagedCallSettings + listRoutersSettings() { + return listRoutersSettings; + } + + /** Returns the object with the settings used for calls to getRouter. */ + public UnaryCallSettings getRouterSettings() { + return getRouterSettings; + } + + /** Returns the object with the settings used for calls to diagnoseRouter. */ + public UnaryCallSettings diagnoseRouterSettings() { + return diagnoseRouterSettings; + } + + /** Returns the object with the settings used for calls to createRouter. */ + public UnaryCallSettings createRouterSettings() { + return createRouterSettings; + } + + /** Returns the object with the settings used for calls to createRouter. */ + public OperationCallSettings + createRouterOperationSettings() { + return createRouterOperationSettings; + } + + /** Returns the object with the settings used for calls to updateRouter. */ + public UnaryCallSettings updateRouterSettings() { + return updateRouterSettings; + } + + /** Returns the object with the settings used for calls to updateRouter. */ + public OperationCallSettings + updateRouterOperationSettings() { + return updateRouterOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteRouter. */ + public UnaryCallSettings deleteRouterSettings() { + return deleteRouterSettings; + } + + /** Returns the object with the settings used for calls to deleteRouter. */ + public OperationCallSettings + deleteRouterOperationSettings() { + return deleteRouterOperationSettings; + } + + /** 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; + } + + public EdgeNetworkStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEdgeNetworkStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonEdgeNetworkStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "edgenetwork.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "edgenetwork.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EdgeNetworkStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EdgeNetworkStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EdgeNetworkStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected EdgeNetworkStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + initializeZoneSettings = settingsBuilder.initializeZoneSettings().build(); + listZonesSettings = settingsBuilder.listZonesSettings().build(); + getZoneSettings = settingsBuilder.getZoneSettings().build(); + listNetworksSettings = settingsBuilder.listNetworksSettings().build(); + getNetworkSettings = settingsBuilder.getNetworkSettings().build(); + diagnoseNetworkSettings = settingsBuilder.diagnoseNetworkSettings().build(); + createNetworkSettings = settingsBuilder.createNetworkSettings().build(); + createNetworkOperationSettings = settingsBuilder.createNetworkOperationSettings().build(); + deleteNetworkSettings = settingsBuilder.deleteNetworkSettings().build(); + deleteNetworkOperationSettings = settingsBuilder.deleteNetworkOperationSettings().build(); + listSubnetsSettings = settingsBuilder.listSubnetsSettings().build(); + getSubnetSettings = settingsBuilder.getSubnetSettings().build(); + createSubnetSettings = settingsBuilder.createSubnetSettings().build(); + createSubnetOperationSettings = settingsBuilder.createSubnetOperationSettings().build(); + updateSubnetSettings = settingsBuilder.updateSubnetSettings().build(); + updateSubnetOperationSettings = settingsBuilder.updateSubnetOperationSettings().build(); + deleteSubnetSettings = settingsBuilder.deleteSubnetSettings().build(); + deleteSubnetOperationSettings = settingsBuilder.deleteSubnetOperationSettings().build(); + listInterconnectsSettings = settingsBuilder.listInterconnectsSettings().build(); + getInterconnectSettings = settingsBuilder.getInterconnectSettings().build(); + diagnoseInterconnectSettings = settingsBuilder.diagnoseInterconnectSettings().build(); + listInterconnectAttachmentsSettings = + settingsBuilder.listInterconnectAttachmentsSettings().build(); + getInterconnectAttachmentSettings = settingsBuilder.getInterconnectAttachmentSettings().build(); + createInterconnectAttachmentSettings = + settingsBuilder.createInterconnectAttachmentSettings().build(); + createInterconnectAttachmentOperationSettings = + settingsBuilder.createInterconnectAttachmentOperationSettings().build(); + deleteInterconnectAttachmentSettings = + settingsBuilder.deleteInterconnectAttachmentSettings().build(); + deleteInterconnectAttachmentOperationSettings = + settingsBuilder.deleteInterconnectAttachmentOperationSettings().build(); + listRoutersSettings = settingsBuilder.listRoutersSettings().build(); + getRouterSettings = settingsBuilder.getRouterSettings().build(); + diagnoseRouterSettings = settingsBuilder.diagnoseRouterSettings().build(); + createRouterSettings = settingsBuilder.createRouterSettings().build(); + createRouterOperationSettings = settingsBuilder.createRouterOperationSettings().build(); + updateRouterSettings = settingsBuilder.updateRouterSettings().build(); + updateRouterOperationSettings = settingsBuilder.updateRouterOperationSettings().build(); + deleteRouterSettings = settingsBuilder.deleteRouterSettings().build(); + deleteRouterOperationSettings = settingsBuilder.deleteRouterOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for EdgeNetworkStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + initializeZoneSettings; + private final PagedCallSettings.Builder< + ListZonesRequest, ListZonesResponse, ListZonesPagedResponse> + listZonesSettings; + private final UnaryCallSettings.Builder getZoneSettings; + private final PagedCallSettings.Builder< + ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> + listNetworksSettings; + private final UnaryCallSettings.Builder getNetworkSettings; + private final UnaryCallSettings.Builder + diagnoseNetworkSettings; + private final UnaryCallSettings.Builder createNetworkSettings; + private final OperationCallSettings.Builder + createNetworkOperationSettings; + private final UnaryCallSettings.Builder deleteNetworkSettings; + private final OperationCallSettings.Builder + deleteNetworkOperationSettings; + private final PagedCallSettings.Builder< + ListSubnetsRequest, ListSubnetsResponse, ListSubnetsPagedResponse> + listSubnetsSettings; + private final UnaryCallSettings.Builder getSubnetSettings; + private final UnaryCallSettings.Builder createSubnetSettings; + private final OperationCallSettings.Builder + createSubnetOperationSettings; + private final UnaryCallSettings.Builder updateSubnetSettings; + private final OperationCallSettings.Builder + updateSubnetOperationSettings; + private final UnaryCallSettings.Builder deleteSubnetSettings; + private final OperationCallSettings.Builder + deleteSubnetOperationSettings; + private final PagedCallSettings.Builder< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + listInterconnectsSettings; + private final UnaryCallSettings.Builder + getInterconnectSettings; + private final UnaryCallSettings.Builder< + DiagnoseInterconnectRequest, DiagnoseInterconnectResponse> + diagnoseInterconnectSettings; + private final PagedCallSettings.Builder< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsSettings; + private final UnaryCallSettings.Builder< + GetInterconnectAttachmentRequest, InterconnectAttachment> + getInterconnectAttachmentSettings; + private final UnaryCallSettings.Builder + createInterconnectAttachmentSettings; + private final OperationCallSettings.Builder< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationSettings; + private final UnaryCallSettings.Builder + deleteInterconnectAttachmentSettings; + private final OperationCallSettings.Builder< + DeleteInterconnectAttachmentRequest, Empty, OperationMetadata> + deleteInterconnectAttachmentOperationSettings; + private final PagedCallSettings.Builder< + ListRoutersRequest, ListRoutersResponse, ListRoutersPagedResponse> + listRoutersSettings; + private final UnaryCallSettings.Builder getRouterSettings; + private final UnaryCallSettings.Builder + diagnoseRouterSettings; + private final UnaryCallSettings.Builder createRouterSettings; + private final OperationCallSettings.Builder + createRouterOperationSettings; + private final UnaryCallSettings.Builder updateRouterSettings; + private final OperationCallSettings.Builder + updateRouterOperationSettings; + private final UnaryCallSettings.Builder deleteRouterSettings; + private final OperationCallSettings.Builder + deleteRouterOperationSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + initializeZoneSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listZonesSettings = PagedCallSettings.newBuilder(LIST_ZONES_PAGE_STR_FACT); + getZoneSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNetworksSettings = PagedCallSettings.newBuilder(LIST_NETWORKS_PAGE_STR_FACT); + getNetworkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + diagnoseNetworkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNetworkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNetworkOperationSettings = OperationCallSettings.newBuilder(); + deleteNetworkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNetworkOperationSettings = OperationCallSettings.newBuilder(); + listSubnetsSettings = PagedCallSettings.newBuilder(LIST_SUBNETS_PAGE_STR_FACT); + getSubnetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSubnetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSubnetOperationSettings = OperationCallSettings.newBuilder(); + updateSubnetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSubnetOperationSettings = OperationCallSettings.newBuilder(); + deleteSubnetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSubnetOperationSettings = OperationCallSettings.newBuilder(); + listInterconnectsSettings = PagedCallSettings.newBuilder(LIST_INTERCONNECTS_PAGE_STR_FACT); + getInterconnectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + diagnoseInterconnectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listInterconnectAttachmentsSettings = + PagedCallSettings.newBuilder(LIST_INTERCONNECT_ATTACHMENTS_PAGE_STR_FACT); + getInterconnectAttachmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInterconnectAttachmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInterconnectAttachmentOperationSettings = OperationCallSettings.newBuilder(); + deleteInterconnectAttachmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInterconnectAttachmentOperationSettings = OperationCallSettings.newBuilder(); + listRoutersSettings = PagedCallSettings.newBuilder(LIST_ROUTERS_PAGE_STR_FACT); + getRouterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + diagnoseRouterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRouterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRouterOperationSettings = OperationCallSettings.newBuilder(); + updateRouterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateRouterOperationSettings = OperationCallSettings.newBuilder(); + deleteRouterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRouterOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + initializeZoneSettings, + listZonesSettings, + getZoneSettings, + listNetworksSettings, + getNetworkSettings, + diagnoseNetworkSettings, + createNetworkSettings, + deleteNetworkSettings, + listSubnetsSettings, + getSubnetSettings, + createSubnetSettings, + updateSubnetSettings, + deleteSubnetSettings, + listInterconnectsSettings, + getInterconnectSettings, + diagnoseInterconnectSettings, + listInterconnectAttachmentsSettings, + getInterconnectAttachmentSettings, + createInterconnectAttachmentSettings, + deleteInterconnectAttachmentSettings, + listRoutersSettings, + getRouterSettings, + diagnoseRouterSettings, + createRouterSettings, + updateRouterSettings, + deleteRouterSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(EdgeNetworkStubSettings settings) { + super(settings); + + initializeZoneSettings = settings.initializeZoneSettings.toBuilder(); + listZonesSettings = settings.listZonesSettings.toBuilder(); + getZoneSettings = settings.getZoneSettings.toBuilder(); + listNetworksSettings = settings.listNetworksSettings.toBuilder(); + getNetworkSettings = settings.getNetworkSettings.toBuilder(); + diagnoseNetworkSettings = settings.diagnoseNetworkSettings.toBuilder(); + createNetworkSettings = settings.createNetworkSettings.toBuilder(); + createNetworkOperationSettings = settings.createNetworkOperationSettings.toBuilder(); + deleteNetworkSettings = settings.deleteNetworkSettings.toBuilder(); + deleteNetworkOperationSettings = settings.deleteNetworkOperationSettings.toBuilder(); + listSubnetsSettings = settings.listSubnetsSettings.toBuilder(); + getSubnetSettings = settings.getSubnetSettings.toBuilder(); + createSubnetSettings = settings.createSubnetSettings.toBuilder(); + createSubnetOperationSettings = settings.createSubnetOperationSettings.toBuilder(); + updateSubnetSettings = settings.updateSubnetSettings.toBuilder(); + updateSubnetOperationSettings = settings.updateSubnetOperationSettings.toBuilder(); + deleteSubnetSettings = settings.deleteSubnetSettings.toBuilder(); + deleteSubnetOperationSettings = settings.deleteSubnetOperationSettings.toBuilder(); + listInterconnectsSettings = settings.listInterconnectsSettings.toBuilder(); + getInterconnectSettings = settings.getInterconnectSettings.toBuilder(); + diagnoseInterconnectSettings = settings.diagnoseInterconnectSettings.toBuilder(); + listInterconnectAttachmentsSettings = + settings.listInterconnectAttachmentsSettings.toBuilder(); + getInterconnectAttachmentSettings = settings.getInterconnectAttachmentSettings.toBuilder(); + createInterconnectAttachmentSettings = + settings.createInterconnectAttachmentSettings.toBuilder(); + createInterconnectAttachmentOperationSettings = + settings.createInterconnectAttachmentOperationSettings.toBuilder(); + deleteInterconnectAttachmentSettings = + settings.deleteInterconnectAttachmentSettings.toBuilder(); + deleteInterconnectAttachmentOperationSettings = + settings.deleteInterconnectAttachmentOperationSettings.toBuilder(); + listRoutersSettings = settings.listRoutersSettings.toBuilder(); + getRouterSettings = settings.getRouterSettings.toBuilder(); + diagnoseRouterSettings = settings.diagnoseRouterSettings.toBuilder(); + createRouterSettings = settings.createRouterSettings.toBuilder(); + createRouterOperationSettings = settings.createRouterOperationSettings.toBuilder(); + updateRouterSettings = settings.updateRouterSettings.toBuilder(); + updateRouterOperationSettings = settings.updateRouterOperationSettings.toBuilder(); + deleteRouterSettings = settings.deleteRouterSettings.toBuilder(); + deleteRouterOperationSettings = settings.deleteRouterOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + initializeZoneSettings, + listZonesSettings, + getZoneSettings, + listNetworksSettings, + getNetworkSettings, + diagnoseNetworkSettings, + createNetworkSettings, + deleteNetworkSettings, + listSubnetsSettings, + getSubnetSettings, + createSubnetSettings, + updateSubnetSettings, + deleteSubnetSettings, + listInterconnectsSettings, + getInterconnectSettings, + diagnoseInterconnectSettings, + listInterconnectAttachmentsSettings, + getInterconnectAttachmentSettings, + createInterconnectAttachmentSettings, + deleteInterconnectAttachmentSettings, + listRoutersSettings, + getRouterSettings, + diagnoseRouterSettings, + createRouterSettings, + updateRouterSettings, + deleteRouterSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .initializeZoneSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listZonesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getZoneSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNetworksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getNetworkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .diagnoseNetworkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createNetworkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteNetworkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listSubnetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getSubnetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSubnetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateSubnetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteSubnetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listInterconnectsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getInterconnectSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .diagnoseInterconnectSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listInterconnectAttachmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getInterconnectAttachmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createInterconnectAttachmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteInterconnectAttachmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listRoutersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRouterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .diagnoseRouterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRouterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateRouterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteRouterSettings() + .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("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createNetworkOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Network.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 + .deleteNetworkOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.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 + .createSubnetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Subnet.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 + .updateSubnetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Subnet.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 + .deleteSubnetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.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 + .createInterconnectAttachmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(InterconnectAttachment.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 + .deleteInterconnectAttachmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.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 + .createRouterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Router.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 + .updateRouterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Router.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 + .deleteRouterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.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())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to initializeZone. */ + public UnaryCallSettings.Builder + initializeZoneSettings() { + return initializeZoneSettings; + } + + /** Returns the builder for the settings used for calls to listZones. */ + public PagedCallSettings.Builder + listZonesSettings() { + return listZonesSettings; + } + + /** Returns the builder for the settings used for calls to getZone. */ + public UnaryCallSettings.Builder getZoneSettings() { + return getZoneSettings; + } + + /** Returns the builder for the settings used for calls to listNetworks. */ + public PagedCallSettings.Builder< + ListNetworksRequest, ListNetworksResponse, ListNetworksPagedResponse> + listNetworksSettings() { + return listNetworksSettings; + } + + /** Returns the builder for the settings used for calls to getNetwork. */ + public UnaryCallSettings.Builder getNetworkSettings() { + return getNetworkSettings; + } + + /** Returns the builder for the settings used for calls to diagnoseNetwork. */ + public UnaryCallSettings.Builder + diagnoseNetworkSettings() { + return diagnoseNetworkSettings; + } + + /** Returns the builder for the settings used for calls to createNetwork. */ + public UnaryCallSettings.Builder createNetworkSettings() { + return createNetworkSettings; + } + + /** Returns the builder for the settings used for calls to createNetwork. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createNetworkOperationSettings() { + return createNetworkOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteNetwork. */ + public UnaryCallSettings.Builder deleteNetworkSettings() { + return deleteNetworkSettings; + } + + /** Returns the builder for the settings used for calls to deleteNetwork. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteNetworkOperationSettings() { + return deleteNetworkOperationSettings; + } + + /** Returns the builder for the settings used for calls to listSubnets. */ + public PagedCallSettings.Builder< + ListSubnetsRequest, ListSubnetsResponse, ListSubnetsPagedResponse> + listSubnetsSettings() { + return listSubnetsSettings; + } + + /** Returns the builder for the settings used for calls to getSubnet. */ + public UnaryCallSettings.Builder getSubnetSettings() { + return getSubnetSettings; + } + + /** Returns the builder for the settings used for calls to createSubnet. */ + public UnaryCallSettings.Builder createSubnetSettings() { + return createSubnetSettings; + } + + /** Returns the builder for the settings used for calls to createSubnet. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createSubnetOperationSettings() { + return createSubnetOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSubnet. */ + public UnaryCallSettings.Builder updateSubnetSettings() { + return updateSubnetSettings; + } + + /** Returns the builder for the settings used for calls to updateSubnet. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateSubnetOperationSettings() { + return updateSubnetOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteSubnet. */ + public UnaryCallSettings.Builder deleteSubnetSettings() { + return deleteSubnetSettings; + } + + /** Returns the builder for the settings used for calls to deleteSubnet. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteSubnetOperationSettings() { + return deleteSubnetOperationSettings; + } + + /** Returns the builder for the settings used for calls to listInterconnects. */ + public PagedCallSettings.Builder< + ListInterconnectsRequest, ListInterconnectsResponse, ListInterconnectsPagedResponse> + listInterconnectsSettings() { + return listInterconnectsSettings; + } + + /** Returns the builder for the settings used for calls to getInterconnect. */ + public UnaryCallSettings.Builder + getInterconnectSettings() { + return getInterconnectSettings; + } + + /** Returns the builder for the settings used for calls to diagnoseInterconnect. */ + public UnaryCallSettings.Builder + diagnoseInterconnectSettings() { + return diagnoseInterconnectSettings; + } + + /** Returns the builder for the settings used for calls to listInterconnectAttachments. */ + public PagedCallSettings.Builder< + ListInterconnectAttachmentsRequest, + ListInterconnectAttachmentsResponse, + ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsSettings() { + return listInterconnectAttachmentsSettings; + } + + /** Returns the builder for the settings used for calls to getInterconnectAttachment. */ + public UnaryCallSettings.Builder + getInterconnectAttachmentSettings() { + return getInterconnectAttachmentSettings; + } + + /** Returns the builder for the settings used for calls to createInterconnectAttachment. */ + public UnaryCallSettings.Builder + createInterconnectAttachmentSettings() { + return createInterconnectAttachmentSettings; + } + + /** Returns the builder for the settings used for calls to createInterconnectAttachment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationSettings() { + return createInterconnectAttachmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInterconnectAttachment. */ + public UnaryCallSettings.Builder + deleteInterconnectAttachmentSettings() { + return deleteInterconnectAttachmentSettings; + } + + /** Returns the builder for the settings used for calls to deleteInterconnectAttachment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteInterconnectAttachmentRequest, Empty, OperationMetadata> + deleteInterconnectAttachmentOperationSettings() { + return deleteInterconnectAttachmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to listRouters. */ + public PagedCallSettings.Builder< + ListRoutersRequest, ListRoutersResponse, ListRoutersPagedResponse> + listRoutersSettings() { + return listRoutersSettings; + } + + /** Returns the builder for the settings used for calls to getRouter. */ + public UnaryCallSettings.Builder getRouterSettings() { + return getRouterSettings; + } + + /** Returns the builder for the settings used for calls to diagnoseRouter. */ + public UnaryCallSettings.Builder + diagnoseRouterSettings() { + return diagnoseRouterSettings; + } + + /** Returns the builder for the settings used for calls to createRouter. */ + public UnaryCallSettings.Builder createRouterSettings() { + return createRouterSettings; + } + + /** Returns the builder for the settings used for calls to createRouter. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createRouterOperationSettings() { + return createRouterOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateRouter. */ + public UnaryCallSettings.Builder updateRouterSettings() { + return updateRouterSettings; + } + + /** Returns the builder for the settings used for calls to updateRouter. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateRouterOperationSettings() { + return updateRouterOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteRouter. */ + public UnaryCallSettings.Builder deleteRouterSettings() { + return deleteRouterSettings; + } + + /** Returns the builder for the settings used for calls to deleteRouter. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteRouterOperationSettings() { + return deleteRouterOperationSettings; + } + + /** 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; + } + + @Override + public EdgeNetworkStubSettings build() throws IOException { + return new EdgeNetworkStubSettings(this); + } + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkCallableFactory.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkCallableFactory.java new file mode 100644 index 000000000000..32860747ac58 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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.edgenetwork.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the EdgeNetwork service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcEdgeNetworkCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkStub.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkStub.java new file mode 100644 index 000000000000..6a72fc3c7849 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/GrpcEdgeNetworkStub.java @@ -0,0 +1,1252 @@ +/* + * 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.edgenetwork.v1.stub; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +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.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.GetInterconnectRequest; +import com.google.cloud.edgenetwork.v1.GetNetworkRequest; +import com.google.cloud.edgenetwork.v1.GetRouterRequest; +import com.google.cloud.edgenetwork.v1.GetSubnetRequest; +import com.google.cloud.edgenetwork.v1.GetZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectsResponse; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.ListNetworksResponse; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.ListRoutersResponse; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.ListSubnetsResponse; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.ListZonesResponse; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.cloud.edgenetwork.v1.Zone; +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.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the EdgeNetwork service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcEdgeNetworkStub extends EdgeNetworkStub { + private static final MethodDescriptor + initializeZoneMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/InitializeZone") + .setRequestMarshaller( + ProtoUtils.marshaller(InitializeZoneRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(InitializeZoneResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listZonesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListZones") + .setRequestMarshaller(ProtoUtils.marshaller(ListZonesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListZonesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getZoneMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetZone") + .setRequestMarshaller(ProtoUtils.marshaller(GetZoneRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Zone.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNetworksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListNetworks") + .setRequestMarshaller(ProtoUtils.marshaller(ListNetworksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNetworksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getNetworkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetNetwork") + .setRequestMarshaller(ProtoUtils.marshaller(GetNetworkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Network.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + diagnoseNetworkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DiagnoseNetwork") + .setRequestMarshaller( + ProtoUtils.marshaller(DiagnoseNetworkRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DiagnoseNetworkResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createNetworkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/CreateNetwork") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateNetworkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNetworkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DeleteNetwork") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteNetworkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSubnetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListSubnets") + .setRequestMarshaller(ProtoUtils.marshaller(ListSubnetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSubnetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSubnetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetSubnet") + .setRequestMarshaller(ProtoUtils.marshaller(GetSubnetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Subnet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSubnetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/CreateSubnet") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSubnetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSubnetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/UpdateSubnet") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSubnetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSubnetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DeleteSubnet") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSubnetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInterconnectsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListInterconnects") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInterconnectsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInterconnectsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getInterconnectMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetInterconnect") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInterconnectRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Interconnect.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + diagnoseInterconnectMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DiagnoseInterconnect") + .setRequestMarshaller( + ProtoUtils.marshaller(DiagnoseInterconnectRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DiagnoseInterconnectResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + listInterconnectAttachmentsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/ListInterconnectAttachments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInterconnectAttachmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInterconnectAttachmentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getInterconnectAttachmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/GetInterconnectAttachment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInterconnectAttachmentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(InterconnectAttachment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInterconnectAttachmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/CreateInterconnectAttachment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInterconnectAttachmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInterconnectAttachmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/DeleteInterconnectAttachment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInterconnectAttachmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRoutersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListRouters") + .setRequestMarshaller(ProtoUtils.marshaller(ListRoutersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRoutersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRouterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetRouter") + .setRequestMarshaller(ProtoUtils.marshaller(GetRouterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Router.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + diagnoseRouterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DiagnoseRouter") + .setRequestMarshaller( + ProtoUtils.marshaller(DiagnoseRouterRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DiagnoseRouterResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createRouterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/CreateRouter") + .setRequestMarshaller(ProtoUtils.marshaller(CreateRouterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateRouterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/UpdateRouter") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateRouterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteRouterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DeleteRouter") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteRouterRequest.getDefaultInstance())) + .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 final UnaryCallable initializeZoneCallable; + private final UnaryCallable listZonesCallable; + private final UnaryCallable listZonesPagedCallable; + private final UnaryCallable getZoneCallable; + private final UnaryCallable listNetworksCallable; + private final UnaryCallable + listNetworksPagedCallable; + private final UnaryCallable getNetworkCallable; + private final UnaryCallable + diagnoseNetworkCallable; + private final UnaryCallable createNetworkCallable; + private final OperationCallable + createNetworkOperationCallable; + private final UnaryCallable deleteNetworkCallable; + private final OperationCallable + deleteNetworkOperationCallable; + private final UnaryCallable listSubnetsCallable; + private final UnaryCallable + listSubnetsPagedCallable; + private final UnaryCallable getSubnetCallable; + private final UnaryCallable createSubnetCallable; + private final OperationCallable + createSubnetOperationCallable; + private final UnaryCallable updateSubnetCallable; + private final OperationCallable + updateSubnetOperationCallable; + private final UnaryCallable deleteSubnetCallable; + private final OperationCallable + deleteSubnetOperationCallable; + private final UnaryCallable + listInterconnectsCallable; + private final UnaryCallable + listInterconnectsPagedCallable; + private final UnaryCallable getInterconnectCallable; + private final UnaryCallable + diagnoseInterconnectCallable; + private final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + listInterconnectAttachmentsCallable; + private final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsPagedCallable; + private final UnaryCallable + getInterconnectAttachmentCallable; + private final UnaryCallable + createInterconnectAttachmentCallable; + private final OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable; + private final UnaryCallable + deleteInterconnectAttachmentCallable; + private final OperationCallable + deleteInterconnectAttachmentOperationCallable; + private final UnaryCallable listRoutersCallable; + private final UnaryCallable + listRoutersPagedCallable; + private final UnaryCallable getRouterCallable; + private final UnaryCallable diagnoseRouterCallable; + private final UnaryCallable createRouterCallable; + private final OperationCallable + createRouterOperationCallable; + private final UnaryCallable updateRouterCallable; + private final OperationCallable + updateRouterOperationCallable; + private final UnaryCallable deleteRouterCallable; + private final OperationCallable + deleteRouterOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEdgeNetworkStub create(EdgeNetworkStubSettings settings) + throws IOException { + return new GrpcEdgeNetworkStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEdgeNetworkStub create(ClientContext clientContext) throws IOException { + return new GrpcEdgeNetworkStub(EdgeNetworkStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEdgeNetworkStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEdgeNetworkStub( + EdgeNetworkStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEdgeNetworkStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcEdgeNetworkStub(EdgeNetworkStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEdgeNetworkCallableFactory()); + } + + /** + * Constructs an instance of GrpcEdgeNetworkStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcEdgeNetworkStub( + EdgeNetworkStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + initializeZoneTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(initializeZoneMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listZonesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listZonesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getZoneTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getZoneMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listNetworksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNetworksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getNetworkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNetworkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + diagnoseNetworkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(diagnoseNetworkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createNetworkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNetworkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteNetworkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNetworkMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSubnetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSubnetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSubnetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSubnetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSubnetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSubnetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSubnetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSubnetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("subnet.name", String.valueOf(request.getSubnet().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSubnetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSubnetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listInterconnectsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInterconnectsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getInterconnectTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInterconnectMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + diagnoseInterconnectTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(diagnoseInterconnectMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listInterconnectAttachmentsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listInterconnectAttachmentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getInterconnectAttachmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInterconnectAttachmentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createInterconnectAttachmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInterconnectAttachmentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteInterconnectAttachmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInterconnectAttachmentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listRoutersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRoutersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRouterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRouterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + diagnoseRouterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(diagnoseRouterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createRouterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRouterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateRouterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateRouterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("router.name", String.valueOf(request.getRouter().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteRouterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRouterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + 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(); + + this.initializeZoneCallable = + callableFactory.createUnaryCallable( + initializeZoneTransportSettings, settings.initializeZoneSettings(), clientContext); + this.listZonesCallable = + callableFactory.createUnaryCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.listZonesPagedCallable = + callableFactory.createPagedCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.getZoneCallable = + callableFactory.createUnaryCallable( + getZoneTransportSettings, settings.getZoneSettings(), clientContext); + this.listNetworksCallable = + callableFactory.createUnaryCallable( + listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.listNetworksPagedCallable = + callableFactory.createPagedCallable( + listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.getNetworkCallable = + callableFactory.createUnaryCallable( + getNetworkTransportSettings, settings.getNetworkSettings(), clientContext); + this.diagnoseNetworkCallable = + callableFactory.createUnaryCallable( + diagnoseNetworkTransportSettings, settings.diagnoseNetworkSettings(), clientContext); + this.createNetworkCallable = + callableFactory.createUnaryCallable( + createNetworkTransportSettings, settings.createNetworkSettings(), clientContext); + this.createNetworkOperationCallable = + callableFactory.createOperationCallable( + createNetworkTransportSettings, + settings.createNetworkOperationSettings(), + clientContext, + operationsStub); + this.deleteNetworkCallable = + callableFactory.createUnaryCallable( + deleteNetworkTransportSettings, settings.deleteNetworkSettings(), clientContext); + this.deleteNetworkOperationCallable = + callableFactory.createOperationCallable( + deleteNetworkTransportSettings, + settings.deleteNetworkOperationSettings(), + clientContext, + operationsStub); + this.listSubnetsCallable = + callableFactory.createUnaryCallable( + listSubnetsTransportSettings, settings.listSubnetsSettings(), clientContext); + this.listSubnetsPagedCallable = + callableFactory.createPagedCallable( + listSubnetsTransportSettings, settings.listSubnetsSettings(), clientContext); + this.getSubnetCallable = + callableFactory.createUnaryCallable( + getSubnetTransportSettings, settings.getSubnetSettings(), clientContext); + this.createSubnetCallable = + callableFactory.createUnaryCallable( + createSubnetTransportSettings, settings.createSubnetSettings(), clientContext); + this.createSubnetOperationCallable = + callableFactory.createOperationCallable( + createSubnetTransportSettings, + settings.createSubnetOperationSettings(), + clientContext, + operationsStub); + this.updateSubnetCallable = + callableFactory.createUnaryCallable( + updateSubnetTransportSettings, settings.updateSubnetSettings(), clientContext); + this.updateSubnetOperationCallable = + callableFactory.createOperationCallable( + updateSubnetTransportSettings, + settings.updateSubnetOperationSettings(), + clientContext, + operationsStub); + this.deleteSubnetCallable = + callableFactory.createUnaryCallable( + deleteSubnetTransportSettings, settings.deleteSubnetSettings(), clientContext); + this.deleteSubnetOperationCallable = + callableFactory.createOperationCallable( + deleteSubnetTransportSettings, + settings.deleteSubnetOperationSettings(), + clientContext, + operationsStub); + this.listInterconnectsCallable = + callableFactory.createUnaryCallable( + listInterconnectsTransportSettings, + settings.listInterconnectsSettings(), + clientContext); + this.listInterconnectsPagedCallable = + callableFactory.createPagedCallable( + listInterconnectsTransportSettings, + settings.listInterconnectsSettings(), + clientContext); + this.getInterconnectCallable = + callableFactory.createUnaryCallable( + getInterconnectTransportSettings, settings.getInterconnectSettings(), clientContext); + this.diagnoseInterconnectCallable = + callableFactory.createUnaryCallable( + diagnoseInterconnectTransportSettings, + settings.diagnoseInterconnectSettings(), + clientContext); + this.listInterconnectAttachmentsCallable = + callableFactory.createUnaryCallable( + listInterconnectAttachmentsTransportSettings, + settings.listInterconnectAttachmentsSettings(), + clientContext); + this.listInterconnectAttachmentsPagedCallable = + callableFactory.createPagedCallable( + listInterconnectAttachmentsTransportSettings, + settings.listInterconnectAttachmentsSettings(), + clientContext); + this.getInterconnectAttachmentCallable = + callableFactory.createUnaryCallable( + getInterconnectAttachmentTransportSettings, + settings.getInterconnectAttachmentSettings(), + clientContext); + this.createInterconnectAttachmentCallable = + callableFactory.createUnaryCallable( + createInterconnectAttachmentTransportSettings, + settings.createInterconnectAttachmentSettings(), + clientContext); + this.createInterconnectAttachmentOperationCallable = + callableFactory.createOperationCallable( + createInterconnectAttachmentTransportSettings, + settings.createInterconnectAttachmentOperationSettings(), + clientContext, + operationsStub); + this.deleteInterconnectAttachmentCallable = + callableFactory.createUnaryCallable( + deleteInterconnectAttachmentTransportSettings, + settings.deleteInterconnectAttachmentSettings(), + clientContext); + this.deleteInterconnectAttachmentOperationCallable = + callableFactory.createOperationCallable( + deleteInterconnectAttachmentTransportSettings, + settings.deleteInterconnectAttachmentOperationSettings(), + clientContext, + operationsStub); + this.listRoutersCallable = + callableFactory.createUnaryCallable( + listRoutersTransportSettings, settings.listRoutersSettings(), clientContext); + this.listRoutersPagedCallable = + callableFactory.createPagedCallable( + listRoutersTransportSettings, settings.listRoutersSettings(), clientContext); + this.getRouterCallable = + callableFactory.createUnaryCallable( + getRouterTransportSettings, settings.getRouterSettings(), clientContext); + this.diagnoseRouterCallable = + callableFactory.createUnaryCallable( + diagnoseRouterTransportSettings, settings.diagnoseRouterSettings(), clientContext); + this.createRouterCallable = + callableFactory.createUnaryCallable( + createRouterTransportSettings, settings.createRouterSettings(), clientContext); + this.createRouterOperationCallable = + callableFactory.createOperationCallable( + createRouterTransportSettings, + settings.createRouterOperationSettings(), + clientContext, + operationsStub); + this.updateRouterCallable = + callableFactory.createUnaryCallable( + updateRouterTransportSettings, settings.updateRouterSettings(), clientContext); + this.updateRouterOperationCallable = + callableFactory.createOperationCallable( + updateRouterTransportSettings, + settings.updateRouterOperationSettings(), + clientContext, + operationsStub); + this.deleteRouterCallable = + callableFactory.createUnaryCallable( + deleteRouterTransportSettings, settings.deleteRouterSettings(), clientContext); + this.deleteRouterOperationCallable = + callableFactory.createOperationCallable( + deleteRouterTransportSettings, + settings.deleteRouterOperationSettings(), + 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.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable initializeZoneCallable() { + return initializeZoneCallable; + } + + @Override + public UnaryCallable listZonesCallable() { + return listZonesCallable; + } + + @Override + public UnaryCallable listZonesPagedCallable() { + return listZonesPagedCallable; + } + + @Override + public UnaryCallable getZoneCallable() { + return getZoneCallable; + } + + @Override + public UnaryCallable listNetworksCallable() { + return listNetworksCallable; + } + + @Override + public UnaryCallable listNetworksPagedCallable() { + return listNetworksPagedCallable; + } + + @Override + public UnaryCallable getNetworkCallable() { + return getNetworkCallable; + } + + @Override + public UnaryCallable diagnoseNetworkCallable() { + return diagnoseNetworkCallable; + } + + @Override + public UnaryCallable createNetworkCallable() { + return createNetworkCallable; + } + + @Override + public OperationCallable + createNetworkOperationCallable() { + return createNetworkOperationCallable; + } + + @Override + public UnaryCallable deleteNetworkCallable() { + return deleteNetworkCallable; + } + + @Override + public OperationCallable + deleteNetworkOperationCallable() { + return deleteNetworkOperationCallable; + } + + @Override + public UnaryCallable listSubnetsCallable() { + return listSubnetsCallable; + } + + @Override + public UnaryCallable listSubnetsPagedCallable() { + return listSubnetsPagedCallable; + } + + @Override + public UnaryCallable getSubnetCallable() { + return getSubnetCallable; + } + + @Override + public UnaryCallable createSubnetCallable() { + return createSubnetCallable; + } + + @Override + public OperationCallable + createSubnetOperationCallable() { + return createSubnetOperationCallable; + } + + @Override + public UnaryCallable updateSubnetCallable() { + return updateSubnetCallable; + } + + @Override + public OperationCallable + updateSubnetOperationCallable() { + return updateSubnetOperationCallable; + } + + @Override + public UnaryCallable deleteSubnetCallable() { + return deleteSubnetCallable; + } + + @Override + public OperationCallable + deleteSubnetOperationCallable() { + return deleteSubnetOperationCallable; + } + + @Override + public UnaryCallable + listInterconnectsCallable() { + return listInterconnectsCallable; + } + + @Override + public UnaryCallable + listInterconnectsPagedCallable() { + return listInterconnectsPagedCallable; + } + + @Override + public UnaryCallable getInterconnectCallable() { + return getInterconnectCallable; + } + + @Override + public UnaryCallable + diagnoseInterconnectCallable() { + return diagnoseInterconnectCallable; + } + + @Override + public UnaryCallable + listInterconnectAttachmentsCallable() { + return listInterconnectAttachmentsCallable; + } + + @Override + public UnaryCallable + listInterconnectAttachmentsPagedCallable() { + return listInterconnectAttachmentsPagedCallable; + } + + @Override + public UnaryCallable + getInterconnectAttachmentCallable() { + return getInterconnectAttachmentCallable; + } + + @Override + public UnaryCallable + createInterconnectAttachmentCallable() { + return createInterconnectAttachmentCallable; + } + + @Override + public OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable() { + return createInterconnectAttachmentOperationCallable; + } + + @Override + public UnaryCallable + deleteInterconnectAttachmentCallable() { + return deleteInterconnectAttachmentCallable; + } + + @Override + public OperationCallable + deleteInterconnectAttachmentOperationCallable() { + return deleteInterconnectAttachmentOperationCallable; + } + + @Override + public UnaryCallable listRoutersCallable() { + return listRoutersCallable; + } + + @Override + public UnaryCallable listRoutersPagedCallable() { + return listRoutersPagedCallable; + } + + @Override + public UnaryCallable getRouterCallable() { + return getRouterCallable; + } + + @Override + public UnaryCallable diagnoseRouterCallable() { + return diagnoseRouterCallable; + } + + @Override + public UnaryCallable createRouterCallable() { + return createRouterCallable; + } + + @Override + public OperationCallable + createRouterOperationCallable() { + return createRouterOperationCallable; + } + + @Override + public UnaryCallable updateRouterCallable() { + return updateRouterCallable; + } + + @Override + public OperationCallable + updateRouterOperationCallable() { + return updateRouterOperationCallable; + } + + @Override + public UnaryCallable deleteRouterCallable() { + return deleteRouterCallable; + } + + @Override + public OperationCallable + deleteRouterOperationCallable() { + return deleteRouterOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkCallableFactory.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkCallableFactory.java new file mode 100644 index 000000000000..7f8d20188cf9 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkCallableFactory.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.edgenetwork.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the EdgeNetwork service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonEdgeNetworkCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkStub.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkStub.java new file mode 100644 index 000000000000..3cc4544236fe --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/HttpJsonEdgeNetworkStub.java @@ -0,0 +1,2146 @@ +/* + * 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.edgenetwork.v1.stub; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +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.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.GetInterconnectRequest; +import com.google.cloud.edgenetwork.v1.GetNetworkRequest; +import com.google.cloud.edgenetwork.v1.GetRouterRequest; +import com.google.cloud.edgenetwork.v1.GetSubnetRequest; +import com.google.cloud.edgenetwork.v1.GetZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectsResponse; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.ListNetworksResponse; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.ListRoutersResponse; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.ListSubnetsResponse; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.ListZonesResponse; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.cloud.edgenetwork.v1.Zone; +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.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the EdgeNetwork service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonEdgeNetworkStub extends EdgeNetworkStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Subnet.getDescriptor()) + .add(InterconnectAttachment.getDescriptor()) + .add(Network.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Router.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + initializeZoneMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/InitializeZone") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*}:initialize", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InitializeZoneResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listZonesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListZones") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/zones", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListZonesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getZoneMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetZone") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Zone.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listNetworksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListNetworks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/networks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListNetworksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getNetworkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetNetwork") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/networks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Network.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + diagnoseNetworkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DiagnoseNetwork") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/networks/*}:diagnose", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DiagnoseNetworkResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createNetworkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/CreateNetwork") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/networks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "networkId", request.getNetworkId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("network", request.getNetwork(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateNetworkRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteNetworkMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DeleteNetwork") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/networks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteNetworkRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listSubnetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListSubnets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/subnets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSubnetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getSubnetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetSubnet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/subnets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Subnet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSubnetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/CreateSubnet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/subnets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "subnetId", request.getSubnetId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("subnet", request.getSubnet(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateSubnetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateSubnetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/UpdateSubnet") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{subnet.name=projects/*/locations/*/zones/*/subnets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "subnet.name", request.getSubnet().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("subnet", request.getSubnet(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSubnetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteSubnetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DeleteSubnet") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/subnets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteSubnetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listInterconnectsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListInterconnects") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/interconnects", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInterconnectsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getInterconnectMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetInterconnect") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/interconnects/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Interconnect.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + DiagnoseInterconnectRequest, DiagnoseInterconnectResponse> + diagnoseInterconnectMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DiagnoseInterconnect") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/interconnects/*}:diagnose", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DiagnoseInterconnectResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + listInterconnectAttachmentsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/ListInterconnectAttachments") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/interconnectAttachments", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInterconnectAttachmentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getInterconnectAttachmentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/GetInterconnectAttachment") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/interconnectAttachments/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InterconnectAttachment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createInterconnectAttachmentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/CreateInterconnectAttachment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/interconnectAttachments", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, + "interconnectAttachmentId", + request.getInterconnectAttachmentId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "interconnectAttachment", + request.getInterconnectAttachment(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateInterconnectAttachmentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteInterconnectAttachmentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.edgenetwork.v1.EdgeNetwork/DeleteInterconnectAttachment") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/interconnectAttachments/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteInterconnectAttachmentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listRoutersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/ListRouters") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/routers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRoutersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getRouterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/GetRouter") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/routers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Router.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + diagnoseRouterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DiagnoseRouter") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/routers/*}:diagnose", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DiagnoseRouterResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createRouterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/CreateRouter") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/zones/*}/routers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "routerId", request.getRouterId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("router", request.getRouter(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateRouterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateRouterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/UpdateRouter") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{router.name=projects/*/locations/*/zones/*/routers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "router.name", request.getRouter().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("router", request.getRouter(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateRouterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteRouterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.edgenetwork.v1.EdgeNetwork/DeleteRouter") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/zones/*/routers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteRouterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable initializeZoneCallable; + private final UnaryCallable listZonesCallable; + private final UnaryCallable listZonesPagedCallable; + private final UnaryCallable getZoneCallable; + private final UnaryCallable listNetworksCallable; + private final UnaryCallable + listNetworksPagedCallable; + private final UnaryCallable getNetworkCallable; + private final UnaryCallable + diagnoseNetworkCallable; + private final UnaryCallable createNetworkCallable; + private final OperationCallable + createNetworkOperationCallable; + private final UnaryCallable deleteNetworkCallable; + private final OperationCallable + deleteNetworkOperationCallable; + private final UnaryCallable listSubnetsCallable; + private final UnaryCallable + listSubnetsPagedCallable; + private final UnaryCallable getSubnetCallable; + private final UnaryCallable createSubnetCallable; + private final OperationCallable + createSubnetOperationCallable; + private final UnaryCallable updateSubnetCallable; + private final OperationCallable + updateSubnetOperationCallable; + private final UnaryCallable deleteSubnetCallable; + private final OperationCallable + deleteSubnetOperationCallable; + private final UnaryCallable + listInterconnectsCallable; + private final UnaryCallable + listInterconnectsPagedCallable; + private final UnaryCallable getInterconnectCallable; + private final UnaryCallable + diagnoseInterconnectCallable; + private final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + listInterconnectAttachmentsCallable; + private final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsPagedCallable; + private final UnaryCallable + getInterconnectAttachmentCallable; + private final UnaryCallable + createInterconnectAttachmentCallable; + private final OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable; + private final UnaryCallable + deleteInterconnectAttachmentCallable; + private final OperationCallable + deleteInterconnectAttachmentOperationCallable; + private final UnaryCallable listRoutersCallable; + private final UnaryCallable + listRoutersPagedCallable; + private final UnaryCallable getRouterCallable; + private final UnaryCallable diagnoseRouterCallable; + private final UnaryCallable createRouterCallable; + private final OperationCallable + createRouterOperationCallable; + private final UnaryCallable updateRouterCallable; + private final OperationCallable + updateRouterOperationCallable; + private final UnaryCallable deleteRouterCallable; + private final OperationCallable + deleteRouterOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonEdgeNetworkStub create(EdgeNetworkStubSettings settings) + throws IOException { + return new HttpJsonEdgeNetworkStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonEdgeNetworkStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonEdgeNetworkStub( + EdgeNetworkStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonEdgeNetworkStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonEdgeNetworkStub( + EdgeNetworkStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonEdgeNetworkStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonEdgeNetworkStub(EdgeNetworkStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonEdgeNetworkCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonEdgeNetworkStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonEdgeNetworkStub( + EdgeNetworkStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + initializeZoneTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(initializeZoneMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listZonesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listZonesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getZoneTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getZoneMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listNetworksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listNetworksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getNetworkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNetworkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + diagnoseNetworkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(diagnoseNetworkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createNetworkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createNetworkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteNetworkTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteNetworkMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSubnetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSubnetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSubnetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSubnetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createSubnetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSubnetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSubnetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSubnetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("subnet.name", String.valueOf(request.getSubnet().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSubnetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSubnetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listInterconnectsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listInterconnectsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getInterconnectTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInterconnectMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + diagnoseInterconnectTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(diagnoseInterconnectMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listInterconnectAttachmentsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listInterconnectAttachmentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getInterconnectAttachmentTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getInterconnectAttachmentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createInterconnectAttachmentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createInterconnectAttachmentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteInterconnectAttachmentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteInterconnectAttachmentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listRoutersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listRoutersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getRouterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRouterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + diagnoseRouterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(diagnoseRouterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createRouterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createRouterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateRouterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateRouterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("router.name", String.valueOf(request.getRouter().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteRouterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteRouterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.initializeZoneCallable = + callableFactory.createUnaryCallable( + initializeZoneTransportSettings, settings.initializeZoneSettings(), clientContext); + this.listZonesCallable = + callableFactory.createUnaryCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.listZonesPagedCallable = + callableFactory.createPagedCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.getZoneCallable = + callableFactory.createUnaryCallable( + getZoneTransportSettings, settings.getZoneSettings(), clientContext); + this.listNetworksCallable = + callableFactory.createUnaryCallable( + listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.listNetworksPagedCallable = + callableFactory.createPagedCallable( + listNetworksTransportSettings, settings.listNetworksSettings(), clientContext); + this.getNetworkCallable = + callableFactory.createUnaryCallable( + getNetworkTransportSettings, settings.getNetworkSettings(), clientContext); + this.diagnoseNetworkCallable = + callableFactory.createUnaryCallable( + diagnoseNetworkTransportSettings, settings.diagnoseNetworkSettings(), clientContext); + this.createNetworkCallable = + callableFactory.createUnaryCallable( + createNetworkTransportSettings, settings.createNetworkSettings(), clientContext); + this.createNetworkOperationCallable = + callableFactory.createOperationCallable( + createNetworkTransportSettings, + settings.createNetworkOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteNetworkCallable = + callableFactory.createUnaryCallable( + deleteNetworkTransportSettings, settings.deleteNetworkSettings(), clientContext); + this.deleteNetworkOperationCallable = + callableFactory.createOperationCallable( + deleteNetworkTransportSettings, + settings.deleteNetworkOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listSubnetsCallable = + callableFactory.createUnaryCallable( + listSubnetsTransportSettings, settings.listSubnetsSettings(), clientContext); + this.listSubnetsPagedCallable = + callableFactory.createPagedCallable( + listSubnetsTransportSettings, settings.listSubnetsSettings(), clientContext); + this.getSubnetCallable = + callableFactory.createUnaryCallable( + getSubnetTransportSettings, settings.getSubnetSettings(), clientContext); + this.createSubnetCallable = + callableFactory.createUnaryCallable( + createSubnetTransportSettings, settings.createSubnetSettings(), clientContext); + this.createSubnetOperationCallable = + callableFactory.createOperationCallable( + createSubnetTransportSettings, + settings.createSubnetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateSubnetCallable = + callableFactory.createUnaryCallable( + updateSubnetTransportSettings, settings.updateSubnetSettings(), clientContext); + this.updateSubnetOperationCallable = + callableFactory.createOperationCallable( + updateSubnetTransportSettings, + settings.updateSubnetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteSubnetCallable = + callableFactory.createUnaryCallable( + deleteSubnetTransportSettings, settings.deleteSubnetSettings(), clientContext); + this.deleteSubnetOperationCallable = + callableFactory.createOperationCallable( + deleteSubnetTransportSettings, + settings.deleteSubnetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listInterconnectsCallable = + callableFactory.createUnaryCallable( + listInterconnectsTransportSettings, + settings.listInterconnectsSettings(), + clientContext); + this.listInterconnectsPagedCallable = + callableFactory.createPagedCallable( + listInterconnectsTransportSettings, + settings.listInterconnectsSettings(), + clientContext); + this.getInterconnectCallable = + callableFactory.createUnaryCallable( + getInterconnectTransportSettings, settings.getInterconnectSettings(), clientContext); + this.diagnoseInterconnectCallable = + callableFactory.createUnaryCallable( + diagnoseInterconnectTransportSettings, + settings.diagnoseInterconnectSettings(), + clientContext); + this.listInterconnectAttachmentsCallable = + callableFactory.createUnaryCallable( + listInterconnectAttachmentsTransportSettings, + settings.listInterconnectAttachmentsSettings(), + clientContext); + this.listInterconnectAttachmentsPagedCallable = + callableFactory.createPagedCallable( + listInterconnectAttachmentsTransportSettings, + settings.listInterconnectAttachmentsSettings(), + clientContext); + this.getInterconnectAttachmentCallable = + callableFactory.createUnaryCallable( + getInterconnectAttachmentTransportSettings, + settings.getInterconnectAttachmentSettings(), + clientContext); + this.createInterconnectAttachmentCallable = + callableFactory.createUnaryCallable( + createInterconnectAttachmentTransportSettings, + settings.createInterconnectAttachmentSettings(), + clientContext); + this.createInterconnectAttachmentOperationCallable = + callableFactory.createOperationCallable( + createInterconnectAttachmentTransportSettings, + settings.createInterconnectAttachmentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteInterconnectAttachmentCallable = + callableFactory.createUnaryCallable( + deleteInterconnectAttachmentTransportSettings, + settings.deleteInterconnectAttachmentSettings(), + clientContext); + this.deleteInterconnectAttachmentOperationCallable = + callableFactory.createOperationCallable( + deleteInterconnectAttachmentTransportSettings, + settings.deleteInterconnectAttachmentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listRoutersCallable = + callableFactory.createUnaryCallable( + listRoutersTransportSettings, settings.listRoutersSettings(), clientContext); + this.listRoutersPagedCallable = + callableFactory.createPagedCallable( + listRoutersTransportSettings, settings.listRoutersSettings(), clientContext); + this.getRouterCallable = + callableFactory.createUnaryCallable( + getRouterTransportSettings, settings.getRouterSettings(), clientContext); + this.diagnoseRouterCallable = + callableFactory.createUnaryCallable( + diagnoseRouterTransportSettings, settings.diagnoseRouterSettings(), clientContext); + this.createRouterCallable = + callableFactory.createUnaryCallable( + createRouterTransportSettings, settings.createRouterSettings(), clientContext); + this.createRouterOperationCallable = + callableFactory.createOperationCallable( + createRouterTransportSettings, + settings.createRouterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateRouterCallable = + callableFactory.createUnaryCallable( + updateRouterTransportSettings, settings.updateRouterSettings(), clientContext); + this.updateRouterOperationCallable = + callableFactory.createOperationCallable( + updateRouterTransportSettings, + settings.updateRouterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteRouterCallable = + callableFactory.createUnaryCallable( + deleteRouterTransportSettings, settings.deleteRouterSettings(), clientContext); + this.deleteRouterOperationCallable = + callableFactory.createOperationCallable( + deleteRouterTransportSettings, + settings.deleteRouterOperationSettings(), + clientContext, + httpJsonOperationsStub); + 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.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(initializeZoneMethodDescriptor); + methodDescriptors.add(listZonesMethodDescriptor); + methodDescriptors.add(getZoneMethodDescriptor); + methodDescriptors.add(listNetworksMethodDescriptor); + methodDescriptors.add(getNetworkMethodDescriptor); + methodDescriptors.add(diagnoseNetworkMethodDescriptor); + methodDescriptors.add(createNetworkMethodDescriptor); + methodDescriptors.add(deleteNetworkMethodDescriptor); + methodDescriptors.add(listSubnetsMethodDescriptor); + methodDescriptors.add(getSubnetMethodDescriptor); + methodDescriptors.add(createSubnetMethodDescriptor); + methodDescriptors.add(updateSubnetMethodDescriptor); + methodDescriptors.add(deleteSubnetMethodDescriptor); + methodDescriptors.add(listInterconnectsMethodDescriptor); + methodDescriptors.add(getInterconnectMethodDescriptor); + methodDescriptors.add(diagnoseInterconnectMethodDescriptor); + methodDescriptors.add(listInterconnectAttachmentsMethodDescriptor); + methodDescriptors.add(getInterconnectAttachmentMethodDescriptor); + methodDescriptors.add(createInterconnectAttachmentMethodDescriptor); + methodDescriptors.add(deleteInterconnectAttachmentMethodDescriptor); + methodDescriptors.add(listRoutersMethodDescriptor); + methodDescriptors.add(getRouterMethodDescriptor); + methodDescriptors.add(diagnoseRouterMethodDescriptor); + methodDescriptors.add(createRouterMethodDescriptor); + methodDescriptors.add(updateRouterMethodDescriptor); + methodDescriptors.add(deleteRouterMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable initializeZoneCallable() { + return initializeZoneCallable; + } + + @Override + public UnaryCallable listZonesCallable() { + return listZonesCallable; + } + + @Override + public UnaryCallable listZonesPagedCallable() { + return listZonesPagedCallable; + } + + @Override + public UnaryCallable getZoneCallable() { + return getZoneCallable; + } + + @Override + public UnaryCallable listNetworksCallable() { + return listNetworksCallable; + } + + @Override + public UnaryCallable listNetworksPagedCallable() { + return listNetworksPagedCallable; + } + + @Override + public UnaryCallable getNetworkCallable() { + return getNetworkCallable; + } + + @Override + public UnaryCallable diagnoseNetworkCallable() { + return diagnoseNetworkCallable; + } + + @Override + public UnaryCallable createNetworkCallable() { + return createNetworkCallable; + } + + @Override + public OperationCallable + createNetworkOperationCallable() { + return createNetworkOperationCallable; + } + + @Override + public UnaryCallable deleteNetworkCallable() { + return deleteNetworkCallable; + } + + @Override + public OperationCallable + deleteNetworkOperationCallable() { + return deleteNetworkOperationCallable; + } + + @Override + public UnaryCallable listSubnetsCallable() { + return listSubnetsCallable; + } + + @Override + public UnaryCallable listSubnetsPagedCallable() { + return listSubnetsPagedCallable; + } + + @Override + public UnaryCallable getSubnetCallable() { + return getSubnetCallable; + } + + @Override + public UnaryCallable createSubnetCallable() { + return createSubnetCallable; + } + + @Override + public OperationCallable + createSubnetOperationCallable() { + return createSubnetOperationCallable; + } + + @Override + public UnaryCallable updateSubnetCallable() { + return updateSubnetCallable; + } + + @Override + public OperationCallable + updateSubnetOperationCallable() { + return updateSubnetOperationCallable; + } + + @Override + public UnaryCallable deleteSubnetCallable() { + return deleteSubnetCallable; + } + + @Override + public OperationCallable + deleteSubnetOperationCallable() { + return deleteSubnetOperationCallable; + } + + @Override + public UnaryCallable + listInterconnectsCallable() { + return listInterconnectsCallable; + } + + @Override + public UnaryCallable + listInterconnectsPagedCallable() { + return listInterconnectsPagedCallable; + } + + @Override + public UnaryCallable getInterconnectCallable() { + return getInterconnectCallable; + } + + @Override + public UnaryCallable + diagnoseInterconnectCallable() { + return diagnoseInterconnectCallable; + } + + @Override + public UnaryCallable + listInterconnectAttachmentsCallable() { + return listInterconnectAttachmentsCallable; + } + + @Override + public UnaryCallable + listInterconnectAttachmentsPagedCallable() { + return listInterconnectAttachmentsPagedCallable; + } + + @Override + public UnaryCallable + getInterconnectAttachmentCallable() { + return getInterconnectAttachmentCallable; + } + + @Override + public UnaryCallable + createInterconnectAttachmentCallable() { + return createInterconnectAttachmentCallable; + } + + @Override + public OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable() { + return createInterconnectAttachmentOperationCallable; + } + + @Override + public UnaryCallable + deleteInterconnectAttachmentCallable() { + return deleteInterconnectAttachmentCallable; + } + + @Override + public OperationCallable + deleteInterconnectAttachmentOperationCallable() { + return deleteInterconnectAttachmentOperationCallable; + } + + @Override + public UnaryCallable listRoutersCallable() { + return listRoutersCallable; + } + + @Override + public UnaryCallable listRoutersPagedCallable() { + return listRoutersPagedCallable; + } + + @Override + public UnaryCallable getRouterCallable() { + return getRouterCallable; + } + + @Override + public UnaryCallable diagnoseRouterCallable() { + return diagnoseRouterCallable; + } + + @Override + public UnaryCallable createRouterCallable() { + return createRouterCallable; + } + + @Override + public OperationCallable + createRouterOperationCallable() { + return createRouterOperationCallable; + } + + @Override + public UnaryCallable updateRouterCallable() { + return updateRouterCallable; + } + + @Override + public OperationCallable + updateRouterOperationCallable() { + return updateRouterOperationCallable; + } + + @Override + public UnaryCallable deleteRouterCallable() { + return deleteRouterCallable; + } + + @Override + public OperationCallable + deleteRouterOperationCallable() { + return deleteRouterOperationCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/resources/META-INF/native-image/com.google.cloud.edgenetwork.v1/reflect-config.json b/java-edgenetwork/google-cloud-edgenetwork/src/main/resources/META-INF/native-image/com.google.cloud.edgenetwork.v1/reflect-config.json new file mode 100644 index 000000000000..83c6360e03fb --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/resources/META-INF/native-image/com.google.cloud.edgenetwork.v1/reflect-config.json @@ -0,0 +1,2360 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateNetworkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateNetworkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateRouterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateRouterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateSubnetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.CreateSubnetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteNetworkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteNetworkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteRouterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteRouterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteSubnetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DeleteSubnetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse$NetworkStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse$NetworkStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetInterconnectRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetInterconnectRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetNetworkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetNetworkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetRouterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetRouterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetSubnetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetSubnetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetZoneRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.GetZoneRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InitializeZoneRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InitializeZoneRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InitializeZoneResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InitializeZoneResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Interconnect", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Interconnect$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Interconnect$InterconnectType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectAttachment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectAttachment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkLACPStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkLACPStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkLACPStatus$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkLLDPStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkLLDPStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$LinkStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$PacketCounts", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.InterconnectDiagnostics$PacketCounts$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.LinkLayerAddress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.LinkLayerAddress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListInterconnectsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListNetworksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListNetworksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListNetworksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListNetworksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListRoutersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListRoutersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListRoutersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListRoutersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListSubnetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListSubnetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListSubnetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListSubnetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListZonesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListZonesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListZonesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ListZonesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Network", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Network$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.ResourceState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$Bgp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$Bgp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$BgpPeer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$BgpPeer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$Interface", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Router$Interface$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus$BgpPeerStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus$BgpPeerStatus$BgpStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus$BgpPeerStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus$PrefixCounter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.RouterStatus$PrefixCounter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Subnet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Subnet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.SubnetStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.SubnetStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.UpdateRouterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.UpdateRouterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.UpdateSubnetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.UpdateSubnetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Zone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.edgenetwork.v1.Zone$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "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.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientHttpJsonTest.java b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientHttpJsonTest.java new file mode 100644 index 000000000000..58bfeae0863c --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientHttpJsonTest.java @@ -0,0 +1,2878 @@ +/* + * 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.edgenetwork.v1; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.edgenetwork.v1.stub.HttpJsonEdgeNetworkStub; +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.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EdgeNetworkClientHttpJsonTest { + private static MockHttpService mockService; + private static EdgeNetworkClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonEdgeNetworkStub.getMethodDescriptors(), + EdgeNetworkSettings.getDefaultEndpoint()); + EdgeNetworkSettings settings = + EdgeNetworkSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + EdgeNetworkSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EdgeNetworkClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void initializeZoneTest() throws Exception { + InitializeZoneResponse expectedResponse = InitializeZoneResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + InitializeZoneResponse actualResponse = client.initializeZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void initializeZoneExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.initializeZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void initializeZoneTest2() throws Exception { + InitializeZoneResponse expectedResponse = InitializeZoneResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + + InitializeZoneResponse actualResponse = client.initializeZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void initializeZoneExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + client.initializeZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listZonesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest2() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listZonesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLayoutName("layoutName341460181") + .build(); + mockService.addResponse(expectedResponse); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + Zone actualResponse = client.getZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getZoneExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLayoutName("layoutName341460181") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + + Zone actualResponse = client.getZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getZoneExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworksTest() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNetworksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listNetworks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworksTest2() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listNetworksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + client.listNetworks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + mockService.addResponse(expectedResponse); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNetworkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + client.getNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNetworkTest2() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6162/locations/location-6162/zones/zone-6162/networks/network-6162"; + + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNetworkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6162/locations/location-6162/zones/zone-6162/networks/network-6162"; + client.getNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseNetworkTest() throws Exception { + DiagnoseNetworkResponse expectedResponse = + DiagnoseNetworkResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(DiagnoseNetworkResponse.NetworkStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + + DiagnoseNetworkResponse actualResponse = client.diagnoseNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void diagnoseNetworkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + client.diagnoseNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseNetworkTest2() throws Exception { + DiagnoseNetworkResponse expectedResponse = + DiagnoseNetworkResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(DiagnoseNetworkResponse.NetworkStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6162/locations/location-6162/zones/zone-6162/networks/network-6162"; + + DiagnoseNetworkResponse actualResponse = client.diagnoseNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void diagnoseNetworkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6162/locations/location-6162/zones/zone-6162/networks/network-6162"; + client.diagnoseNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + + Network actualResponse = client.createNetworkAsync(parent, network, networkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNetworkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + client.createNetworkAsync(parent, network, networkId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createNetworkTest2() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + + Network actualResponse = client.createNetworkAsync(parent, network, networkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createNetworkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + client.createNetworkAsync(parent, network, networkId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteNetworkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + + client.deleteNetworkAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteNetworkExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + client.deleteNetworkAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteNetworkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-6162/locations/location-6162/zones/zone-6162/networks/network-6162"; + + client.deleteNetworkAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteNetworkExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6162/locations/location-6162/zones/zone-6162/networks/network-6162"; + client.deleteNetworkAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listSubnetsTest() throws Exception { + Subnet responsesElement = Subnet.newBuilder().build(); + ListSubnetsResponse expectedResponse = + ListSubnetsResponse.newBuilder() + .setNextPageToken("") + .addAllSubnets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListSubnetsPagedResponse pagedListResponse = client.listSubnets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSubnetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSubnetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listSubnets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSubnetsTest2() throws Exception { + Subnet responsesElement = Subnet.newBuilder().build(); + ListSubnetsResponse expectedResponse = + ListSubnetsResponse.newBuilder() + .setNextPageToken("") + .addAllSubnets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + + ListSubnetsPagedResponse pagedListResponse = client.listSubnets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSubnetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSubnetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + client.listSubnets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSubnetTest() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + + Subnet actualResponse = client.getSubnet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSubnetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + client.getSubnet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSubnetTest2() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3631/locations/location-3631/zones/zone-3631/subnets/subnet-3631"; + + Subnet actualResponse = client.getSubnet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSubnetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3631/locations/location-3631/zones/zone-3631/subnets/subnet-3631"; + client.getSubnet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSubnetTest() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + + Subnet actualResponse = client.createSubnetAsync(parent, subnet, subnetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSubnetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + client.createSubnetAsync(parent, subnet, subnetId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createSubnetTest2() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + + Subnet actualResponse = client.createSubnetAsync(parent, subnet, subnetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSubnetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + client.createSubnetAsync(parent, subnet, subnetId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateSubnetTest() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Subnet subnet = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Subnet actualResponse = client.updateSubnetAsync(subnet, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSubnetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Subnet subnet = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork( + NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSubnetAsync(subnet, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSubnetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + + client.deleteSubnetAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSubnetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + client.deleteSubnetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSubnetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-3631/locations/location-3631/zones/zone-3631/subnets/subnet-3631"; + + client.deleteSubnetAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSubnetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3631/locations/location-3631/zones/zone-3631/subnets/subnet-3631"; + client.deleteSubnetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listInterconnectsTest() throws Exception { + Interconnect responsesElement = Interconnect.newBuilder().build(); + ListInterconnectsResponse expectedResponse = + ListInterconnectsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnects(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListInterconnectsPagedResponse pagedListResponse = client.listInterconnects(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInterconnectsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listInterconnects(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInterconnectsTest2() throws Exception { + Interconnect responsesElement = Interconnect.newBuilder().build(); + ListInterconnectsResponse expectedResponse = + ListInterconnectsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnects(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + + ListInterconnectsPagedResponse pagedListResponse = client.listInterconnects(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInterconnectsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + client.listInterconnects(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectTest() throws Exception { + Interconnect expectedResponse = + Interconnect.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUuid("uuid3601339") + .setDeviceCloudResourceName("deviceCloudResourceName-1996267816") + .addAllPhysicalPorts(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + + Interconnect actualResponse = client.getInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInterconnectExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + client.getInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectTest2() throws Exception { + Interconnect expectedResponse = + Interconnect.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUuid("uuid3601339") + .setDeviceCloudResourceName("deviceCloudResourceName-1996267816") + .addAllPhysicalPorts(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8178/locations/location-8178/zones/zone-8178/interconnects/interconnect-8178"; + + Interconnect actualResponse = client.getInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInterconnectExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8178/locations/location-8178/zones/zone-8178/interconnects/interconnect-8178"; + client.getInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseInterconnectTest() throws Exception { + DiagnoseInterconnectResponse expectedResponse = + DiagnoseInterconnectResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(InterconnectDiagnostics.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + + DiagnoseInterconnectResponse actualResponse = client.diagnoseInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void diagnoseInterconnectExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + client.diagnoseInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseInterconnectTest2() throws Exception { + DiagnoseInterconnectResponse expectedResponse = + DiagnoseInterconnectResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(InterconnectDiagnostics.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8178/locations/location-8178/zones/zone-8178/interconnects/interconnect-8178"; + + DiagnoseInterconnectResponse actualResponse = client.diagnoseInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void diagnoseInterconnectExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8178/locations/location-8178/zones/zone-8178/interconnects/interconnect-8178"; + client.diagnoseInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInterconnectAttachmentsTest() throws Exception { + InterconnectAttachment responsesElement = InterconnectAttachment.newBuilder().build(); + ListInterconnectAttachmentsResponse expectedResponse = + ListInterconnectAttachmentsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnectAttachments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListInterconnectAttachmentsPagedResponse pagedListResponse = + client.listInterconnectAttachments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectAttachmentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInterconnectAttachmentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listInterconnectAttachments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInterconnectAttachmentsTest2() throws Exception { + InterconnectAttachment responsesElement = InterconnectAttachment.newBuilder().build(); + ListInterconnectAttachmentsResponse expectedResponse = + ListInterconnectAttachmentsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnectAttachments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + + ListInterconnectAttachmentsPagedResponse pagedListResponse = + client.listInterconnectAttachments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectAttachmentsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInterconnectAttachmentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + client.listInterconnectAttachments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectAttachmentTest() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + + InterconnectAttachment actualResponse = client.getInterconnectAttachment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInterconnectAttachmentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + client.getInterconnectAttachment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectAttachmentTest2() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5355/locations/location-5355/zones/zone-5355/interconnectAttachments/interconnectAttachment-5355"; + + InterconnectAttachment actualResponse = client.getInterconnectAttachment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInterconnectAttachmentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5355/locations/location-5355/zones/zone-5355/interconnectAttachments/interconnectAttachment-5355"; + client.getInterconnectAttachment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInterconnectAttachmentTest() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + + InterconnectAttachment actualResponse = + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInterconnectAttachmentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createInterconnectAttachmentTest2() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + + InterconnectAttachment actualResponse = + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInterconnectAttachmentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInterconnectAttachmentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + + client.deleteInterconnectAttachmentAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteInterconnectAttachmentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + client.deleteInterconnectAttachmentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInterconnectAttachmentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-5355/locations/location-5355/zones/zone-5355/interconnectAttachments/interconnectAttachment-5355"; + + client.deleteInterconnectAttachmentAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteInterconnectAttachmentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5355/locations/location-5355/zones/zone-5355/interconnectAttachments/interconnectAttachment-5355"; + client.deleteInterconnectAttachmentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listRoutersTest() throws Exception { + Router responsesElement = Router.newBuilder().build(); + ListRoutersResponse expectedResponse = + ListRoutersResponse.newBuilder() + .setNextPageToken("") + .addAllRouters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListRoutersPagedResponse pagedListResponse = client.listRouters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listRoutersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listRouters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRoutersTest2() throws Exception { + Router responsesElement = Router.newBuilder().build(); + ListRoutersResponse expectedResponse = + ListRoutersResponse.newBuilder() + .setNextPageToken("") + .addAllRouters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + + ListRoutersPagedResponse pagedListResponse = client.listRouters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listRoutersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + client.listRouters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouterTest() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + + Router actualResponse = client.getRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getRouterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + client.getRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouterTest2() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6755/locations/location-6755/zones/zone-6755/routers/router-6755"; + + Router actualResponse = client.getRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getRouterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6755/locations/location-6755/zones/zone-6755/routers/router-6755"; + client.getRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseRouterTest() throws Exception { + DiagnoseRouterResponse expectedResponse = + DiagnoseRouterResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(RouterStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + + DiagnoseRouterResponse actualResponse = client.diagnoseRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void diagnoseRouterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + client.diagnoseRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseRouterTest2() throws Exception { + DiagnoseRouterResponse expectedResponse = + DiagnoseRouterResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(RouterStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6755/locations/location-6755/zones/zone-6755/routers/router-6755"; + + DiagnoseRouterResponse actualResponse = client.diagnoseRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void diagnoseRouterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6755/locations/location-6755/zones/zone-6755/routers/router-6755"; + client.diagnoseRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRouterTest() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + + Router actualResponse = client.createRouterAsync(parent, router, routerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createRouterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + client.createRouterAsync(parent, router, routerId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createRouterTest2() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + + Router actualResponse = client.createRouterAsync(parent, router, routerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createRouterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7228/locations/location-7228/zones/zone-7228"; + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + client.createRouterAsync(parent, router, routerId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateRouterTest() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Router router = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Router actualResponse = client.updateRouterAsync(router, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateRouterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Router router = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork( + NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRouterAsync(router, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRouterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + + client.deleteRouterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteRouterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + client.deleteRouterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRouterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-6755/locations/location-6755/zones/zone-6755/routers/router-6755"; + + client.deleteRouterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteRouterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6755/locations/location-6755/zones/zone-6755/routers/router-6755"; + client.deleteRouterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .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(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientTest.java b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientTest.java new file mode 100644 index 000000000000..a3dadb2fa189 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/EdgeNetworkClientTest.java @@ -0,0 +1,2576 @@ +/* + * 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.edgenetwork.v1; + +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse; +import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +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.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EdgeNetworkClientTest { + private static MockEdgeNetwork mockEdgeNetwork; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private EdgeNetworkClient client; + + @BeforeClass + public static void startStaticServer() { + mockEdgeNetwork = new MockEdgeNetwork(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockEdgeNetwork, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + EdgeNetworkSettings settings = + EdgeNetworkSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EdgeNetworkClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void initializeZoneTest() throws Exception { + InitializeZoneResponse expectedResponse = InitializeZoneResponse.newBuilder().build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + InitializeZoneResponse actualResponse = client.initializeZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InitializeZoneRequest actualRequest = ((InitializeZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void initializeZoneExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.initializeZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void initializeZoneTest2() throws Exception { + InitializeZoneResponse expectedResponse = InitializeZoneResponse.newBuilder().build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + InitializeZoneResponse actualResponse = client.initializeZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InitializeZoneRequest actualRequest = ((InitializeZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void initializeZoneExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.initializeZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListZonesRequest actualRequest = ((ListZonesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listZonesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest2() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListZonesRequest actualRequest = ((ListZonesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listZonesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + client.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLayoutName("layoutName341460181") + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + Zone actualResponse = client.getZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetZoneRequest actualRequest = ((GetZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getZoneExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLayoutName("layoutName341460181") + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + Zone actualResponse = client.getZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetZoneRequest actualRequest = ((GetZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getZoneExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworksTest() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNetworksRequest actualRequest = ((ListNetworksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNetworksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listNetworks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNetworksTest2() throws Exception { + Network responsesElement = Network.newBuilder().build(); + ListNetworksResponse expectedResponse = + ListNetworksResponse.newBuilder() + .setNextPageToken("") + .addAllNetworks(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNetworksPagedResponse pagedListResponse = client.listNetworks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNetworksList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNetworksRequest actualRequest = ((ListNetworksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNetworksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNetworks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNetworkRequest actualRequest = ((GetNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNetworkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + client.getNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNetworkTest2() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + Network actualResponse = client.getNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNetworkRequest actualRequest = ((GetNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNetworkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.getNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseNetworkTest() throws Exception { + DiagnoseNetworkResponse expectedResponse = + DiagnoseNetworkResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(DiagnoseNetworkResponse.NetworkStatus.newBuilder().build()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + + DiagnoseNetworkResponse actualResponse = client.diagnoseNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DiagnoseNetworkRequest actualRequest = ((DiagnoseNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void diagnoseNetworkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + client.diagnoseNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseNetworkTest2() throws Exception { + DiagnoseNetworkResponse expectedResponse = + DiagnoseNetworkResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(DiagnoseNetworkResponse.NetworkStatus.newBuilder().build()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + DiagnoseNetworkResponse actualResponse = client.diagnoseNetwork(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DiagnoseNetworkRequest actualRequest = ((DiagnoseNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void diagnoseNetworkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.diagnoseNetwork(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNetworkTest() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + + Network actualResponse = client.createNetworkAsync(parent, network, networkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNetworkRequest actualRequest = ((CreateNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(network, actualRequest.getNetwork()); + Assert.assertEquals(networkId, actualRequest.getNetworkId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNetworkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + client.createNetworkAsync(parent, network, networkId).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 createNetworkTest2() throws Exception { + Network expectedResponse = + Network.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setMtu(108462) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String parent = "parent-995424086"; + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + + Network actualResponse = client.createNetworkAsync(parent, network, networkId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNetworkRequest actualRequest = ((CreateNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(network, actualRequest.getNetwork()); + Assert.assertEquals(networkId, actualRequest.getNetworkId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNetworkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + client.createNetworkAsync(parent, network, networkId).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 deleteNetworkTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + + client.deleteNetworkAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNetworkRequest actualRequest = ((DeleteNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNetworkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + client.deleteNetworkAsync(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 deleteNetworkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNetworkTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNetworkAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNetworkRequest actualRequest = ((DeleteNetworkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNetworkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.deleteNetworkAsync(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 listSubnetsTest() throws Exception { + Subnet responsesElement = Subnet.newBuilder().build(); + ListSubnetsResponse expectedResponse = + ListSubnetsResponse.newBuilder() + .setNextPageToken("") + .addAllSubnets(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListSubnetsPagedResponse pagedListResponse = client.listSubnets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSubnetsList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSubnetsRequest actualRequest = ((ListSubnetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSubnetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listSubnets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSubnetsTest2() throws Exception { + Subnet responsesElement = Subnet.newBuilder().build(); + ListSubnetsResponse expectedResponse = + ListSubnetsResponse.newBuilder() + .setNextPageToken("") + .addAllSubnets(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSubnetsPagedResponse pagedListResponse = client.listSubnets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSubnetsList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSubnetsRequest actualRequest = ((ListSubnetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSubnetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSubnets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSubnetTest() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + + Subnet actualResponse = client.getSubnet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSubnetRequest actualRequest = ((GetSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSubnetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + client.getSubnet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSubnetTest2() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + Subnet actualResponse = client.getSubnet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSubnetRequest actualRequest = ((GetSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSubnetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.getSubnet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSubnetTest() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + + Subnet actualResponse = client.createSubnetAsync(parent, subnet, subnetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSubnetRequest actualRequest = ((CreateSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(subnet, actualRequest.getSubnet()); + Assert.assertEquals(subnetId, actualRequest.getSubnetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSubnetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + client.createSubnetAsync(parent, subnet, subnetId).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 createSubnetTest2() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String parent = "parent-995424086"; + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + + Subnet actualResponse = client.createSubnetAsync(parent, subnet, subnetId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSubnetRequest actualRequest = ((CreateSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(subnet, actualRequest.getSubnet()); + Assert.assertEquals(subnetId, actualRequest.getSubnetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSubnetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + client.createSubnetAsync(parent, subnet, subnetId).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 updateSubnetTest() throws Exception { + Subnet expectedResponse = + Subnet.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllIpv4Cidr(new ArrayList()) + .addAllIpv6Cidr(new ArrayList()) + .setVlanId(536153463) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + Subnet subnet = Subnet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Subnet actualResponse = client.updateSubnetAsync(subnet, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSubnetRequest actualRequest = ((UpdateSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(subnet, actualRequest.getSubnet()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSubnetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + Subnet subnet = Subnet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSubnetAsync(subnet, updateMask).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 deleteSubnetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + + client.deleteSubnetAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSubnetRequest actualRequest = ((DeleteSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSubnetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + client.deleteSubnetAsync(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 deleteSubnetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSubnetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSubnetAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSubnetRequest actualRequest = ((DeleteSubnetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSubnetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.deleteSubnetAsync(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 listInterconnectsTest() throws Exception { + Interconnect responsesElement = Interconnect.newBuilder().build(); + ListInterconnectsResponse expectedResponse = + ListInterconnectsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnects(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListInterconnectsPagedResponse pagedListResponse = client.listInterconnects(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectsList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInterconnectsRequest actualRequest = ((ListInterconnectsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInterconnectsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listInterconnects(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInterconnectsTest2() throws Exception { + Interconnect responsesElement = Interconnect.newBuilder().build(); + ListInterconnectsResponse expectedResponse = + ListInterconnectsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnects(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInterconnectsPagedResponse pagedListResponse = client.listInterconnects(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectsList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInterconnectsRequest actualRequest = ((ListInterconnectsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInterconnectsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInterconnects(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectTest() throws Exception { + Interconnect expectedResponse = + Interconnect.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUuid("uuid3601339") + .setDeviceCloudResourceName("deviceCloudResourceName-1996267816") + .addAllPhysicalPorts(new ArrayList()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + + Interconnect actualResponse = client.getInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInterconnectRequest actualRequest = ((GetInterconnectRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInterconnectExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + client.getInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectTest2() throws Exception { + Interconnect expectedResponse = + Interconnect.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUuid("uuid3601339") + .setDeviceCloudResourceName("deviceCloudResourceName-1996267816") + .addAllPhysicalPorts(new ArrayList()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + Interconnect actualResponse = client.getInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInterconnectRequest actualRequest = ((GetInterconnectRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInterconnectExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.getInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseInterconnectTest() throws Exception { + DiagnoseInterconnectResponse expectedResponse = + DiagnoseInterconnectResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(InterconnectDiagnostics.newBuilder().build()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + + DiagnoseInterconnectResponse actualResponse = client.diagnoseInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DiagnoseInterconnectRequest actualRequest = + ((DiagnoseInterconnectRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void diagnoseInterconnectExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + client.diagnoseInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseInterconnectTest2() throws Exception { + DiagnoseInterconnectResponse expectedResponse = + DiagnoseInterconnectResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(InterconnectDiagnostics.newBuilder().build()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + DiagnoseInterconnectResponse actualResponse = client.diagnoseInterconnect(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DiagnoseInterconnectRequest actualRequest = + ((DiagnoseInterconnectRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void diagnoseInterconnectExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.diagnoseInterconnect(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInterconnectAttachmentsTest() throws Exception { + InterconnectAttachment responsesElement = InterconnectAttachment.newBuilder().build(); + ListInterconnectAttachmentsResponse expectedResponse = + ListInterconnectAttachmentsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnectAttachments(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListInterconnectAttachmentsPagedResponse pagedListResponse = + client.listInterconnectAttachments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectAttachmentsList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInterconnectAttachmentsRequest actualRequest = + ((ListInterconnectAttachmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInterconnectAttachmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listInterconnectAttachments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInterconnectAttachmentsTest2() throws Exception { + InterconnectAttachment responsesElement = InterconnectAttachment.newBuilder().build(); + ListInterconnectAttachmentsResponse expectedResponse = + ListInterconnectAttachmentsResponse.newBuilder() + .setNextPageToken("") + .addAllInterconnectAttachments(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInterconnectAttachmentsPagedResponse pagedListResponse = + client.listInterconnectAttachments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInterconnectAttachmentsList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInterconnectAttachmentsRequest actualRequest = + ((ListInterconnectAttachmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInterconnectAttachmentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInterconnectAttachments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectAttachmentTest() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + + InterconnectAttachment actualResponse = client.getInterconnectAttachment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInterconnectAttachmentRequest actualRequest = + ((GetInterconnectAttachmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInterconnectAttachmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + client.getInterconnectAttachment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInterconnectAttachmentTest2() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + InterconnectAttachment actualResponse = client.getInterconnectAttachment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInterconnectAttachmentRequest actualRequest = + ((GetInterconnectAttachmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInterconnectAttachmentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.getInterconnectAttachment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInterconnectAttachmentTest() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + + InterconnectAttachment actualResponse = + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInterconnectAttachmentRequest actualRequest = + ((CreateInterconnectAttachmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(interconnectAttachment, actualRequest.getInterconnectAttachment()); + Assert.assertEquals(interconnectAttachmentId, actualRequest.getInterconnectAttachmentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInterconnectAttachmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .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 createInterconnectAttachmentTest2() throws Exception { + InterconnectAttachment expectedResponse = + InterconnectAttachment.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setInterconnect( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setVlanId(536153463) + .setMtu(108462) + .setState(ResourceState.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String parent = "parent-995424086"; + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + + InterconnectAttachment actualResponse = + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInterconnectAttachmentRequest actualRequest = + ((CreateInterconnectAttachmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(interconnectAttachment, actualRequest.getInterconnectAttachment()); + Assert.assertEquals(interconnectAttachmentId, actualRequest.getInterconnectAttachmentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInterconnectAttachmentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + client + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .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 deleteInterconnectAttachmentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + + client.deleteInterconnectAttachmentAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInterconnectAttachmentRequest actualRequest = + ((DeleteInterconnectAttachmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInterconnectAttachmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + client.deleteInterconnectAttachmentAsync(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 deleteInterconnectAttachmentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInterconnectAttachmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteInterconnectAttachmentAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInterconnectAttachmentRequest actualRequest = + ((DeleteInterconnectAttachmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInterconnectAttachmentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.deleteInterconnectAttachmentAsync(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 listRoutersTest() throws Exception { + Router responsesElement = Router.newBuilder().build(); + ListRoutersResponse expectedResponse = + ListRoutersResponse.newBuilder() + .setNextPageToken("") + .addAllRouters(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + ListRoutersPagedResponse pagedListResponse = client.listRouters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutersList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRoutersRequest actualRequest = ((ListRoutersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRoutersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.listRouters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRoutersTest2() throws Exception { + Router responsesElement = Router.newBuilder().build(); + ListRoutersResponse expectedResponse = + ListRoutersResponse.newBuilder() + .setNextPageToken("") + .addAllRouters(Arrays.asList(responsesElement)) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRoutersPagedResponse pagedListResponse = client.listRouters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutersList().get(0), resources.get(0)); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRoutersRequest actualRequest = ((ListRoutersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRoutersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRouters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouterTest() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + + Router actualResponse = client.getRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouterRequest actualRequest = ((GetRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + client.getRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouterTest2() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + Router actualResponse = client.getRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouterRequest actualRequest = ((GetRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.getRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseRouterTest() throws Exception { + DiagnoseRouterResponse expectedResponse = + DiagnoseRouterResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(RouterStatus.newBuilder().build()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + + DiagnoseRouterResponse actualResponse = client.diagnoseRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DiagnoseRouterRequest actualRequest = ((DiagnoseRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void diagnoseRouterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + client.diagnoseRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void diagnoseRouterTest2() throws Exception { + DiagnoseRouterResponse expectedResponse = + DiagnoseRouterResponse.newBuilder() + .setUpdateTime(Timestamp.newBuilder().build()) + .setResult(RouterStatus.newBuilder().build()) + .build(); + mockEdgeNetwork.addResponse(expectedResponse); + + String name = "name3373707"; + + DiagnoseRouterResponse actualResponse = client.diagnoseRouter(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DiagnoseRouterRequest actualRequest = ((DiagnoseRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void diagnoseRouterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.diagnoseRouter(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRouterTest() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + + Router actualResponse = client.createRouterAsync(parent, router, routerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRouterRequest actualRequest = ((CreateRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(router, actualRequest.getRouter()); + Assert.assertEquals(routerId, actualRequest.getRouterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRouterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + client.createRouterAsync(parent, router, routerId).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 createRouterTest2() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String parent = "parent-995424086"; + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + + Router actualResponse = client.createRouterAsync(parent, router, routerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRouterRequest actualRequest = ((CreateRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(router, actualRequest.getRouter()); + Assert.assertEquals(routerId, actualRequest.getRouterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRouterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String parent = "parent-995424086"; + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + client.createRouterAsync(parent, router, routerId).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 updateRouterTest() throws Exception { + Router expectedResponse = + Router.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .addAllInterface(new ArrayList()) + .addAllBgpPeer(new ArrayList()) + .setBgp(Router.Bgp.newBuilder().build()) + .setState(ResourceState.forNumber(0)) + .addAllRouteAdvertisements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + Router router = Router.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Router actualResponse = client.updateRouterAsync(router, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateRouterRequest actualRequest = ((UpdateRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(router, actualRequest.getRouter()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateRouterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + Router router = Router.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRouterAsync(router, updateMask).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 deleteRouterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + + client.deleteRouterAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRouterRequest actualRequest = ((DeleteRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRouterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + client.deleteRouterAsync(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 deleteRouterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRouterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEdgeNetwork.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRouterAsync(name).get(); + + List actualRequests = mockEdgeNetwork.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRouterRequest actualRequest = ((DeleteRouterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRouterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEdgeNetwork.addException(exception); + + try { + String name = "name3373707"; + client.deleteRouterAsync(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 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. + } + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetwork.java b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetwork.java new file mode 100644 index 000000000000..6c3a5937aa17 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetwork.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.edgenetwork.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 MockEdgeNetwork implements MockGrpcService { + private final MockEdgeNetworkImpl serviceImpl; + + public MockEdgeNetwork() { + serviceImpl = new MockEdgeNetworkImpl(); + } + + @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-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetworkImpl.java b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetworkImpl.java new file mode 100644 index 000000000000..1f96d444185e --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockEdgeNetworkImpl.java @@ -0,0 +1,607 @@ +/* + * 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.edgenetwork.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.edgenetwork.v1.EdgeNetworkGrpc.EdgeNetworkImplBase; +import com.google.longrunning.Operation; +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 MockEdgeNetworkImpl extends EdgeNetworkImplBase { + private List requests; + private Queue responses; + + public MockEdgeNetworkImpl() { + 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 initializeZone( + InitializeZoneRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InitializeZoneResponse) { + requests.add(request); + responseObserver.onNext(((InitializeZoneResponse) 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 InitializeZone, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InitializeZoneResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listZones( + ListZonesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListZonesResponse) { + requests.add(request); + responseObserver.onNext(((ListZonesResponse) 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 ListZones, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListZonesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getZone(GetZoneRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Zone) { + requests.add(request); + responseObserver.onNext(((Zone) 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 GetZone, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Zone.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNetworks( + ListNetworksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNetworksResponse) { + requests.add(request); + responseObserver.onNext(((ListNetworksResponse) 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 ListNetworks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNetworksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNetwork(GetNetworkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Network) { + requests.add(request); + responseObserver.onNext(((Network) 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 GetNetwork, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Network.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void diagnoseNetwork( + DiagnoseNetworkRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DiagnoseNetworkResponse) { + requests.add(request); + responseObserver.onNext(((DiagnoseNetworkResponse) 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 DiagnoseNetwork, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DiagnoseNetworkResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createNetwork( + CreateNetworkRequest 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 CreateNetwork, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNetwork( + DeleteNetworkRequest 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 DeleteNetwork, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSubnets( + ListSubnetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSubnetsResponse) { + requests.add(request); + responseObserver.onNext(((ListSubnetsResponse) 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 ListSubnets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSubnetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSubnet(GetSubnetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Subnet) { + requests.add(request); + responseObserver.onNext(((Subnet) 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 GetSubnet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Subnet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSubnet( + CreateSubnetRequest 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 CreateSubnet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSubnet( + UpdateSubnetRequest 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 UpdateSubnet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSubnet( + DeleteSubnetRequest 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 DeleteSubnet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInterconnects( + ListInterconnectsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInterconnectsResponse) { + requests.add(request); + responseObserver.onNext(((ListInterconnectsResponse) 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 ListInterconnects, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInterconnectsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInterconnect( + GetInterconnectRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Interconnect) { + requests.add(request); + responseObserver.onNext(((Interconnect) 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 GetInterconnect, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Interconnect.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void diagnoseInterconnect( + DiagnoseInterconnectRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DiagnoseInterconnectResponse) { + requests.add(request); + responseObserver.onNext(((DiagnoseInterconnectResponse) 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 DiagnoseInterconnect, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DiagnoseInterconnectResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInterconnectAttachments( + ListInterconnectAttachmentsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInterconnectAttachmentsResponse) { + requests.add(request); + responseObserver.onNext(((ListInterconnectAttachmentsResponse) 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 ListInterconnectAttachments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInterconnectAttachmentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInterconnectAttachment( + GetInterconnectAttachmentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InterconnectAttachment) { + requests.add(request); + responseObserver.onNext(((InterconnectAttachment) 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 GetInterconnectAttachment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InterconnectAttachment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInterconnectAttachment( + CreateInterconnectAttachmentRequest 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 CreateInterconnectAttachment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInterconnectAttachment( + DeleteInterconnectAttachmentRequest 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 DeleteInterconnectAttachment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRouters( + ListRoutersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRoutersResponse) { + requests.add(request); + responseObserver.onNext(((ListRoutersResponse) 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 ListRouters, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRoutersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRouter(GetRouterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Router) { + requests.add(request); + responseObserver.onNext(((Router) 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 GetRouter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Router.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void diagnoseRouter( + DiagnoseRouterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DiagnoseRouterResponse) { + requests.add(request); + responseObserver.onNext(((DiagnoseRouterResponse) 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 DiagnoseRouter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DiagnoseRouterResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRouter( + CreateRouterRequest 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 CreateRouter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateRouter( + UpdateRouterRequest 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 UpdateRouter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRouter( + DeleteRouterRequest 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 DeleteRouter, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockLocations.java b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockLocations.java new file mode 100644 index 000000000000..ac054e5e366f --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/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.edgenetwork.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-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockLocationsImpl.java b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..f1b0ad6237f2 --- /dev/null +++ b/java-edgenetwork/google-cloud-edgenetwork/src/test/java/com/google/cloud/edgenetwork/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.edgenetwork.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-edgenetwork/grpc-google-cloud-edgenetwork-v1/pom.xml b/java-edgenetwork/grpc-google-cloud-edgenetwork-v1/pom.xml new file mode 100644 index 000000000000..f8908a4426fe --- /dev/null +++ b/java-edgenetwork/grpc-google-cloud-edgenetwork-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-edgenetwork-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-edgenetwork-v1 + GRPC library for google-cloud-edgenetwork + + com.google.cloud + google-cloud-edgenetwork-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-edgenetwork-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-edgenetwork/grpc-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkGrpc.java b/java-edgenetwork/grpc-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkGrpc.java new file mode 100644 index 000000000000..350541417043 --- /dev/null +++ b/java-edgenetwork/grpc-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/EdgeNetworkGrpc.java @@ -0,0 +1,3311 @@ +/* + * 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.edgenetwork.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * EdgeNetwork API provides managed, highly available cloud dynamic network
+ * configuration service to the GEC customer to enable edge application and
+ * network function solutions. This allows the customers to easily define and
+ * configure the network setup and property to meet the workload requirement.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/edgenetwork/v1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class EdgeNetworkGrpc { + + private EdgeNetworkGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.edgenetwork.v1.EdgeNetwork"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.InitializeZoneRequest, + com.google.cloud.edgenetwork.v1.InitializeZoneResponse> + getInitializeZoneMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InitializeZone", + requestType = com.google.cloud.edgenetwork.v1.InitializeZoneRequest.class, + responseType = com.google.cloud.edgenetwork.v1.InitializeZoneResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.InitializeZoneRequest, + com.google.cloud.edgenetwork.v1.InitializeZoneResponse> + getInitializeZoneMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.InitializeZoneRequest, + com.google.cloud.edgenetwork.v1.InitializeZoneResponse> + getInitializeZoneMethod; + if ((getInitializeZoneMethod = EdgeNetworkGrpc.getInitializeZoneMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getInitializeZoneMethod = EdgeNetworkGrpc.getInitializeZoneMethod) == null) { + EdgeNetworkGrpc.getInitializeZoneMethod = + getInitializeZoneMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "InitializeZone")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.InitializeZoneRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.InitializeZoneResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("InitializeZone")) + .build(); + } + } + } + return getInitializeZoneMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListZonesRequest, + com.google.cloud.edgenetwork.v1.ListZonesResponse> + getListZonesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListZones", + requestType = com.google.cloud.edgenetwork.v1.ListZonesRequest.class, + responseType = com.google.cloud.edgenetwork.v1.ListZonesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListZonesRequest, + com.google.cloud.edgenetwork.v1.ListZonesResponse> + getListZonesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListZonesRequest, + com.google.cloud.edgenetwork.v1.ListZonesResponse> + getListZonesMethod; + if ((getListZonesMethod = EdgeNetworkGrpc.getListZonesMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getListZonesMethod = EdgeNetworkGrpc.getListZonesMethod) == null) { + EdgeNetworkGrpc.getListZonesMethod = + getListZonesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListZones")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListZonesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListZonesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("ListZones")) + .build(); + } + } + } + return getListZonesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetZoneRequest, com.google.cloud.edgenetwork.v1.Zone> + getGetZoneMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetZone", + requestType = com.google.cloud.edgenetwork.v1.GetZoneRequest.class, + responseType = com.google.cloud.edgenetwork.v1.Zone.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetZoneRequest, com.google.cloud.edgenetwork.v1.Zone> + getGetZoneMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetZoneRequest, com.google.cloud.edgenetwork.v1.Zone> + getGetZoneMethod; + if ((getGetZoneMethod = EdgeNetworkGrpc.getGetZoneMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getGetZoneMethod = EdgeNetworkGrpc.getGetZoneMethod) == null) { + EdgeNetworkGrpc.getGetZoneMethod = + getGetZoneMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetZone")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.GetZoneRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.Zone.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("GetZone")) + .build(); + } + } + } + return getGetZoneMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListNetworksRequest, + com.google.cloud.edgenetwork.v1.ListNetworksResponse> + getListNetworksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNetworks", + requestType = com.google.cloud.edgenetwork.v1.ListNetworksRequest.class, + responseType = com.google.cloud.edgenetwork.v1.ListNetworksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListNetworksRequest, + com.google.cloud.edgenetwork.v1.ListNetworksResponse> + getListNetworksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListNetworksRequest, + com.google.cloud.edgenetwork.v1.ListNetworksResponse> + getListNetworksMethod; + if ((getListNetworksMethod = EdgeNetworkGrpc.getListNetworksMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getListNetworksMethod = EdgeNetworkGrpc.getListNetworksMethod) == null) { + EdgeNetworkGrpc.getListNetworksMethod = + getListNetworksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNetworks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListNetworksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListNetworksResponse + .getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("ListNetworks")) + .build(); + } + } + } + return getListNetworksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetNetworkRequest, + com.google.cloud.edgenetwork.v1.Network> + getGetNetworkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNetwork", + requestType = com.google.cloud.edgenetwork.v1.GetNetworkRequest.class, + responseType = com.google.cloud.edgenetwork.v1.Network.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetNetworkRequest, + com.google.cloud.edgenetwork.v1.Network> + getGetNetworkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetNetworkRequest, + com.google.cloud.edgenetwork.v1.Network> + getGetNetworkMethod; + if ((getGetNetworkMethod = EdgeNetworkGrpc.getGetNetworkMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getGetNetworkMethod = EdgeNetworkGrpc.getGetNetworkMethod) == null) { + EdgeNetworkGrpc.getGetNetworkMethod = + getGetNetworkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNetwork")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.GetNetworkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.Network.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("GetNetwork")) + .build(); + } + } + } + return getGetNetworkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse> + getDiagnoseNetworkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DiagnoseNetwork", + requestType = com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.class, + responseType = com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse> + getDiagnoseNetworkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse> + getDiagnoseNetworkMethod; + if ((getDiagnoseNetworkMethod = EdgeNetworkGrpc.getDiagnoseNetworkMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDiagnoseNetworkMethod = EdgeNetworkGrpc.getDiagnoseNetworkMethod) == null) { + EdgeNetworkGrpc.getDiagnoseNetworkMethod = + getDiagnoseNetworkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DiagnoseNetwork")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("DiagnoseNetwork")) + .build(); + } + } + } + return getDiagnoseNetworkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateNetworkRequest, com.google.longrunning.Operation> + getCreateNetworkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNetwork", + requestType = com.google.cloud.edgenetwork.v1.CreateNetworkRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateNetworkRequest, com.google.longrunning.Operation> + getCreateNetworkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateNetworkRequest, com.google.longrunning.Operation> + getCreateNetworkMethod; + if ((getCreateNetworkMethod = EdgeNetworkGrpc.getCreateNetworkMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getCreateNetworkMethod = EdgeNetworkGrpc.getCreateNetworkMethod) == null) { + EdgeNetworkGrpc.getCreateNetworkMethod = + getCreateNetworkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNetwork")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.CreateNetworkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("CreateNetwork")) + .build(); + } + } + } + return getCreateNetworkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest, com.google.longrunning.Operation> + getDeleteNetworkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNetwork", + requestType = com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest, com.google.longrunning.Operation> + getDeleteNetworkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest, com.google.longrunning.Operation> + getDeleteNetworkMethod; + if ((getDeleteNetworkMethod = EdgeNetworkGrpc.getDeleteNetworkMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDeleteNetworkMethod = EdgeNetworkGrpc.getDeleteNetworkMethod) == null) { + EdgeNetworkGrpc.getDeleteNetworkMethod = + getDeleteNetworkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNetwork")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("DeleteNetwork")) + .build(); + } + } + } + return getDeleteNetworkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListSubnetsRequest, + com.google.cloud.edgenetwork.v1.ListSubnetsResponse> + getListSubnetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSubnets", + requestType = com.google.cloud.edgenetwork.v1.ListSubnetsRequest.class, + responseType = com.google.cloud.edgenetwork.v1.ListSubnetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListSubnetsRequest, + com.google.cloud.edgenetwork.v1.ListSubnetsResponse> + getListSubnetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListSubnetsRequest, + com.google.cloud.edgenetwork.v1.ListSubnetsResponse> + getListSubnetsMethod; + if ((getListSubnetsMethod = EdgeNetworkGrpc.getListSubnetsMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getListSubnetsMethod = EdgeNetworkGrpc.getListSubnetsMethod) == null) { + EdgeNetworkGrpc.getListSubnetsMethod = + getListSubnetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubnets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListSubnetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListSubnetsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("ListSubnets")) + .build(); + } + } + } + return getListSubnetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetSubnetRequest, com.google.cloud.edgenetwork.v1.Subnet> + getGetSubnetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSubnet", + requestType = com.google.cloud.edgenetwork.v1.GetSubnetRequest.class, + responseType = com.google.cloud.edgenetwork.v1.Subnet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetSubnetRequest, com.google.cloud.edgenetwork.v1.Subnet> + getGetSubnetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetSubnetRequest, + com.google.cloud.edgenetwork.v1.Subnet> + getGetSubnetMethod; + if ((getGetSubnetMethod = EdgeNetworkGrpc.getGetSubnetMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getGetSubnetMethod = EdgeNetworkGrpc.getGetSubnetMethod) == null) { + EdgeNetworkGrpc.getGetSubnetMethod = + getGetSubnetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubnet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.GetSubnetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("GetSubnet")) + .build(); + } + } + } + return getGetSubnetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateSubnetRequest, com.google.longrunning.Operation> + getCreateSubnetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSubnet", + requestType = com.google.cloud.edgenetwork.v1.CreateSubnetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateSubnetRequest, com.google.longrunning.Operation> + getCreateSubnetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateSubnetRequest, com.google.longrunning.Operation> + getCreateSubnetMethod; + if ((getCreateSubnetMethod = EdgeNetworkGrpc.getCreateSubnetMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getCreateSubnetMethod = EdgeNetworkGrpc.getCreateSubnetMethod) == null) { + EdgeNetworkGrpc.getCreateSubnetMethod = + getCreateSubnetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubnet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.CreateSubnetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("CreateSubnet")) + .build(); + } + } + } + return getCreateSubnetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest, com.google.longrunning.Operation> + getUpdateSubnetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSubnet", + requestType = com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest, com.google.longrunning.Operation> + getUpdateSubnetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest, com.google.longrunning.Operation> + getUpdateSubnetMethod; + if ((getUpdateSubnetMethod = EdgeNetworkGrpc.getUpdateSubnetMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getUpdateSubnetMethod = EdgeNetworkGrpc.getUpdateSubnetMethod) == null) { + EdgeNetworkGrpc.getUpdateSubnetMethod = + getUpdateSubnetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubnet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("UpdateSubnet")) + .build(); + } + } + } + return getUpdateSubnetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest, com.google.longrunning.Operation> + getDeleteSubnetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSubnet", + requestType = com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest, com.google.longrunning.Operation> + getDeleteSubnetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest, com.google.longrunning.Operation> + getDeleteSubnetMethod; + if ((getDeleteSubnetMethod = EdgeNetworkGrpc.getDeleteSubnetMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDeleteSubnetMethod = EdgeNetworkGrpc.getDeleteSubnetMethod) == null) { + EdgeNetworkGrpc.getDeleteSubnetMethod = + getDeleteSubnetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubnet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("DeleteSubnet")) + .build(); + } + } + } + return getDeleteSubnetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse> + getListInterconnectsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInterconnects", + requestType = com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.class, + responseType = com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse> + getListInterconnectsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse> + getListInterconnectsMethod; + if ((getListInterconnectsMethod = EdgeNetworkGrpc.getListInterconnectsMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getListInterconnectsMethod = EdgeNetworkGrpc.getListInterconnectsMethod) == null) { + EdgeNetworkGrpc.getListInterconnectsMethod = + getListInterconnectsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInterconnects")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("ListInterconnects")) + .build(); + } + } + } + return getListInterconnectsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetInterconnectRequest, + com.google.cloud.edgenetwork.v1.Interconnect> + getGetInterconnectMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInterconnect", + requestType = com.google.cloud.edgenetwork.v1.GetInterconnectRequest.class, + responseType = com.google.cloud.edgenetwork.v1.Interconnect.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetInterconnectRequest, + com.google.cloud.edgenetwork.v1.Interconnect> + getGetInterconnectMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetInterconnectRequest, + com.google.cloud.edgenetwork.v1.Interconnect> + getGetInterconnectMethod; + if ((getGetInterconnectMethod = EdgeNetworkGrpc.getGetInterconnectMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getGetInterconnectMethod = EdgeNetworkGrpc.getGetInterconnectMethod) == null) { + EdgeNetworkGrpc.getGetInterconnectMethod = + getGetInterconnectMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInterconnect")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.GetInterconnectRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.Interconnect.getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("GetInterconnect")) + .build(); + } + } + } + return getGetInterconnectMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse> + getDiagnoseInterconnectMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DiagnoseInterconnect", + requestType = com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.class, + responseType = com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse> + getDiagnoseInterconnectMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse> + getDiagnoseInterconnectMethod; + if ((getDiagnoseInterconnectMethod = EdgeNetworkGrpc.getDiagnoseInterconnectMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDiagnoseInterconnectMethod = EdgeNetworkGrpc.getDiagnoseInterconnectMethod) + == null) { + EdgeNetworkGrpc.getDiagnoseInterconnectMethod = + getDiagnoseInterconnectMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DiagnoseInterconnect")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("DiagnoseInterconnect")) + .build(); + } + } + } + return getDiagnoseInterconnectMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse> + getListInterconnectAttachmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInterconnectAttachments", + requestType = com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest.class, + responseType = com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse> + getListInterconnectAttachmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse> + getListInterconnectAttachmentsMethod; + if ((getListInterconnectAttachmentsMethod = + EdgeNetworkGrpc.getListInterconnectAttachmentsMethod) + == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getListInterconnectAttachmentsMethod = + EdgeNetworkGrpc.getListInterconnectAttachmentsMethod) + == null) { + EdgeNetworkGrpc.getListInterconnectAttachmentsMethod = + getListInterconnectAttachmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListInterconnectAttachments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("ListInterconnectAttachments")) + .build(); + } + } + } + return getListInterconnectAttachmentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest, + com.google.cloud.edgenetwork.v1.InterconnectAttachment> + getGetInterconnectAttachmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInterconnectAttachment", + requestType = com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.class, + responseType = com.google.cloud.edgenetwork.v1.InterconnectAttachment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest, + com.google.cloud.edgenetwork.v1.InterconnectAttachment> + getGetInterconnectAttachmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest, + com.google.cloud.edgenetwork.v1.InterconnectAttachment> + getGetInterconnectAttachmentMethod; + if ((getGetInterconnectAttachmentMethod = EdgeNetworkGrpc.getGetInterconnectAttachmentMethod) + == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getGetInterconnectAttachmentMethod = + EdgeNetworkGrpc.getGetInterconnectAttachmentMethod) + == null) { + EdgeNetworkGrpc.getGetInterconnectAttachmentMethod = + getGetInterconnectAttachmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetInterconnectAttachment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.InterconnectAttachment + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("GetInterconnectAttachment")) + .build(); + } + } + } + return getGetInterconnectAttachmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest, + com.google.longrunning.Operation> + getCreateInterconnectAttachmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInterconnectAttachment", + requestType = com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest, + com.google.longrunning.Operation> + getCreateInterconnectAttachmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest, + com.google.longrunning.Operation> + getCreateInterconnectAttachmentMethod; + if ((getCreateInterconnectAttachmentMethod = + EdgeNetworkGrpc.getCreateInterconnectAttachmentMethod) + == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getCreateInterconnectAttachmentMethod = + EdgeNetworkGrpc.getCreateInterconnectAttachmentMethod) + == null) { + EdgeNetworkGrpc.getCreateInterconnectAttachmentMethod = + getCreateInterconnectAttachmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateInterconnectAttachment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("CreateInterconnectAttachment")) + .build(); + } + } + } + return getCreateInterconnectAttachmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest, + com.google.longrunning.Operation> + getDeleteInterconnectAttachmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInterconnectAttachment", + requestType = com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest, + com.google.longrunning.Operation> + getDeleteInterconnectAttachmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest, + com.google.longrunning.Operation> + getDeleteInterconnectAttachmentMethod; + if ((getDeleteInterconnectAttachmentMethod = + EdgeNetworkGrpc.getDeleteInterconnectAttachmentMethod) + == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDeleteInterconnectAttachmentMethod = + EdgeNetworkGrpc.getDeleteInterconnectAttachmentMethod) + == null) { + EdgeNetworkGrpc.getDeleteInterconnectAttachmentMethod = + getDeleteInterconnectAttachmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteInterconnectAttachment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("DeleteInterconnectAttachment")) + .build(); + } + } + } + return getDeleteInterconnectAttachmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListRoutersRequest, + com.google.cloud.edgenetwork.v1.ListRoutersResponse> + getListRoutersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRouters", + requestType = com.google.cloud.edgenetwork.v1.ListRoutersRequest.class, + responseType = com.google.cloud.edgenetwork.v1.ListRoutersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListRoutersRequest, + com.google.cloud.edgenetwork.v1.ListRoutersResponse> + getListRoutersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.ListRoutersRequest, + com.google.cloud.edgenetwork.v1.ListRoutersResponse> + getListRoutersMethod; + if ((getListRoutersMethod = EdgeNetworkGrpc.getListRoutersMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getListRoutersMethod = EdgeNetworkGrpc.getListRoutersMethod) == null) { + EdgeNetworkGrpc.getListRoutersMethod = + getListRoutersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRouters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListRoutersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.ListRoutersResponse + .getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("ListRouters")) + .build(); + } + } + } + return getListRoutersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetRouterRequest, com.google.cloud.edgenetwork.v1.Router> + getGetRouterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRouter", + requestType = com.google.cloud.edgenetwork.v1.GetRouterRequest.class, + responseType = com.google.cloud.edgenetwork.v1.Router.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetRouterRequest, com.google.cloud.edgenetwork.v1.Router> + getGetRouterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.GetRouterRequest, + com.google.cloud.edgenetwork.v1.Router> + getGetRouterMethod; + if ((getGetRouterMethod = EdgeNetworkGrpc.getGetRouterMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getGetRouterMethod = EdgeNetworkGrpc.getGetRouterMethod) == null) { + EdgeNetworkGrpc.getGetRouterMethod = + getGetRouterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRouter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.GetRouterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.Router.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("GetRouter")) + .build(); + } + } + } + return getGetRouterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest, + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse> + getDiagnoseRouterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DiagnoseRouter", + requestType = com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.class, + responseType = com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest, + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse> + getDiagnoseRouterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest, + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse> + getDiagnoseRouterMethod; + if ((getDiagnoseRouterMethod = EdgeNetworkGrpc.getDiagnoseRouterMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDiagnoseRouterMethod = EdgeNetworkGrpc.getDiagnoseRouterMethod) == null) { + EdgeNetworkGrpc.getDiagnoseRouterMethod = + getDiagnoseRouterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DiagnoseRouter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EdgeNetworkMethodDescriptorSupplier("DiagnoseRouter")) + .build(); + } + } + } + return getDiagnoseRouterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateRouterRequest, com.google.longrunning.Operation> + getCreateRouterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRouter", + requestType = com.google.cloud.edgenetwork.v1.CreateRouterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateRouterRequest, com.google.longrunning.Operation> + getCreateRouterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.CreateRouterRequest, com.google.longrunning.Operation> + getCreateRouterMethod; + if ((getCreateRouterMethod = EdgeNetworkGrpc.getCreateRouterMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getCreateRouterMethod = EdgeNetworkGrpc.getCreateRouterMethod) == null) { + EdgeNetworkGrpc.getCreateRouterMethod = + getCreateRouterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRouter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.CreateRouterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("CreateRouter")) + .build(); + } + } + } + return getCreateRouterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.UpdateRouterRequest, com.google.longrunning.Operation> + getUpdateRouterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateRouter", + requestType = com.google.cloud.edgenetwork.v1.UpdateRouterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.UpdateRouterRequest, com.google.longrunning.Operation> + getUpdateRouterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.UpdateRouterRequest, com.google.longrunning.Operation> + getUpdateRouterMethod; + if ((getUpdateRouterMethod = EdgeNetworkGrpc.getUpdateRouterMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getUpdateRouterMethod = EdgeNetworkGrpc.getUpdateRouterMethod) == null) { + EdgeNetworkGrpc.getUpdateRouterMethod = + getUpdateRouterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateRouter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.UpdateRouterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("UpdateRouter")) + .build(); + } + } + } + return getUpdateRouterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteRouterRequest, com.google.longrunning.Operation> + getDeleteRouterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRouter", + requestType = com.google.cloud.edgenetwork.v1.DeleteRouterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteRouterRequest, com.google.longrunning.Operation> + getDeleteRouterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.edgenetwork.v1.DeleteRouterRequest, com.google.longrunning.Operation> + getDeleteRouterMethod; + if ((getDeleteRouterMethod = EdgeNetworkGrpc.getDeleteRouterMethod) == null) { + synchronized (EdgeNetworkGrpc.class) { + if ((getDeleteRouterMethod = EdgeNetworkGrpc.getDeleteRouterMethod) == null) { + EdgeNetworkGrpc.getDeleteRouterMethod = + getDeleteRouterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRouter")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.edgenetwork.v1.DeleteRouterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EdgeNetworkMethodDescriptorSupplier("DeleteRouter")) + .build(); + } + } + } + return getDeleteRouterMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EdgeNetworkStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EdgeNetworkStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EdgeNetworkStub(channel, callOptions); + } + }; + return EdgeNetworkStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EdgeNetworkBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EdgeNetworkBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EdgeNetworkBlockingStub(channel, callOptions); + } + }; + return EdgeNetworkBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EdgeNetworkFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EdgeNetworkFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EdgeNetworkFutureStub(channel, callOptions); + } + }; + return EdgeNetworkFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * EdgeNetwork API provides managed, highly available cloud dynamic network
+   * configuration service to the GEC customer to enable edge application and
+   * network function solutions. This allows the customers to easily define and
+   * configure the network setup and property to meet the workload requirement.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * InitializeZone will initialize resources for a zone in a project.
+     * 
+ */ + default void initializeZone( + com.google.cloud.edgenetwork.v1.InitializeZoneRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getInitializeZoneMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Zones in a given project and location.
+     * 
+ */ + default void listZones( + com.google.cloud.edgenetwork.v1.ListZonesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListZonesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Zone.
+     * 
+ */ + default void getZone( + com.google.cloud.edgenetwork.v1.GetZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetZoneMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Networks in a given project and location.
+     * 
+ */ + default void listNetworks( + com.google.cloud.edgenetwork.v1.ListNetworksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNetworksMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Network.
+     * 
+ */ + default void getNetwork( + com.google.cloud.edgenetwork.v1.GetNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNetworkMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the diagnostics of a single network resource.
+     * 
+ */ + default void diagnoseNetwork( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDiagnoseNetworkMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Network in a given project and location.
+     * 
+ */ + default void createNetwork( + com.google.cloud.edgenetwork.v1.CreateNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNetworkMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Network.
+     * 
+ */ + default void deleteNetwork( + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNetworkMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Subnets in a given project and location.
+     * 
+ */ + default void listSubnets( + com.google.cloud.edgenetwork.v1.ListSubnetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSubnetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Subnet.
+     * 
+ */ + default void getSubnet( + com.google.cloud.edgenetwork.v1.GetSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubnetMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Subnet in a given project and location.
+     * 
+ */ + default void createSubnet( + com.google.cloud.edgenetwork.v1.CreateSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSubnetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Subnet.
+     * 
+ */ + default void updateSubnet( + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSubnetMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Subnet.
+     * 
+ */ + default void deleteSubnet( + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSubnetMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Interconnects in a given project and location.
+     * 
+ */ + default void listInterconnects( + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInterconnectsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Interconnect.
+     * 
+ */ + default void getInterconnect( + com.google.cloud.edgenetwork.v1.GetInterconnectRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInterconnectMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the diagnostics of a single interconnect resource.
+     * 
+ */ + default void diagnoseInterconnect( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDiagnoseInterconnectMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists InterconnectAttachments in a given project and location.
+     * 
+ */ + default void listInterconnectAttachments( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInterconnectAttachmentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single InterconnectAttachment.
+     * 
+ */ + default void getInterconnectAttachment( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInterconnectAttachmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new InterconnectAttachment in a given project and location.
+     * 
+ */ + default void createInterconnectAttachment( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInterconnectAttachmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single InterconnectAttachment.
+     * 
+ */ + default void deleteInterconnectAttachment( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInterconnectAttachmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Routers in a given project and location.
+     * 
+ */ + default void listRouters( + com.google.cloud.edgenetwork.v1.ListRoutersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRoutersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Router.
+     * 
+ */ + default void getRouter( + com.google.cloud.edgenetwork.v1.GetRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRouterMethod(), responseObserver); + } + + /** + * + * + *
+     * Get the diagnostics of a single router resource.
+     * 
+ */ + default void diagnoseRouter( + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDiagnoseRouterMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Router in a given project and location.
+     * 
+ */ + default void createRouter( + com.google.cloud.edgenetwork.v1.CreateRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRouterMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Router.
+     * 
+ */ + default void updateRouter( + com.google.cloud.edgenetwork.v1.UpdateRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateRouterMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Router.
+     * 
+ */ + default void deleteRouter( + com.google.cloud.edgenetwork.v1.DeleteRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRouterMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service EdgeNetwork. + * + *
+   * EdgeNetwork API provides managed, highly available cloud dynamic network
+   * configuration service to the GEC customer to enable edge application and
+   * network function solutions. This allows the customers to easily define and
+   * configure the network setup and property to meet the workload requirement.
+   * 
+ */ + public abstract static class EdgeNetworkImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return EdgeNetworkGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service EdgeNetwork. + * + *
+   * EdgeNetwork API provides managed, highly available cloud dynamic network
+   * configuration service to the GEC customer to enable edge application and
+   * network function solutions. This allows the customers to easily define and
+   * configure the network setup and property to meet the workload requirement.
+   * 
+ */ + public static final class EdgeNetworkStub + extends io.grpc.stub.AbstractAsyncStub { + private EdgeNetworkStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EdgeNetworkStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EdgeNetworkStub(channel, callOptions); + } + + /** + * + * + *
+     * InitializeZone will initialize resources for a zone in a project.
+     * 
+ */ + public void initializeZone( + com.google.cloud.edgenetwork.v1.InitializeZoneRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getInitializeZoneMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Zones in a given project and location.
+     * 
+ */ + public void listZones( + com.google.cloud.edgenetwork.v1.ListZonesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListZonesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Zone.
+     * 
+ */ + public void getZone( + com.google.cloud.edgenetwork.v1.GetZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetZoneMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists Networks in a given project and location.
+     * 
+ */ + public void listNetworks( + com.google.cloud.edgenetwork.v1.ListNetworksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNetworksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Network.
+     * 
+ */ + public void getNetwork( + com.google.cloud.edgenetwork.v1.GetNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNetworkMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Get the diagnostics of a single network resource.
+     * 
+ */ + public void diagnoseNetwork( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDiagnoseNetworkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Network in a given project and location.
+     * 
+ */ + public void createNetwork( + com.google.cloud.edgenetwork.v1.CreateNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNetworkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Network.
+     * 
+ */ + public void deleteNetwork( + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNetworkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Subnets in a given project and location.
+     * 
+ */ + public void listSubnets( + com.google.cloud.edgenetwork.v1.ListSubnetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSubnetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Subnet.
+     * 
+ */ + public void getSubnet( + com.google.cloud.edgenetwork.v1.GetSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSubnetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Subnet in a given project and location.
+     * 
+ */ + public void createSubnet( + com.google.cloud.edgenetwork.v1.CreateSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSubnetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Subnet.
+     * 
+ */ + public void updateSubnet( + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSubnetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Subnet.
+     * 
+ */ + public void deleteSubnet( + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSubnetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Interconnects in a given project and location.
+     * 
+ */ + public void listInterconnects( + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInterconnectsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Interconnect.
+     * 
+ */ + public void getInterconnect( + com.google.cloud.edgenetwork.v1.GetInterconnectRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInterconnectMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get the diagnostics of a single interconnect resource.
+     * 
+ */ + public void diagnoseInterconnect( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDiagnoseInterconnectMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists InterconnectAttachments in a given project and location.
+     * 
+ */ + public void listInterconnectAttachments( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInterconnectAttachmentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single InterconnectAttachment.
+     * 
+ */ + public void getInterconnectAttachment( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInterconnectAttachmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new InterconnectAttachment in a given project and location.
+     * 
+ */ + public void createInterconnectAttachment( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInterconnectAttachmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single InterconnectAttachment.
+     * 
+ */ + public void deleteInterconnectAttachment( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInterconnectAttachmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Routers in a given project and location.
+     * 
+ */ + public void listRouters( + com.google.cloud.edgenetwork.v1.ListRoutersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRoutersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Router.
+     * 
+ */ + public void getRouter( + com.google.cloud.edgenetwork.v1.GetRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRouterMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Get the diagnostics of a single router resource.
+     * 
+ */ + public void diagnoseRouter( + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDiagnoseRouterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Router in a given project and location.
+     * 
+ */ + public void createRouter( + com.google.cloud.edgenetwork.v1.CreateRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRouterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Router.
+     * 
+ */ + public void updateRouter( + com.google.cloud.edgenetwork.v1.UpdateRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateRouterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Router.
+     * 
+ */ + public void deleteRouter( + com.google.cloud.edgenetwork.v1.DeleteRouterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRouterMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service EdgeNetwork. + * + *
+   * EdgeNetwork API provides managed, highly available cloud dynamic network
+   * configuration service to the GEC customer to enable edge application and
+   * network function solutions. This allows the customers to easily define and
+   * configure the network setup and property to meet the workload requirement.
+   * 
+ */ + public static final class EdgeNetworkBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EdgeNetworkBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EdgeNetworkBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EdgeNetworkBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * InitializeZone will initialize resources for a zone in a project.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.InitializeZoneResponse initializeZone( + com.google.cloud.edgenetwork.v1.InitializeZoneRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getInitializeZoneMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Zones in a given project and location.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.ListZonesResponse listZones( + com.google.cloud.edgenetwork.v1.ListZonesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListZonesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Zone.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.Zone getZone( + com.google.cloud.edgenetwork.v1.GetZoneRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetZoneMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Networks in a given project and location.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.ListNetworksResponse listNetworks( + com.google.cloud.edgenetwork.v1.ListNetworksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNetworksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Network.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.Network getNetwork( + com.google.cloud.edgenetwork.v1.GetNetworkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNetworkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the diagnostics of a single network resource.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse diagnoseNetwork( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDiagnoseNetworkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Network in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createNetwork( + com.google.cloud.edgenetwork.v1.CreateNetworkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNetworkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Network.
+     * 
+ */ + public com.google.longrunning.Operation deleteNetwork( + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNetworkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Subnets in a given project and location.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.ListSubnetsResponse listSubnets( + com.google.cloud.edgenetwork.v1.ListSubnetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSubnetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Subnet.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.Subnet getSubnet( + com.google.cloud.edgenetwork.v1.GetSubnetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSubnetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Subnet in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createSubnet( + com.google.cloud.edgenetwork.v1.CreateSubnetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSubnetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Subnet.
+     * 
+ */ + public com.google.longrunning.Operation updateSubnet( + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSubnetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Subnet.
+     * 
+ */ + public com.google.longrunning.Operation deleteSubnet( + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSubnetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Interconnects in a given project and location.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.ListInterconnectsResponse listInterconnects( + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInterconnectsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Interconnect.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.Interconnect getInterconnect( + com.google.cloud.edgenetwork.v1.GetInterconnectRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInterconnectMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the diagnostics of a single interconnect resource.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse diagnoseInterconnect( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDiagnoseInterconnectMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists InterconnectAttachments in a given project and location.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + listInterconnectAttachments( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInterconnectAttachmentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single InterconnectAttachment.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachment( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInterconnectAttachmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new InterconnectAttachment in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createInterconnectAttachment( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInterconnectAttachmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single InterconnectAttachment.
+     * 
+ */ + public com.google.longrunning.Operation deleteInterconnectAttachment( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInterconnectAttachmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Routers in a given project and location.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.ListRoutersResponse listRouters( + com.google.cloud.edgenetwork.v1.ListRoutersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRoutersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Router.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.Router getRouter( + com.google.cloud.edgenetwork.v1.GetRouterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRouterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get the diagnostics of a single router resource.
+     * 
+ */ + public com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse diagnoseRouter( + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDiagnoseRouterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Router in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRouter( + com.google.cloud.edgenetwork.v1.CreateRouterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRouterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Router.
+     * 
+ */ + public com.google.longrunning.Operation updateRouter( + com.google.cloud.edgenetwork.v1.UpdateRouterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateRouterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Router.
+     * 
+ */ + public com.google.longrunning.Operation deleteRouter( + com.google.cloud.edgenetwork.v1.DeleteRouterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRouterMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service EdgeNetwork. + * + *
+   * EdgeNetwork API provides managed, highly available cloud dynamic network
+   * configuration service to the GEC customer to enable edge application and
+   * network function solutions. This allows the customers to easily define and
+   * configure the network setup and property to meet the workload requirement.
+   * 
+ */ + public static final class EdgeNetworkFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EdgeNetworkFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EdgeNetworkFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EdgeNetworkFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * InitializeZone will initialize resources for a zone in a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.InitializeZoneResponse> + initializeZone(com.google.cloud.edgenetwork.v1.InitializeZoneRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getInitializeZoneMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Zones in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.ListZonesResponse> + listZones(com.google.cloud.edgenetwork.v1.ListZonesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListZonesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getZone(com.google.cloud.edgenetwork.v1.GetZoneRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetZoneMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Networks in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.ListNetworksResponse> + listNetworks(com.google.cloud.edgenetwork.v1.ListNetworksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNetworksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Network.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.Network> + getNetwork(com.google.cloud.edgenetwork.v1.GetNetworkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNetworkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the diagnostics of a single network resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse> + diagnoseNetwork(com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDiagnoseNetworkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Network in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createNetwork(com.google.cloud.edgenetwork.v1.CreateNetworkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNetworkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Network.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNetwork(com.google.cloud.edgenetwork.v1.DeleteNetworkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNetworkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Subnets in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.ListSubnetsResponse> + listSubnets(com.google.cloud.edgenetwork.v1.ListSubnetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSubnetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Subnet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.Subnet> + getSubnet(com.google.cloud.edgenetwork.v1.GetSubnetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSubnetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Subnet in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSubnet(com.google.cloud.edgenetwork.v1.CreateSubnetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSubnetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Subnet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSubnet(com.google.cloud.edgenetwork.v1.UpdateSubnetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSubnetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Subnet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSubnet(com.google.cloud.edgenetwork.v1.DeleteSubnetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSubnetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Interconnects in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse> + listInterconnects(com.google.cloud.edgenetwork.v1.ListInterconnectsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInterconnectsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Interconnect.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.Interconnect> + getInterconnect(com.google.cloud.edgenetwork.v1.GetInterconnectRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInterconnectMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the diagnostics of a single interconnect resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse> + diagnoseInterconnect(com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDiagnoseInterconnectMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists InterconnectAttachments in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse> + listInterconnectAttachments( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInterconnectAttachmentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single InterconnectAttachment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.InterconnectAttachment> + getInterconnectAttachment( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInterconnectAttachmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new InterconnectAttachment in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInterconnectAttachment( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInterconnectAttachmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single InterconnectAttachment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInterconnectAttachment( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInterconnectAttachmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Routers in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.ListRoutersResponse> + listRouters(com.google.cloud.edgenetwork.v1.ListRoutersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRoutersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Router.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.Router> + getRouter(com.google.cloud.edgenetwork.v1.GetRouterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRouterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get the diagnostics of a single router resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse> + diagnoseRouter(com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDiagnoseRouterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Router in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRouter(com.google.cloud.edgenetwork.v1.CreateRouterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRouterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Router.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateRouter(com.google.cloud.edgenetwork.v1.UpdateRouterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateRouterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Router.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRouter(com.google.cloud.edgenetwork.v1.DeleteRouterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRouterMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_INITIALIZE_ZONE = 0; + private static final int METHODID_LIST_ZONES = 1; + private static final int METHODID_GET_ZONE = 2; + private static final int METHODID_LIST_NETWORKS = 3; + private static final int METHODID_GET_NETWORK = 4; + private static final int METHODID_DIAGNOSE_NETWORK = 5; + private static final int METHODID_CREATE_NETWORK = 6; + private static final int METHODID_DELETE_NETWORK = 7; + private static final int METHODID_LIST_SUBNETS = 8; + private static final int METHODID_GET_SUBNET = 9; + private static final int METHODID_CREATE_SUBNET = 10; + private static final int METHODID_UPDATE_SUBNET = 11; + private static final int METHODID_DELETE_SUBNET = 12; + private static final int METHODID_LIST_INTERCONNECTS = 13; + private static final int METHODID_GET_INTERCONNECT = 14; + private static final int METHODID_DIAGNOSE_INTERCONNECT = 15; + private static final int METHODID_LIST_INTERCONNECT_ATTACHMENTS = 16; + private static final int METHODID_GET_INTERCONNECT_ATTACHMENT = 17; + private static final int METHODID_CREATE_INTERCONNECT_ATTACHMENT = 18; + private static final int METHODID_DELETE_INTERCONNECT_ATTACHMENT = 19; + private static final int METHODID_LIST_ROUTERS = 20; + private static final int METHODID_GET_ROUTER = 21; + private static final int METHODID_DIAGNOSE_ROUTER = 22; + private static final int METHODID_CREATE_ROUTER = 23; + private static final int METHODID_UPDATE_ROUTER = 24; + private static final int METHODID_DELETE_ROUTER = 25; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_INITIALIZE_ZONE: + serviceImpl.initializeZone( + (com.google.cloud.edgenetwork.v1.InitializeZoneRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ZONES: + serviceImpl.listZones( + (com.google.cloud.edgenetwork.v1.ListZonesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ZONE: + serviceImpl.getZone( + (com.google.cloud.edgenetwork.v1.GetZoneRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NETWORKS: + serviceImpl.listNetworks( + (com.google.cloud.edgenetwork.v1.ListNetworksRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_NETWORK: + serviceImpl.getNetwork( + (com.google.cloud.edgenetwork.v1.GetNetworkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DIAGNOSE_NETWORK: + serviceImpl.diagnoseNetwork( + (com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_NETWORK: + serviceImpl.createNetwork( + (com.google.cloud.edgenetwork.v1.CreateNetworkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NETWORK: + serviceImpl.deleteNetwork( + (com.google.cloud.edgenetwork.v1.DeleteNetworkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SUBNETS: + serviceImpl.listSubnets( + (com.google.cloud.edgenetwork.v1.ListSubnetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SUBNET: + serviceImpl.getSubnet( + (com.google.cloud.edgenetwork.v1.GetSubnetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SUBNET: + serviceImpl.createSubnet( + (com.google.cloud.edgenetwork.v1.CreateSubnetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SUBNET: + serviceImpl.updateSubnet( + (com.google.cloud.edgenetwork.v1.UpdateSubnetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SUBNET: + serviceImpl.deleteSubnet( + (com.google.cloud.edgenetwork.v1.DeleteSubnetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INTERCONNECTS: + serviceImpl.listInterconnects( + (com.google.cloud.edgenetwork.v1.ListInterconnectsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse>) + responseObserver); + break; + case METHODID_GET_INTERCONNECT: + serviceImpl.getInterconnect( + (com.google.cloud.edgenetwork.v1.GetInterconnectRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DIAGNOSE_INTERCONNECT: + serviceImpl.diagnoseInterconnect( + (com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse>) + responseObserver); + break; + case METHODID_LIST_INTERCONNECT_ATTACHMENTS: + serviceImpl.listInterconnectAttachments( + (com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse>) + responseObserver); + break; + case METHODID_GET_INTERCONNECT_ATTACHMENT: + serviceImpl.getInterconnectAttachment( + (com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INTERCONNECT_ATTACHMENT: + serviceImpl.createInterconnectAttachment( + (com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INTERCONNECT_ATTACHMENT: + serviceImpl.deleteInterconnectAttachment( + (com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ROUTERS: + serviceImpl.listRouters( + (com.google.cloud.edgenetwork.v1.ListRoutersRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ROUTER: + serviceImpl.getRouter( + (com.google.cloud.edgenetwork.v1.GetRouterRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DIAGNOSE_ROUTER: + serviceImpl.diagnoseRouter( + (com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ROUTER: + serviceImpl.createRouter( + (com.google.cloud.edgenetwork.v1.CreateRouterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ROUTER: + serviceImpl.updateRouter( + (com.google.cloud.edgenetwork.v1.UpdateRouterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ROUTER: + serviceImpl.deleteRouter( + (com.google.cloud.edgenetwork.v1.DeleteRouterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getInitializeZoneMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.InitializeZoneRequest, + com.google.cloud.edgenetwork.v1.InitializeZoneResponse>( + service, METHODID_INITIALIZE_ZONE))) + .addMethod( + getListZonesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.ListZonesRequest, + com.google.cloud.edgenetwork.v1.ListZonesResponse>( + service, METHODID_LIST_ZONES))) + .addMethod( + getGetZoneMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.GetZoneRequest, + com.google.cloud.edgenetwork.v1.Zone>(service, METHODID_GET_ZONE))) + .addMethod( + getListNetworksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.ListNetworksRequest, + com.google.cloud.edgenetwork.v1.ListNetworksResponse>( + service, METHODID_LIST_NETWORKS))) + .addMethod( + getGetNetworkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.GetNetworkRequest, + com.google.cloud.edgenetwork.v1.Network>(service, METHODID_GET_NETWORK))) + .addMethod( + getDiagnoseNetworkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse>( + service, METHODID_DIAGNOSE_NETWORK))) + .addMethod( + getCreateNetworkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.CreateNetworkRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_NETWORK))) + .addMethod( + getDeleteNetworkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_NETWORK))) + .addMethod( + getListSubnetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.ListSubnetsRequest, + com.google.cloud.edgenetwork.v1.ListSubnetsResponse>( + service, METHODID_LIST_SUBNETS))) + .addMethod( + getGetSubnetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.GetSubnetRequest, + com.google.cloud.edgenetwork.v1.Subnet>(service, METHODID_GET_SUBNET))) + .addMethod( + getCreateSubnetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.CreateSubnetRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SUBNET))) + .addMethod( + getUpdateSubnetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SUBNET))) + .addMethod( + getDeleteSubnetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SUBNET))) + .addMethod( + getListInterconnectsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse>( + service, METHODID_LIST_INTERCONNECTS))) + .addMethod( + getGetInterconnectMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.GetInterconnectRequest, + com.google.cloud.edgenetwork.v1.Interconnect>( + service, METHODID_GET_INTERCONNECT))) + .addMethod( + getDiagnoseInterconnectMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse>( + service, METHODID_DIAGNOSE_INTERCONNECT))) + .addMethod( + getListInterconnectAttachmentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse>( + service, METHODID_LIST_INTERCONNECT_ATTACHMENTS))) + .addMethod( + getGetInterconnectAttachmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest, + com.google.cloud.edgenetwork.v1.InterconnectAttachment>( + service, METHODID_GET_INTERCONNECT_ATTACHMENT))) + .addMethod( + getCreateInterconnectAttachmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_INTERCONNECT_ATTACHMENT))) + .addMethod( + getDeleteInterconnectAttachmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_INTERCONNECT_ATTACHMENT))) + .addMethod( + getListRoutersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.ListRoutersRequest, + com.google.cloud.edgenetwork.v1.ListRoutersResponse>( + service, METHODID_LIST_ROUTERS))) + .addMethod( + getGetRouterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.GetRouterRequest, + com.google.cloud.edgenetwork.v1.Router>(service, METHODID_GET_ROUTER))) + .addMethod( + getDiagnoseRouterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest, + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse>( + service, METHODID_DIAGNOSE_ROUTER))) + .addMethod( + getCreateRouterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.CreateRouterRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_ROUTER))) + .addMethod( + getUpdateRouterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.UpdateRouterRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_ROUTER))) + .addMethod( + getDeleteRouterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.edgenetwork.v1.DeleteRouterRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_ROUTER))) + .build(); + } + + private abstract static class EdgeNetworkBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EdgeNetworkBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("EdgeNetwork"); + } + } + + private static final class EdgeNetworkFileDescriptorSupplier + extends EdgeNetworkBaseDescriptorSupplier { + EdgeNetworkFileDescriptorSupplier() {} + } + + private static final class EdgeNetworkMethodDescriptorSupplier + extends EdgeNetworkBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + EdgeNetworkMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EdgeNetworkGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EdgeNetworkFileDescriptorSupplier()) + .addMethod(getInitializeZoneMethod()) + .addMethod(getListZonesMethod()) + .addMethod(getGetZoneMethod()) + .addMethod(getListNetworksMethod()) + .addMethod(getGetNetworkMethod()) + .addMethod(getDiagnoseNetworkMethod()) + .addMethod(getCreateNetworkMethod()) + .addMethod(getDeleteNetworkMethod()) + .addMethod(getListSubnetsMethod()) + .addMethod(getGetSubnetMethod()) + .addMethod(getCreateSubnetMethod()) + .addMethod(getUpdateSubnetMethod()) + .addMethod(getDeleteSubnetMethod()) + .addMethod(getListInterconnectsMethod()) + .addMethod(getGetInterconnectMethod()) + .addMethod(getDiagnoseInterconnectMethod()) + .addMethod(getListInterconnectAttachmentsMethod()) + .addMethod(getGetInterconnectAttachmentMethod()) + .addMethod(getCreateInterconnectAttachmentMethod()) + .addMethod(getDeleteInterconnectAttachmentMethod()) + .addMethod(getListRoutersMethod()) + .addMethod(getGetRouterMethod()) + .addMethod(getDiagnoseRouterMethod()) + .addMethod(getCreateRouterMethod()) + .addMethod(getUpdateRouterMethod()) + .addMethod(getDeleteRouterMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-edgenetwork/owlbot.py b/java-edgenetwork/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-edgenetwork/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2021 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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-edgenetwork/pom.xml b/java-edgenetwork/pom.xml new file mode 100644 index 000000000000..fa458c2ac188 --- /dev/null +++ b/java-edgenetwork/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.google.cloud + google-cloud-edgenetwork-parent + pom + 0.0.1-SNAPSHOT + Google Distributed Cloud Edge Network API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.26.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-edgenetwork-parent + + + + + + com.google.cloud + google-cloud-edgenetwork + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-edgenetwork-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-edgenetwork-v1 + 0.0.1-SNAPSHOT + + + + + + google-cloud-edgenetwork + grpc-google-cloud-edgenetwork-v1 + proto-google-cloud-edgenetwork-v1 + google-cloud-edgenetwork-bom + + diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/clirr-ignored-differences.xml b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..6f5d1ee30539 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/edgenetwork/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/edgenetwork/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/edgenetwork/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/pom.xml b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/pom.xml new file mode 100644 index 000000000000..c6ee751c6f64 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-edgenetwork-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-edgenetwork-v1 + Proto library for google-cloud-edgenetwork + + com.google.cloud + google-cloud-edgenetwork-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequest.java new file mode 100644 index 000000000000..cad6d7f9d5e2 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequest.java @@ -0,0 +1,1415 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for creating a InterconnectAttachment
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest} + */ +public final class CreateInterconnectAttachmentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) + CreateInterconnectAttachmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInterconnectAttachmentRequest.newBuilder() to construct. + private CreateInterconnectAttachmentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInterconnectAttachmentRequest() { + parent_ = ""; + interconnectAttachmentId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInterconnectAttachmentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest.class, + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 INTERCONNECT_ATTACHMENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object interconnectAttachmentId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * interconnect_attachment_id from the method_signature of Create RPC
+   * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The interconnectAttachmentId. + */ + @java.lang.Override + public java.lang.String getInterconnectAttachmentId() { + java.lang.Object ref = interconnectAttachmentId_; + 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(); + interconnectAttachmentId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * interconnect_attachment_id from the method_signature of Create RPC
+   * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for interconnectAttachmentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterconnectAttachmentIdBytes() { + java.lang.Object ref = interconnectAttachmentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interconnectAttachmentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERCONNECT_ATTACHMENT_FIELD_NUMBER = 3; + private com.google.cloud.edgenetwork.v1.InterconnectAttachment interconnectAttachment_; + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interconnectAttachment field is set. + */ + @java.lang.Override + public boolean hasInterconnectAttachment() { + return interconnectAttachment_ != null; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interconnectAttachment. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachment() { + return interconnectAttachment_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance() + : interconnectAttachment_; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder + getInterconnectAttachmentOrBuilder() { + return interconnectAttachment_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance() + : interconnectAttachment_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interconnectAttachmentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, interconnectAttachmentId_); + } + if (interconnectAttachment_ != null) { + output.writeMessage(3, getInterconnectAttachment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interconnectAttachmentId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, interconnectAttachmentId_); + } + if (interconnectAttachment_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInterconnectAttachment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, 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.edgenetwork.v1.CreateInterconnectAttachmentRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest other = + (com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInterconnectAttachmentId().equals(other.getInterconnectAttachmentId())) return false; + if (hasInterconnectAttachment() != other.hasInterconnectAttachment()) return false; + if (hasInterconnectAttachment()) { + if (!getInterconnectAttachment().equals(other.getInterconnectAttachment())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INTERCONNECT_ATTACHMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getInterconnectAttachmentId().hashCode(); + if (hasInterconnectAttachment()) { + hash = (37 * hash) + INTERCONNECT_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getInterconnectAttachment().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.edgenetwork.v1.CreateInterconnectAttachmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest 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.edgenetwork.v1.CreateInterconnectAttachmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest 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.edgenetwork.v1.CreateInterconnectAttachmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest 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.edgenetwork.v1.CreateInterconnectAttachmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + 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.edgenetwork.v1.CreateInterconnectAttachmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest 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.edgenetwork.v1.CreateInterconnectAttachmentRequest 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; + } + /** + * + * + *
+   * Message for creating a InterconnectAttachment
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest.class, + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + interconnectAttachmentId_ = ""; + interconnectAttachment_ = null; + if (interconnectAttachmentBuilder_ != null) { + interconnectAttachmentBuilder_.dispose(); + interconnectAttachmentBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest build() { + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest buildPartial() { + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest result = + new com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.interconnectAttachmentId_ = interconnectAttachmentId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.interconnectAttachment_ = + interconnectAttachmentBuilder_ == null + ? interconnectAttachment_ + : interconnectAttachmentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 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.edgenetwork.v1.CreateInterconnectAttachmentRequest) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest other) { + if (other + == com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInterconnectAttachmentId().isEmpty()) { + interconnectAttachmentId_ = other.interconnectAttachmentId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInterconnectAttachment()) { + mergeInterconnectAttachment(other.getInterconnectAttachment()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + interconnectAttachmentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getInterconnectAttachmentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 java.lang.Object interconnectAttachmentId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * interconnect_attachment_id from the method_signature of Create RPC
+     * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The interconnectAttachmentId. + */ + public java.lang.String getInterconnectAttachmentId() { + java.lang.Object ref = interconnectAttachmentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interconnectAttachmentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * interconnect_attachment_id from the method_signature of Create RPC
+     * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for interconnectAttachmentId. + */ + public com.google.protobuf.ByteString getInterconnectAttachmentIdBytes() { + java.lang.Object ref = interconnectAttachmentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interconnectAttachmentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * interconnect_attachment_id from the method_signature of Create RPC
+     * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The interconnectAttachmentId to set. + * @return This builder for chaining. + */ + public Builder setInterconnectAttachmentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interconnectAttachmentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * interconnect_attachment_id from the method_signature of Create RPC
+     * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInterconnectAttachmentId() { + interconnectAttachmentId_ = getDefaultInstance().getInterconnectAttachmentId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * interconnect_attachment_id from the method_signature of Create RPC
+     * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for interconnectAttachmentId to set. + * @return This builder for chaining. + */ + public Builder setInterconnectAttachmentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interconnectAttachmentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.edgenetwork.v1.InterconnectAttachment interconnectAttachment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectAttachment, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder, + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder> + interconnectAttachmentBuilder_; + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interconnectAttachment field is set. + */ + public boolean hasInterconnectAttachment() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interconnectAttachment. + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachment() { + if (interconnectAttachmentBuilder_ == null) { + return interconnectAttachment_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance() + : interconnectAttachment_; + } else { + return interconnectAttachmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterconnectAttachment( + com.google.cloud.edgenetwork.v1.InterconnectAttachment value) { + if (interconnectAttachmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interconnectAttachment_ = value; + } else { + interconnectAttachmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterconnectAttachment( + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder builderForValue) { + if (interconnectAttachmentBuilder_ == null) { + interconnectAttachment_ = builderForValue.build(); + } else { + interconnectAttachmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterconnectAttachment( + com.google.cloud.edgenetwork.v1.InterconnectAttachment value) { + if (interconnectAttachmentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && interconnectAttachment_ != null + && interconnectAttachment_ + != com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance()) { + getInterconnectAttachmentBuilder().mergeFrom(value); + } else { + interconnectAttachment_ = value; + } + } else { + interconnectAttachmentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterconnectAttachment() { + bitField0_ = (bitField0_ & ~0x00000004); + interconnectAttachment_ = null; + if (interconnectAttachmentBuilder_ != null) { + interconnectAttachmentBuilder_.dispose(); + interconnectAttachmentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder + getInterconnectAttachmentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInterconnectAttachmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder + getInterconnectAttachmentOrBuilder() { + if (interconnectAttachmentBuilder_ != null) { + return interconnectAttachmentBuilder_.getMessageOrBuilder(); + } else { + return interconnectAttachment_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance() + : interconnectAttachment_; + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectAttachment, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder, + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder> + getInterconnectAttachmentFieldBuilder() { + if (interconnectAttachmentBuilder_ == null) { + interconnectAttachmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectAttachment, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder, + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder>( + getInterconnectAttachment(), getParentForChildren(), isClean()); + interconnectAttachment_ = null; + } + return interconnectAttachmentBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 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.edgenetwork.v1.CreateInterconnectAttachmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) + private static final com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest(); + } + + public static com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInterconnectAttachmentRequest 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.edgenetwork.v1.CreateInterconnectAttachmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequestOrBuilder.java new file mode 100644 index 000000000000..433b78201ca8 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateInterconnectAttachmentRequestOrBuilder.java @@ -0,0 +1,174 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface CreateInterconnectAttachmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * interconnect_attachment_id from the method_signature of Create RPC
+   * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The interconnectAttachmentId. + */ + java.lang.String getInterconnectAttachmentId(); + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * interconnect_attachment_id from the method_signature of Create RPC
+   * 
+ * + * string interconnect_attachment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for interconnectAttachmentId. + */ + com.google.protobuf.ByteString getInterconnectAttachmentIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interconnectAttachment field is set. + */ + boolean hasInterconnectAttachment(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interconnectAttachment. + */ + com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachment(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder + getInterconnectAttachmentOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequest.java new file mode 100644 index 000000000000..4feb12c01dbb --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequest.java @@ -0,0 +1,1388 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for creating a Network
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateNetworkRequest} + */ +public final class CreateNetworkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.CreateNetworkRequest) + CreateNetworkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNetworkRequest.newBuilder() to construct. + private CreateNetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNetworkRequest() { + parent_ = ""; + networkId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNetworkRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateNetworkRequest.class, + com.google.cloud.edgenetwork.v1.CreateNetworkRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 NETWORK_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * network_id from the method_signature of Create RPC
+   * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The networkId. + */ + @java.lang.Override + public java.lang.String getNetworkId() { + java.lang.Object ref = networkId_; + 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(); + networkId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * network_id from the method_signature of Create RPC
+   * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for networkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkIdBytes() { + java.lang.Object ref = networkId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 3; + private com.google.cloud.edgenetwork.v1.Network network_; + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return network_ != null; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The network. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Network getNetwork() { + return network_ == null + ? com.google.cloud.edgenetwork.v1.Network.getDefaultInstance() + : network_; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.NetworkOrBuilder getNetworkOrBuilder() { + return network_ == null + ? com.google.cloud.edgenetwork.v1.Network.getDefaultInstance() + : network_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, networkId_); + } + if (network_ != null) { + output.writeMessage(3, getNetwork()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, networkId_); + } + if (network_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNetwork()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, 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.edgenetwork.v1.CreateNetworkRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.CreateNetworkRequest other = + (com.google.cloud.edgenetwork.v1.CreateNetworkRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNetworkId().equals(other.getNetworkId())) return false; + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + NETWORK_ID_FIELD_NUMBER; + hash = (53 * hash) + getNetworkId().hashCode(); + if (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().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.edgenetwork.v1.CreateNetworkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest 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.edgenetwork.v1.CreateNetworkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest 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.edgenetwork.v1.CreateNetworkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest 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.edgenetwork.v1.CreateNetworkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest 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.edgenetwork.v1.CreateNetworkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest 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.edgenetwork.v1.CreateNetworkRequest 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; + } + /** + * + * + *
+   * Message for creating a Network
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateNetworkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.CreateNetworkRequest) + com.google.cloud.edgenetwork.v1.CreateNetworkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateNetworkRequest.class, + com.google.cloud.edgenetwork.v1.CreateNetworkRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.CreateNetworkRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + networkId_ = ""; + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateNetworkRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.CreateNetworkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateNetworkRequest build() { + com.google.cloud.edgenetwork.v1.CreateNetworkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateNetworkRequest buildPartial() { + com.google.cloud.edgenetwork.v1.CreateNetworkRequest result = + new com.google.cloud.edgenetwork.v1.CreateNetworkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.CreateNetworkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.networkId_ = networkId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.network_ = networkBuilder_ == null ? network_ : networkBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 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.edgenetwork.v1.CreateNetworkRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.CreateNetworkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.CreateNetworkRequest other) { + if (other == com.google.cloud.edgenetwork.v1.CreateNetworkRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNetworkId().isEmpty()) { + networkId_ = other.networkId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNetwork()) { + mergeNetwork(other.getNetwork()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + networkId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 java.lang.Object networkId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * network_id from the method_signature of Create RPC
+     * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The networkId. + */ + public java.lang.String getNetworkId() { + java.lang.Object ref = networkId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * network_id from the method_signature of Create RPC
+     * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for networkId. + */ + public com.google.protobuf.ByteString getNetworkIdBytes() { + java.lang.Object ref = networkId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * network_id from the method_signature of Create RPC
+     * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The networkId to set. + * @return This builder for chaining. + */ + public Builder setNetworkId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * network_id from the method_signature of Create RPC
+     * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkId() { + networkId_ = getDefaultInstance().getNetworkId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * network_id from the method_signature of Create RPC
+     * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for networkId to set. + * @return This builder for chaining. + */ + public Builder setNetworkIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.edgenetwork.v1.Network network_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Network, + com.google.cloud.edgenetwork.v1.Network.Builder, + com.google.cloud.edgenetwork.v1.NetworkOrBuilder> + networkBuilder_; + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The network. + */ + public com.google.cloud.edgenetwork.v1.Network getNetwork() { + if (networkBuilder_ == null) { + return network_ == null + ? com.google.cloud.edgenetwork.v1.Network.getDefaultInstance() + : network_; + } else { + return networkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNetwork(com.google.cloud.edgenetwork.v1.Network value) { + if (networkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + } else { + networkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNetwork(com.google.cloud.edgenetwork.v1.Network.Builder builderForValue) { + if (networkBuilder_ == null) { + network_ = builderForValue.build(); + } else { + networkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNetwork(com.google.cloud.edgenetwork.v1.Network value) { + if (networkBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && network_ != null + && network_ != com.google.cloud.edgenetwork.v1.Network.getDefaultInstance()) { + getNetworkBuilder().mergeFrom(value); + } else { + network_ = value; + } + } else { + networkBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNetwork() { + bitField0_ = (bitField0_ & ~0x00000004); + network_ = null; + if (networkBuilder_ != null) { + networkBuilder_.dispose(); + networkBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.Network.Builder getNetworkBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNetworkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.NetworkOrBuilder getNetworkOrBuilder() { + if (networkBuilder_ != null) { + return networkBuilder_.getMessageOrBuilder(); + } else { + return network_ == null + ? com.google.cloud.edgenetwork.v1.Network.getDefaultInstance() + : network_; + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Network, + com.google.cloud.edgenetwork.v1.Network.Builder, + com.google.cloud.edgenetwork.v1.NetworkOrBuilder> + getNetworkFieldBuilder() { + if (networkBuilder_ == null) { + networkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Network, + com.google.cloud.edgenetwork.v1.Network.Builder, + com.google.cloud.edgenetwork.v1.NetworkOrBuilder>( + getNetwork(), getParentForChildren(), isClean()); + network_ = null; + } + return networkBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 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.edgenetwork.v1.CreateNetworkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.CreateNetworkRequest) + private static final com.google.cloud.edgenetwork.v1.CreateNetworkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.CreateNetworkRequest(); + } + + public static com.google.cloud.edgenetwork.v1.CreateNetworkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNetworkRequest 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.edgenetwork.v1.CreateNetworkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequestOrBuilder.java new file mode 100644 index 000000000000..83d422c691ff --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateNetworkRequestOrBuilder.java @@ -0,0 +1,173 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface CreateNetworkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.CreateNetworkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * network_id from the method_signature of Create RPC
+   * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The networkId. + */ + java.lang.String getNetworkId(); + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * network_id from the method_signature of Create RPC
+   * 
+ * + * string network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for networkId. + */ + com.google.protobuf.ByteString getNetworkIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The network. + */ + com.google.cloud.edgenetwork.v1.Network getNetwork(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Network network = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.edgenetwork.v1.NetworkOrBuilder getNetworkOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequest.java new file mode 100644 index 000000000000..e88c934226a3 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequest.java @@ -0,0 +1,1381 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for creating a Router
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateRouterRequest} + */ +public final class CreateRouterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.CreateRouterRequest) + CreateRouterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRouterRequest.newBuilder() to construct. + private CreateRouterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRouterRequest() { + parent_ = ""; + routerId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRouterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateRouterRequest.class, + com.google.cloud.edgenetwork.v1.CreateRouterRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 ROUTER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object routerId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * router_id from the method_signature of Create RPC
+   * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The routerId. + */ + @java.lang.Override + public java.lang.String getRouterId() { + java.lang.Object ref = routerId_; + 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(); + routerId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * router_id from the method_signature of Create RPC
+   * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for routerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRouterIdBytes() { + java.lang.Object ref = routerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + routerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUTER_FIELD_NUMBER = 3; + private com.google.cloud.edgenetwork.v1.Router router_; + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the router field is set. + */ + @java.lang.Override + public boolean hasRouter() { + return router_ != null; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The router. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router getRouter() { + return router_ == null ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() : router_; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterOrBuilder getRouterOrBuilder() { + return router_ == null ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() : router_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(routerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, routerId_); + } + if (router_ != null) { + output.writeMessage(3, getRouter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(routerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, routerId_); + } + if (router_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRouter()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, 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.edgenetwork.v1.CreateRouterRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.CreateRouterRequest other = + (com.google.cloud.edgenetwork.v1.CreateRouterRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRouterId().equals(other.getRouterId())) return false; + if (hasRouter() != other.hasRouter()) return false; + if (hasRouter()) { + if (!getRouter().equals(other.getRouter())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ROUTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getRouterId().hashCode(); + if (hasRouter()) { + hash = (37 * hash) + ROUTER_FIELD_NUMBER; + hash = (53 * hash) + getRouter().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.edgenetwork.v1.CreateRouterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest 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.edgenetwork.v1.CreateRouterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest 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.edgenetwork.v1.CreateRouterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest 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.edgenetwork.v1.CreateRouterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest 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.edgenetwork.v1.CreateRouterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest 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.edgenetwork.v1.CreateRouterRequest 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; + } + /** + * + * + *
+   * Message for creating a Router
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateRouterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.CreateRouterRequest) + com.google.cloud.edgenetwork.v1.CreateRouterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateRouterRequest.class, + com.google.cloud.edgenetwork.v1.CreateRouterRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.CreateRouterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + routerId_ = ""; + router_ = null; + if (routerBuilder_ != null) { + routerBuilder_.dispose(); + routerBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateRouterRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.CreateRouterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateRouterRequest build() { + com.google.cloud.edgenetwork.v1.CreateRouterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateRouterRequest buildPartial() { + com.google.cloud.edgenetwork.v1.CreateRouterRequest result = + new com.google.cloud.edgenetwork.v1.CreateRouterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.CreateRouterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.routerId_ = routerId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.router_ = routerBuilder_ == null ? router_ : routerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 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.edgenetwork.v1.CreateRouterRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.CreateRouterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.CreateRouterRequest other) { + if (other == com.google.cloud.edgenetwork.v1.CreateRouterRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRouterId().isEmpty()) { + routerId_ = other.routerId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRouter()) { + mergeRouter(other.getRouter()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + routerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getRouterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 java.lang.Object routerId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * router_id from the method_signature of Create RPC
+     * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The routerId. + */ + public java.lang.String getRouterId() { + java.lang.Object ref = routerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + routerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * router_id from the method_signature of Create RPC
+     * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for routerId. + */ + public com.google.protobuf.ByteString getRouterIdBytes() { + java.lang.Object ref = routerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + routerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * router_id from the method_signature of Create RPC
+     * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The routerId to set. + * @return This builder for chaining. + */ + public Builder setRouterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + routerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * router_id from the method_signature of Create RPC
+     * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRouterId() { + routerId_ = getDefaultInstance().getRouterId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * router_id from the method_signature of Create RPC
+     * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for routerId to set. + * @return This builder for chaining. + */ + public Builder setRouterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + routerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.edgenetwork.v1.Router router_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder> + routerBuilder_; + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the router field is set. + */ + public boolean hasRouter() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The router. + */ + public com.google.cloud.edgenetwork.v1.Router getRouter() { + if (routerBuilder_ == null) { + return router_ == null + ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() + : router_; + } else { + return routerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRouter(com.google.cloud.edgenetwork.v1.Router value) { + if (routerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + router_ = value; + } else { + routerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRouter(com.google.cloud.edgenetwork.v1.Router.Builder builderForValue) { + if (routerBuilder_ == null) { + router_ = builderForValue.build(); + } else { + routerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRouter(com.google.cloud.edgenetwork.v1.Router value) { + if (routerBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && router_ != null + && router_ != com.google.cloud.edgenetwork.v1.Router.getDefaultInstance()) { + getRouterBuilder().mergeFrom(value); + } else { + router_ = value; + } + } else { + routerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRouter() { + bitField0_ = (bitField0_ & ~0x00000004); + router_ = null; + if (routerBuilder_ != null) { + routerBuilder_.dispose(); + routerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.Router.Builder getRouterBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRouterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.RouterOrBuilder getRouterOrBuilder() { + if (routerBuilder_ != null) { + return routerBuilder_.getMessageOrBuilder(); + } else { + return router_ == null + ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() + : router_; + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder> + getRouterFieldBuilder() { + if (routerBuilder_ == null) { + routerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder>( + getRouter(), getParentForChildren(), isClean()); + router_ = null; + } + return routerBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 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.edgenetwork.v1.CreateRouterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.CreateRouterRequest) + private static final com.google.cloud.edgenetwork.v1.CreateRouterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.CreateRouterRequest(); + } + + public static com.google.cloud.edgenetwork.v1.CreateRouterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRouterRequest 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.edgenetwork.v1.CreateRouterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequestOrBuilder.java new file mode 100644 index 000000000000..f12f13fd333f --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateRouterRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface CreateRouterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.CreateRouterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * router_id from the method_signature of Create RPC
+   * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The routerId. + */ + java.lang.String getRouterId(); + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * router_id from the method_signature of Create RPC
+   * 
+ * + * string router_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for routerId. + */ + com.google.protobuf.ByteString getRouterIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the router field is set. + */ + boolean hasRouter(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The router. + */ + com.google.cloud.edgenetwork.v1.Router getRouter(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.edgenetwork.v1.RouterOrBuilder getRouterOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequest.java new file mode 100644 index 000000000000..d396c37f229e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequest.java @@ -0,0 +1,1381 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for creating a Subnet
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateSubnetRequest} + */ +public final class CreateSubnetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.CreateSubnetRequest) + CreateSubnetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSubnetRequest.newBuilder() to construct. + private CreateSubnetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSubnetRequest() { + parent_ = ""; + subnetId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSubnetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateSubnetRequest.class, + com.google.cloud.edgenetwork.v1.CreateSubnetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 SUBNET_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * subnet_id from the method_signature of Create RPC
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + @java.lang.Override + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + 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(); + subnetId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * subnet_id from the method_signature of Create RPC
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_FIELD_NUMBER = 3; + private com.google.cloud.edgenetwork.v1.Subnet subnet_; + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subnet field is set. + */ + @java.lang.Override + public boolean hasSubnet() { + return subnet_ != null; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subnet. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Subnet getSubnet() { + return subnet_ == null ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() : subnet_; + } + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetOrBuilder() { + return subnet_ == null ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() : subnet_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.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(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subnetId_); + } + if (subnet_ != null) { + output.writeMessage(3, getSubnet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, 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(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subnetId_); + } + if (subnet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSubnet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, 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.edgenetwork.v1.CreateSubnetRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.CreateSubnetRequest other = + (com.google.cloud.edgenetwork.v1.CreateSubnetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSubnetId().equals(other.getSubnetId())) return false; + if (hasSubnet() != other.hasSubnet()) return false; + if (hasSubnet()) { + if (!getSubnet().equals(other.getSubnet())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SUBNET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubnetId().hashCode(); + if (hasSubnet()) { + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().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.edgenetwork.v1.CreateSubnetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest 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.edgenetwork.v1.CreateSubnetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest 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.edgenetwork.v1.CreateSubnetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest 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.edgenetwork.v1.CreateSubnetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest 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.edgenetwork.v1.CreateSubnetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest 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.edgenetwork.v1.CreateSubnetRequest 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; + } + /** + * + * + *
+   * Message for creating a Subnet
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.CreateSubnetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.CreateSubnetRequest) + com.google.cloud.edgenetwork.v1.CreateSubnetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.CreateSubnetRequest.class, + com.google.cloud.edgenetwork.v1.CreateSubnetRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.CreateSubnetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + subnetId_ = ""; + subnet_ = null; + if (subnetBuilder_ != null) { + subnetBuilder_.dispose(); + subnetBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateSubnetRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.CreateSubnetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateSubnetRequest build() { + com.google.cloud.edgenetwork.v1.CreateSubnetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.CreateSubnetRequest buildPartial() { + com.google.cloud.edgenetwork.v1.CreateSubnetRequest result = + new com.google.cloud.edgenetwork.v1.CreateSubnetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.CreateSubnetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subnetId_ = subnetId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subnet_ = subnetBuilder_ == null ? subnet_ : subnetBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 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.edgenetwork.v1.CreateSubnetRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.CreateSubnetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.CreateSubnetRequest other) { + if (other == com.google.cloud.edgenetwork.v1.CreateSubnetRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSubnetId().isEmpty()) { + subnetId_ = other.subnetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSubnet()) { + mergeSubnet(other.getSubnet()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + subnetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSubnetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 java.lang.Object subnetId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * subnet_id from the method_signature of Create RPC
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + public java.lang.String getSubnetId() { + java.lang.Object ref = subnetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * subnet_id from the method_signature of Create RPC
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + public com.google.protobuf.ByteString getSubnetIdBytes() { + java.lang.Object ref = subnetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * subnet_id from the method_signature of Create RPC
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * subnet_id from the method_signature of Create RPC
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetId() { + subnetId_ = getDefaultInstance().getSubnetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object
+     * If auto-generating Id server-side, remove this field and
+     * subnet_id from the method_signature of Create RPC
+     * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for subnetId to set. + * @return This builder for chaining. + */ + public Builder setSubnetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.edgenetwork.v1.Subnet subnet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder> + subnetBuilder_; + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subnet field is set. + */ + public boolean hasSubnet() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subnet. + */ + public com.google.cloud.edgenetwork.v1.Subnet getSubnet() { + if (subnetBuilder_ == null) { + return subnet_ == null + ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() + : subnet_; + } else { + return subnetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubnet(com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subnet_ = value; + } else { + subnetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubnet(com.google.cloud.edgenetwork.v1.Subnet.Builder builderForValue) { + if (subnetBuilder_ == null) { + subnet_ = builderForValue.build(); + } else { + subnetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubnet(com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && subnet_ != null + && subnet_ != com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance()) { + getSubnetBuilder().mergeFrom(value); + } else { + subnet_ = value; + } + } else { + subnetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubnet() { + bitField0_ = (bitField0_ & ~0x00000004); + subnet_ = null; + if (subnetBuilder_ != null) { + subnetBuilder_.dispose(); + subnetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.Subnet.Builder getSubnetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubnetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetOrBuilder() { + if (subnetBuilder_ != null) { + return subnetBuilder_.getMessageOrBuilder(); + } else { + return subnet_ == null + ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() + : subnet_; + } + } + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder> + getSubnetFieldBuilder() { + if (subnetBuilder_ == null) { + subnetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder>( + getSubnet(), getParentForChildren(), isClean()); + subnet_ = null; + } + return subnetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 4 [(.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_ |= 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.edgenetwork.v1.CreateSubnetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.CreateSubnetRequest) + private static final com.google.cloud.edgenetwork.v1.CreateSubnetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.CreateSubnetRequest(); + } + + public static com.google.cloud.edgenetwork.v1.CreateSubnetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubnetRequest 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.edgenetwork.v1.CreateSubnetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequestOrBuilder.java new file mode 100644 index 000000000000..48aa99c8d1c6 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/CreateSubnetRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface CreateSubnetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.CreateSubnetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * subnet_id from the method_signature of Create RPC
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The subnetId. + */ + java.lang.String getSubnetId(); + /** + * + * + *
+   * Required. Id of the requesting object
+   * If auto-generating Id server-side, remove this field and
+   * subnet_id from the method_signature of Create RPC
+   * 
+ * + * string subnet_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for subnetId. + */ + com.google.protobuf.ByteString getSubnetIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subnet field is set. + */ + boolean hasSubnet(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subnet. + */ + com.google.cloud.edgenetwork.v1.Subnet getSubnet(); + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequest.java new file mode 100644 index 000000000000..dea683d170b5 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequest.java @@ -0,0 +1,918 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for deleting a InterconnectAttachment
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest} + */ +public final class DeleteInterconnectAttachmentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) + DeleteInterconnectAttachmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInterconnectAttachmentRequest.newBuilder() to construct. + private DeleteInterconnectAttachmentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInterconnectAttachmentRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInterconnectAttachmentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest.class, + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest other = + (com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) obj; + + if (!getName().equals(other.getName())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest 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; + } + /** + * + * + *
+   * Message for deleting a InterconnectAttachment
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest.class, + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest build() { + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest result = + new com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest other) { + if (other + == com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) + private static final com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInterconnectAttachmentRequest 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.edgenetwork.v1.DeleteInterconnectAttachmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequestOrBuilder.java new file mode 100644 index 000000000000..5ee9faac1364 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteInterconnectAttachmentRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DeleteInterconnectAttachmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequest.java new file mode 100644 index 000000000000..4bc409447e19 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequest.java @@ -0,0 +1,904 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for deleting a Network
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteNetworkRequest} + */ +public final class DeleteNetworkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DeleteNetworkRequest) + DeleteNetworkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNetworkRequest.newBuilder() to construct. + private DeleteNetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNetworkRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNetworkRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.class, + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.edgenetwork.v1.DeleteNetworkRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest other = + (com.google.cloud.edgenetwork.v1.DeleteNetworkRequest) obj; + + if (!getName().equals(other.getName())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest 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.edgenetwork.v1.DeleteNetworkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest 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.edgenetwork.v1.DeleteNetworkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest 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.edgenetwork.v1.DeleteNetworkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest 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.edgenetwork.v1.DeleteNetworkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest 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.edgenetwork.v1.DeleteNetworkRequest 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; + } + /** + * + * + *
+   * Message for deleting a Network
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteNetworkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DeleteNetworkRequest) + com.google.cloud.edgenetwork.v1.DeleteNetworkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.class, + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteNetworkRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteNetworkRequest build() { + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteNetworkRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DeleteNetworkRequest result = + new com.google.cloud.edgenetwork.v1.DeleteNetworkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DeleteNetworkRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 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.edgenetwork.v1.DeleteNetworkRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DeleteNetworkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DeleteNetworkRequest other) { + if (other == com.google.cloud.edgenetwork.v1.DeleteNetworkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 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.edgenetwork.v1.DeleteNetworkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DeleteNetworkRequest) + private static final com.google.cloud.edgenetwork.v1.DeleteNetworkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DeleteNetworkRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DeleteNetworkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNetworkRequest 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.edgenetwork.v1.DeleteNetworkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequestOrBuilder.java new file mode 100644 index 000000000000..d45da82f78ad --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteNetworkRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DeleteNetworkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DeleteNetworkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequest.java new file mode 100644 index 000000000000..da57554e8eb1 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequest.java @@ -0,0 +1,904 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for deleting a Router
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteRouterRequest} + */ +public final class DeleteRouterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DeleteRouterRequest) + DeleteRouterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteRouterRequest.newBuilder() to construct. + private DeleteRouterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteRouterRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteRouterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteRouterRequest.class, + com.google.cloud.edgenetwork.v1.DeleteRouterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.edgenetwork.v1.DeleteRouterRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DeleteRouterRequest other = + (com.google.cloud.edgenetwork.v1.DeleteRouterRequest) obj; + + if (!getName().equals(other.getName())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest 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.edgenetwork.v1.DeleteRouterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest 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.edgenetwork.v1.DeleteRouterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest 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.edgenetwork.v1.DeleteRouterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest 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.edgenetwork.v1.DeleteRouterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest 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.edgenetwork.v1.DeleteRouterRequest 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; + } + /** + * + * + *
+   * Message for deleting a Router
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteRouterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DeleteRouterRequest) + com.google.cloud.edgenetwork.v1.DeleteRouterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteRouterRequest.class, + com.google.cloud.edgenetwork.v1.DeleteRouterRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DeleteRouterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteRouterRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DeleteRouterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteRouterRequest build() { + com.google.cloud.edgenetwork.v1.DeleteRouterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteRouterRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DeleteRouterRequest result = + new com.google.cloud.edgenetwork.v1.DeleteRouterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DeleteRouterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 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.edgenetwork.v1.DeleteRouterRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DeleteRouterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DeleteRouterRequest other) { + if (other == com.google.cloud.edgenetwork.v1.DeleteRouterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 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.edgenetwork.v1.DeleteRouterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DeleteRouterRequest) + private static final com.google.cloud.edgenetwork.v1.DeleteRouterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DeleteRouterRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DeleteRouterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRouterRequest 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.edgenetwork.v1.DeleteRouterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequestOrBuilder.java new file mode 100644 index 000000000000..87db643b514e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteRouterRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DeleteRouterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DeleteRouterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequest.java new file mode 100644 index 000000000000..db1d69f75605 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequest.java @@ -0,0 +1,904 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for deleting a Subnet
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteSubnetRequest} + */ +public final class DeleteSubnetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DeleteSubnetRequest) + DeleteSubnetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSubnetRequest.newBuilder() to construct. + private DeleteSubnetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSubnetRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSubnetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.class, + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.edgenetwork.v1.DeleteSubnetRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest other = + (com.google.cloud.edgenetwork.v1.DeleteSubnetRequest) obj; + + if (!getName().equals(other.getName())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest 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.edgenetwork.v1.DeleteSubnetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest 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.edgenetwork.v1.DeleteSubnetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest 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.edgenetwork.v1.DeleteSubnetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest 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.edgenetwork.v1.DeleteSubnetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest 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.edgenetwork.v1.DeleteSubnetRequest 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; + } + /** + * + * + *
+   * Message for deleting a Subnet
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DeleteSubnetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DeleteSubnetRequest) + com.google.cloud.edgenetwork.v1.DeleteSubnetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.class, + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteSubnetRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteSubnetRequest build() { + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DeleteSubnetRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DeleteSubnetRequest result = + new com.google.cloud.edgenetwork.v1.DeleteSubnetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DeleteSubnetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 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.edgenetwork.v1.DeleteSubnetRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DeleteSubnetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DeleteSubnetRequest other) { + if (other == com.google.cloud.edgenetwork.v1.DeleteSubnetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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 = 2 [(.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_ |= 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.edgenetwork.v1.DeleteSubnetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DeleteSubnetRequest) + private static final com.google.cloud.edgenetwork.v1.DeleteSubnetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DeleteSubnetRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DeleteSubnetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubnetRequest 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.edgenetwork.v1.DeleteSubnetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequestOrBuilder.java new file mode 100644 index 000000000000..0128998b2406 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DeleteSubnetRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DeleteSubnetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DeleteSubnetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequest.java new file mode 100644 index 000000000000..698b832cf72b --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequest.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting the diagnostics of an interconnect within a specific
+ * zone.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest} + */ +public final class DiagnoseInterconnectRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) + DiagnoseInterconnectRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiagnoseInterconnectRequest.newBuilder() to construct. + private DiagnoseInterconnectRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiagnoseInterconnectRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiagnoseInterconnectRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.class, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the interconnect 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 interconnect 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.edgenetwork.v1.DiagnoseInterconnectRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest other = + (com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) 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.edgenetwork.v1.DiagnoseInterconnectRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest 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; + } + /** + * + * + *
+   * Message for requesting the diagnostics of an interconnect within a specific
+   * zone.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.class, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest build() { + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest result = + new com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest other) { + if (other == com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest.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 interconnect 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 interconnect 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 interconnect 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 interconnect 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 interconnect 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.edgenetwork.v1.DiagnoseInterconnectRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) + private static final com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiagnoseInterconnectRequest 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.edgenetwork.v1.DiagnoseInterconnectRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequestOrBuilder.java new file mode 100644 index 000000000000..90d3ee783291 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DiagnoseInterconnectRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the interconnect 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 interconnect 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponse.java new file mode 100644 index 000000000000..d10e601ed972 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponse.java @@ -0,0 +1,974 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * DiagnoseInterconnectResponse contains the current diagnostics for a
+ * specific interconnect.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse} + */ +public final class DiagnoseInterconnectResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse) + DiagnoseInterconnectResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiagnoseInterconnectResponse.newBuilder() to construct. + private DiagnoseInterconnectResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiagnoseInterconnectResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiagnoseInterconnectResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.class, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.Builder.class); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The time when the interconnect diagnostics was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The time when the interconnect diagnostics was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The time when the interconnect diagnostics was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int RESULT_FIELD_NUMBER = 2; + private com.google.cloud.edgenetwork.v1.InterconnectDiagnostics result_; + /** + * + * + *
+   * The network status of a specific interconnect.
+   * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * The network status of a specific interconnect.
+   * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics getResult() { + return result_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * The network status of a specific interconnect.
+   * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder getResultOrBuilder() { + return result_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance() + : 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 (updateTime_ != null) { + output.writeMessage(1, getUpdateTime()); + } + if (result_ != null) { + output.writeMessage(2, getResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateTime()); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResult()); + } + 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.edgenetwork.v1.DiagnoseInterconnectResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse other = + (com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) 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 (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse 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.edgenetwork.v1.DiagnoseInterconnectResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse 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.edgenetwork.v1.DiagnoseInterconnectResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse 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.edgenetwork.v1.DiagnoseInterconnectResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse 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.edgenetwork.v1.DiagnoseInterconnectResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse 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.edgenetwork.v1.DiagnoseInterconnectResponse 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; + } + /** + * + * + *
+   * DiagnoseInterconnectResponse contains the current diagnostics for a
+   * specific interconnect.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse) + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.class, + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse build() { + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse result = + new com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.result_ = resultBuilder_ == null ? result_ : resultBuilder_.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.edgenetwork.v1.DiagnoseInterconnectResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse other) { + if (other + == com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse.getDefaultInstance()) + return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + 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(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @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(); + } + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The time when the interconnect diagnostics was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + 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.cloud.edgenetwork.v1.InterconnectDiagnostics result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder> + resultBuilder_; + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + * + * @return The result. + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + public Builder setResult(com.google.cloud.edgenetwork.v1.InterconnectDiagnostics value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + } else { + resultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + public Builder setResult( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + public Builder mergeResult(com.google.cloud.edgenetwork.v1.InterconnectDiagnostics value) { + if (resultBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && result_ != null + && result_ + != com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance()) { + getResultBuilder().mergeFrom(value); + } else { + result_ = value; + } + } else { + resultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000002); + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder getResultBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * The network status of a specific interconnect.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + @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.edgenetwork.v1.DiagnoseInterconnectResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse) + private static final com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiagnoseInterconnectResponse 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.edgenetwork.v1.DiagnoseInterconnectResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponseOrBuilder.java new file mode 100644 index 000000000000..30e555e83ef0 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseInterconnectResponseOrBuilder.java @@ -0,0 +1,95 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DiagnoseInterconnectResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time when the interconnect diagnostics was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The time when the interconnect diagnostics was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The time when the interconnect diagnostics was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The network status of a specific interconnect.
+   * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * The network status of a specific interconnect.
+   * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + * + * @return The result. + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics getResult(); + /** + * + * + *
+   * The network status of a specific interconnect.
+   * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics result = 2; + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder getResultOrBuilder(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequest.java new file mode 100644 index 000000000000..eb4e8e8b5c5d --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequest.java @@ -0,0 +1,639 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting the diagnostics of a network within a specific zone.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseNetworkRequest} + */ +public final class DiagnoseNetworkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) + DiagnoseNetworkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiagnoseNetworkRequest.newBuilder() to construct. + private DiagnoseNetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiagnoseNetworkRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiagnoseNetworkRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.class, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the network 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 network 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.edgenetwork.v1.DiagnoseNetworkRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest other = + (com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) 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.edgenetwork.v1.DiagnoseNetworkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest 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; + } + /** + * + * + *
+   * Message for requesting the diagnostics of a network within a specific zone.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseNetworkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.class, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest build() { + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest result = + new com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest other) { + if (other == com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest.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 network 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 network 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 network 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 network 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 network 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.edgenetwork.v1.DiagnoseNetworkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) + private static final com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiagnoseNetworkRequest 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.edgenetwork.v1.DiagnoseNetworkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequestOrBuilder.java new file mode 100644 index 000000000000..08c3d281ebb2 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DiagnoseNetworkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseNetworkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the network 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 network 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponse.java new file mode 100644 index 000000000000..d7ec7002e3de --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponse.java @@ -0,0 +1,1985 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * DiagnoseNetworkResponse contains the current status for a specific network.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseNetworkResponse} + */ +public final class DiagnoseNetworkResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse) + DiagnoseNetworkResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiagnoseNetworkResponse.newBuilder() to construct. + private DiagnoseNetworkResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiagnoseNetworkResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiagnoseNetworkResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.class, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.Builder.class); + } + + public interface NetworkStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + java.util.List getSubnetStatusList(); + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + com.google.cloud.edgenetwork.v1.SubnetStatus getSubnetStatus(int index); + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + int getSubnetStatusCount(); + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + java.util.List + getSubnetStatusOrBuilderList(); + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder getSubnetStatusOrBuilder(int index); + } + /** + * + * + *
+   * NetworkStatus has a list of status for the subnets under the current
+   * network.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus} + */ + public static final class NetworkStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) + NetworkStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkStatus.newBuilder() to construct. + private NetworkStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkStatus() { + subnetStatus_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.class, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder.class); + } + + public static final int SUBNET_STATUS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List subnetStatus_; + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + @java.lang.Override + public java.util.List getSubnetStatusList() { + return subnetStatus_; + } + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + @java.lang.Override + public java.util.List + getSubnetStatusOrBuilderList() { + return subnetStatus_; + } + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + @java.lang.Override + public int getSubnetStatusCount() { + return subnetStatus_.size(); + } + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetStatus getSubnetStatus(int index) { + return subnetStatus_.get(index); + } + /** + * + * + *
+     * A list of status for the subnets under the current network.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder getSubnetStatusOrBuilder( + int index) { + return subnetStatus_.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 < subnetStatus_.size(); i++) { + output.writeMessage(1, subnetStatus_.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 < subnetStatus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subnetStatus_.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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus other = + (com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) obj; + + if (!getSubnetStatusList().equals(other.getSubnetStatusList())) 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 (getSubnetStatusCount() > 0) { + hash = (37 * hash) + SUBNET_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getSubnetStatusList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus 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; + } + /** + * + * + *
+     * NetworkStatus has a list of status for the subnets under the current
+     * network.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.class, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder + .class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subnetStatusBuilder_ == null) { + subnetStatus_ = java.util.Collections.emptyList(); + } else { + subnetStatus_ = null; + subnetStatusBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus build() { + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = + new com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result) { + if (subnetStatusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subnetStatus_ = java.util.Collections.unmodifiableList(subnetStatus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subnetStatus_ = subnetStatus_; + } else { + result.subnetStatus_ = subnetStatusBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus other) { + if (other + == com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + .getDefaultInstance()) return this; + if (subnetStatusBuilder_ == null) { + if (!other.subnetStatus_.isEmpty()) { + if (subnetStatus_.isEmpty()) { + subnetStatus_ = other.subnetStatus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubnetStatusIsMutable(); + subnetStatus_.addAll(other.subnetStatus_); + } + onChanged(); + } + } else { + if (!other.subnetStatus_.isEmpty()) { + if (subnetStatusBuilder_.isEmpty()) { + subnetStatusBuilder_.dispose(); + subnetStatusBuilder_ = null; + subnetStatus_ = other.subnetStatus_; + bitField0_ = (bitField0_ & ~0x00000001); + subnetStatusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubnetStatusFieldBuilder() + : null; + } else { + subnetStatusBuilder_.addAllMessages(other.subnetStatus_); + } + } + } + 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.edgenetwork.v1.SubnetStatus m = + input.readMessage( + com.google.cloud.edgenetwork.v1.SubnetStatus.parser(), extensionRegistry); + if (subnetStatusBuilder_ == null) { + ensureSubnetStatusIsMutable(); + subnetStatus_.add(m); + } else { + subnetStatusBuilder_.addMessage(m); + } + 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.util.List subnetStatus_ = + java.util.Collections.emptyList(); + + private void ensureSubnetStatusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subnetStatus_ = + new java.util.ArrayList(subnetStatus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.SubnetStatus, + com.google.cloud.edgenetwork.v1.SubnetStatus.Builder, + com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder> + subnetStatusBuilder_; + + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public java.util.List getSubnetStatusList() { + if (subnetStatusBuilder_ == null) { + return java.util.Collections.unmodifiableList(subnetStatus_); + } else { + return subnetStatusBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public int getSubnetStatusCount() { + if (subnetStatusBuilder_ == null) { + return subnetStatus_.size(); + } else { + return subnetStatusBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public com.google.cloud.edgenetwork.v1.SubnetStatus getSubnetStatus(int index) { + if (subnetStatusBuilder_ == null) { + return subnetStatus_.get(index); + } else { + return subnetStatusBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder setSubnetStatus( + int index, com.google.cloud.edgenetwork.v1.SubnetStatus value) { + if (subnetStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetStatusIsMutable(); + subnetStatus_.set(index, value); + onChanged(); + } else { + subnetStatusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder setSubnetStatus( + int index, com.google.cloud.edgenetwork.v1.SubnetStatus.Builder builderForValue) { + if (subnetStatusBuilder_ == null) { + ensureSubnetStatusIsMutable(); + subnetStatus_.set(index, builderForValue.build()); + onChanged(); + } else { + subnetStatusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder addSubnetStatus(com.google.cloud.edgenetwork.v1.SubnetStatus value) { + if (subnetStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetStatusIsMutable(); + subnetStatus_.add(value); + onChanged(); + } else { + subnetStatusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder addSubnetStatus( + int index, com.google.cloud.edgenetwork.v1.SubnetStatus value) { + if (subnetStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetStatusIsMutable(); + subnetStatus_.add(index, value); + onChanged(); + } else { + subnetStatusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder addSubnetStatus( + com.google.cloud.edgenetwork.v1.SubnetStatus.Builder builderForValue) { + if (subnetStatusBuilder_ == null) { + ensureSubnetStatusIsMutable(); + subnetStatus_.add(builderForValue.build()); + onChanged(); + } else { + subnetStatusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder addSubnetStatus( + int index, com.google.cloud.edgenetwork.v1.SubnetStatus.Builder builderForValue) { + if (subnetStatusBuilder_ == null) { + ensureSubnetStatusIsMutable(); + subnetStatus_.add(index, builderForValue.build()); + onChanged(); + } else { + subnetStatusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder addAllSubnetStatus( + java.lang.Iterable values) { + if (subnetStatusBuilder_ == null) { + ensureSubnetStatusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subnetStatus_); + onChanged(); + } else { + subnetStatusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder clearSubnetStatus() { + if (subnetStatusBuilder_ == null) { + subnetStatus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subnetStatusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public Builder removeSubnetStatus(int index) { + if (subnetStatusBuilder_ == null) { + ensureSubnetStatusIsMutable(); + subnetStatus_.remove(index); + onChanged(); + } else { + subnetStatusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public com.google.cloud.edgenetwork.v1.SubnetStatus.Builder getSubnetStatusBuilder( + int index) { + return getSubnetStatusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder getSubnetStatusOrBuilder( + int index) { + if (subnetStatusBuilder_ == null) { + return subnetStatus_.get(index); + } else { + return subnetStatusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public java.util.List + getSubnetStatusOrBuilderList() { + if (subnetStatusBuilder_ != null) { + return subnetStatusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subnetStatus_); + } + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public com.google.cloud.edgenetwork.v1.SubnetStatus.Builder addSubnetStatusBuilder() { + return getSubnetStatusFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.SubnetStatus.getDefaultInstance()); + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public com.google.cloud.edgenetwork.v1.SubnetStatus.Builder addSubnetStatusBuilder( + int index) { + return getSubnetStatusFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.SubnetStatus.getDefaultInstance()); + } + /** + * + * + *
+       * A list of status for the subnets under the current network.
+       * 
+ * + * repeated .google.cloud.edgenetwork.v1.SubnetStatus subnet_status = 1; + */ + public java.util.List + getSubnetStatusBuilderList() { + return getSubnetStatusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.SubnetStatus, + com.google.cloud.edgenetwork.v1.SubnetStatus.Builder, + com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder> + getSubnetStatusFieldBuilder() { + if (subnetStatusBuilder_ == null) { + subnetStatusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.SubnetStatus, + com.google.cloud.edgenetwork.v1.SubnetStatus.Builder, + com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder>( + subnetStatus_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subnetStatus_ = null; + } + return subnetStatusBuilder_; + } + + @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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus) + private static final com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkStatus 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.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The time when the network status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The time when the network status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The time when the network status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int RESULT_FIELD_NUMBER = 2; + private com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result_; + /** + * + * + *
+   * The network status of a specific network.
+   * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * The network status of a specific network.
+   * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus getResult() { + return result_ == null + ? com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * The network status of a specific network.
+   * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder + getResultOrBuilder() { + return result_ == null + ? com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.getDefaultInstance() + : 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 (updateTime_ != null) { + output.writeMessage(1, getUpdateTime()); + } + if (result_ != null) { + output.writeMessage(2, getResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateTime()); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResult()); + } + 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.edgenetwork.v1.DiagnoseNetworkResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse other = + (com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) 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 (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse 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.edgenetwork.v1.DiagnoseNetworkResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse 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.edgenetwork.v1.DiagnoseNetworkResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse 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.edgenetwork.v1.DiagnoseNetworkResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse 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.edgenetwork.v1.DiagnoseNetworkResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse 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.edgenetwork.v1.DiagnoseNetworkResponse 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; + } + /** + * + * + *
+   * DiagnoseNetworkResponse contains the current status for a specific network.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseNetworkResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse) + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.class, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse build() { + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse result = + new com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.result_ = resultBuilder_ == null ? result_ : resultBuilder_.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.edgenetwork.v1.DiagnoseNetworkResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse other) { + if (other == com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.getDefaultInstance()) + return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + 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(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @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(); + } + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The time when the network status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + 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.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder> + resultBuilder_; + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + * + * @return The result. + */ + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + .getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + public Builder setResult( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + } else { + resultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + public Builder setResult( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder + builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + public Builder mergeResult( + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus value) { + if (resultBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && result_ != null + && result_ + != com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + .getDefaultInstance()) { + getResultBuilder().mergeFrom(value); + } else { + result_ = value; + } + } else { + resultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000002); + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder + getResultBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + public com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder + getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus + .getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * The network status of a specific network.
+     * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.Builder, + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + @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.edgenetwork.v1.DiagnoseNetworkResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse) + private static final com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiagnoseNetworkResponse 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.edgenetwork.v1.DiagnoseNetworkResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponseOrBuilder.java new file mode 100644 index 000000000000..5c77c656b31e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseNetworkResponseOrBuilder.java @@ -0,0 +1,96 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DiagnoseNetworkResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseNetworkResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time when the network status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The time when the network status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The time when the network status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The network status of a specific network.
+   * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * The network status of a specific network.
+   * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + * + * @return The result. + */ + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus getResult(); + /** + * + * + *
+   * The network status of a specific network.
+   * 
+ * + * .google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus result = 2; + */ + com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatusOrBuilder + getResultOrBuilder(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequest.java new file mode 100644 index 000000000000..e783dc2d67f2 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequest.java @@ -0,0 +1,639 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting diagnositcs of a router within a specific zone.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseRouterRequest} + */ +public final class DiagnoseRouterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseRouterRequest) + DiagnoseRouterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiagnoseRouterRequest.newBuilder() to construct. + private DiagnoseRouterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiagnoseRouterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiagnoseRouterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.class, + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the router 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 router 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.edgenetwork.v1.DiagnoseRouterRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest other = + (com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest) 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.edgenetwork.v1.DiagnoseRouterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest 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; + } + /** + * + * + *
+   * Message for requesting diagnositcs of a router within a specific zone.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseRouterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseRouterRequest) + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.class, + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest build() { + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest result = + new com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest other) { + if (other == com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest.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 router 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 router 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 router 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 router 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 router 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.edgenetwork.v1.DiagnoseRouterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseRouterRequest) + private static final com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiagnoseRouterRequest 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.edgenetwork.v1.DiagnoseRouterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequestOrBuilder.java new file mode 100644 index 000000000000..0495a8739a77 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DiagnoseRouterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseRouterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the router 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 router 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponse.java new file mode 100644 index 000000000000..dbcc96660f8f --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponse.java @@ -0,0 +1,966 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * DiagnoseRouterResponse contains the current status for a specific router.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseRouterResponse} + */ +public final class DiagnoseRouterResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.DiagnoseRouterResponse) + DiagnoseRouterResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DiagnoseRouterResponse.newBuilder() to construct. + private DiagnoseRouterResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DiagnoseRouterResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DiagnoseRouterResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.class, + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.Builder.class); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The time when the router status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * The time when the router status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The time when the router status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int RESULT_FIELD_NUMBER = 2; + private com.google.cloud.edgenetwork.v1.RouterStatus result_; + /** + * + * + *
+   * The network status of a specific router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + * + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + * + * + *
+   * The network status of a specific router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus getResult() { + return result_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance() + : result_; + } + /** + * + * + *
+   * The network status of a specific router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder getResultOrBuilder() { + return result_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance() + : 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 (updateTime_ != null) { + output.writeMessage(1, getUpdateTime()); + } + if (result_ != null) { + output.writeMessage(2, getResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateTime()); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResult()); + } + 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.edgenetwork.v1.DiagnoseRouterResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse other = + (com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult().equals(other.getResult())) 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 (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse 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.edgenetwork.v1.DiagnoseRouterResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse 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.edgenetwork.v1.DiagnoseRouterResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse 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.edgenetwork.v1.DiagnoseRouterResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse 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.edgenetwork.v1.DiagnoseRouterResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse 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.edgenetwork.v1.DiagnoseRouterResponse 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; + } + /** + * + * + *
+   * DiagnoseRouterResponse contains the current status for a specific router.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.DiagnoseRouterResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.DiagnoseRouterResponse) + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.class, + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse build() { + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse buildPartial() { + com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse result = + new com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.result_ = resultBuilder_ == null ? result_ : resultBuilder_.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.edgenetwork.v1.DiagnoseRouterResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse other) { + if (other == com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse.getDefaultInstance()) + return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + 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(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + 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 com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @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(); + } + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The time when the router status was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + 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.cloud.edgenetwork.v1.RouterStatus result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus, + com.google.cloud.edgenetwork.v1.RouterStatus.Builder, + com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder> + resultBuilder_; + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + * + * @return Whether the result field is set. + */ + public boolean hasResult() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + * + * @return The result. + */ + public com.google.cloud.edgenetwork.v1.RouterStatus getResult() { + if (resultBuilder_ == null) { + return result_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance() + : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + public Builder setResult(com.google.cloud.edgenetwork.v1.RouterStatus value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + } else { + resultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + public Builder setResult(com.google.cloud.edgenetwork.v1.RouterStatus.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + public Builder mergeResult(com.google.cloud.edgenetwork.v1.RouterStatus value) { + if (resultBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && result_ != null + && result_ != com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance()) { + getResultBuilder().mergeFrom(value); + } else { + result_ = value; + } + } else { + resultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000002); + result_ = null; + if (resultBuilder_ != null) { + resultBuilder_.dispose(); + resultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.Builder getResultBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + public com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance() + : result_; + } + } + /** + * + * + *
+     * The network status of a specific router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus, + com.google.cloud.edgenetwork.v1.RouterStatus.Builder, + com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus, + com.google.cloud.edgenetwork.v1.RouterStatus.Builder, + com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder>( + getResult(), getParentForChildren(), isClean()); + result_ = null; + } + return resultBuilder_; + } + + @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.edgenetwork.v1.DiagnoseRouterResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.DiagnoseRouterResponse) + private static final com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse(); + } + + public static com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiagnoseRouterResponse 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.edgenetwork.v1.DiagnoseRouterResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponseOrBuilder.java new file mode 100644 index 000000000000..136d09b77d1c --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/DiagnoseRouterResponseOrBuilder.java @@ -0,0 +1,95 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface DiagnoseRouterResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.DiagnoseRouterResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time when the router status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The time when the router status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The time when the router status was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The network status of a specific router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + * + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + * + * + *
+   * The network status of a specific router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + * + * @return The result. + */ + com.google.cloud.edgenetwork.v1.RouterStatus getResult(); + /** + * + * + *
+   * The network status of a specific router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus result = 2; + */ + com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder getResultOrBuilder(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequest.java new file mode 100644 index 000000000000..ae987469a6c9 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequest.java @@ -0,0 +1,647 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for getting a InterconnectAttachment
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest} + */ +public final class GetInterconnectAttachmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) + GetInterconnectAttachmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInterconnectAttachmentRequest.newBuilder() to construct. + private GetInterconnectAttachmentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInterconnectAttachmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInterconnectAttachmentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.class, + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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.edgenetwork.v1.GetInterconnectAttachmentRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest other = + (com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) 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.edgenetwork.v1.GetInterconnectAttachmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest 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; + } + /** + * + * + *
+   * Message for getting a InterconnectAttachment
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.class, + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest build() { + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest buildPartial() { + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest result = + new com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest other) { + if (other + == com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest.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. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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.edgenetwork.v1.GetInterconnectAttachmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) + private static final com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest(); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInterconnectAttachmentRequest 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.edgenetwork.v1.GetInterconnectAttachmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequestOrBuilder.java new file mode 100644 index 000000000000..c3ee70c480fb --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectAttachmentRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface GetInterconnectAttachmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequest.java new file mode 100644 index 000000000000..7d15a632911e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequest.java @@ -0,0 +1,639 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for getting a Interconnect
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetInterconnectRequest} + */ +public final class GetInterconnectRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.GetInterconnectRequest) + GetInterconnectRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInterconnectRequest.newBuilder() to construct. + private GetInterconnectRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInterconnectRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInterconnectRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetInterconnectRequest.class, + com.google.cloud.edgenetwork.v1.GetInterconnectRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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.edgenetwork.v1.GetInterconnectRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.GetInterconnectRequest other = + (com.google.cloud.edgenetwork.v1.GetInterconnectRequest) 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.edgenetwork.v1.GetInterconnectRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest 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; + } + /** + * + * + *
+   * Message for getting a Interconnect
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetInterconnectRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.GetInterconnectRequest) + com.google.cloud.edgenetwork.v1.GetInterconnectRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetInterconnectRequest.class, + com.google.cloud.edgenetwork.v1.GetInterconnectRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.GetInterconnectRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetInterconnectRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.GetInterconnectRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetInterconnectRequest build() { + com.google.cloud.edgenetwork.v1.GetInterconnectRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetInterconnectRequest buildPartial() { + com.google.cloud.edgenetwork.v1.GetInterconnectRequest result = + new com.google.cloud.edgenetwork.v1.GetInterconnectRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.GetInterconnectRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.GetInterconnectRequest other) { + if (other == com.google.cloud.edgenetwork.v1.GetInterconnectRequest.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. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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.edgenetwork.v1.GetInterconnectRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.GetInterconnectRequest) + private static final com.google.cloud.edgenetwork.v1.GetInterconnectRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.GetInterconnectRequest(); + } + + public static com.google.cloud.edgenetwork.v1.GetInterconnectRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInterconnectRequest 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.edgenetwork.v1.GetInterconnectRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequestOrBuilder.java new file mode 100644 index 000000000000..d942b71daa62 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetInterconnectRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface GetInterconnectRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.GetInterconnectRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequest.java new file mode 100644 index 000000000000..e1b220559615 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequest.java @@ -0,0 +1,638 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for getting a Network
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetNetworkRequest} + */ +public final class GetNetworkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.GetNetworkRequest) + GetNetworkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNetworkRequest.newBuilder() to construct. + private GetNetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNetworkRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNetworkRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetNetworkRequest.class, + com.google.cloud.edgenetwork.v1.GetNetworkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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.edgenetwork.v1.GetNetworkRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.GetNetworkRequest other = + (com.google.cloud.edgenetwork.v1.GetNetworkRequest) 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.edgenetwork.v1.GetNetworkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest 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; + } + /** + * + * + *
+   * Message for getting a Network
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetNetworkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.GetNetworkRequest) + com.google.cloud.edgenetwork.v1.GetNetworkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetNetworkRequest.class, + com.google.cloud.edgenetwork.v1.GetNetworkRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.GetNetworkRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetNetworkRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.GetNetworkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetNetworkRequest build() { + com.google.cloud.edgenetwork.v1.GetNetworkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetNetworkRequest buildPartial() { + com.google.cloud.edgenetwork.v1.GetNetworkRequest result = + new com.google.cloud.edgenetwork.v1.GetNetworkRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.GetNetworkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.GetNetworkRequest other) { + if (other == com.google.cloud.edgenetwork.v1.GetNetworkRequest.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. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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.edgenetwork.v1.GetNetworkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.GetNetworkRequest) + private static final com.google.cloud.edgenetwork.v1.GetNetworkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.GetNetworkRequest(); + } + + public static com.google.cloud.edgenetwork.v1.GetNetworkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNetworkRequest 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.edgenetwork.v1.GetNetworkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequestOrBuilder.java new file mode 100644 index 000000000000..a7ad34564287 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetNetworkRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface GetNetworkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.GetNetworkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequest.java new file mode 100644 index 000000000000..006b8d1301ab --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequest.java @@ -0,0 +1,638 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for getting a Router
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetRouterRequest} + */ +public final class GetRouterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.GetRouterRequest) + GetRouterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRouterRequest.newBuilder() to construct. + private GetRouterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRouterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRouterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetRouterRequest.class, + com.google.cloud.edgenetwork.v1.GetRouterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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.edgenetwork.v1.GetRouterRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.GetRouterRequest other = + (com.google.cloud.edgenetwork.v1.GetRouterRequest) 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.edgenetwork.v1.GetRouterRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest 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.edgenetwork.v1.GetRouterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest 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.edgenetwork.v1.GetRouterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest 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.edgenetwork.v1.GetRouterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest 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.edgenetwork.v1.GetRouterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest 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.edgenetwork.v1.GetRouterRequest 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; + } + /** + * + * + *
+   * Message for getting a Router
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetRouterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.GetRouterRequest) + com.google.cloud.edgenetwork.v1.GetRouterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetRouterRequest.class, + com.google.cloud.edgenetwork.v1.GetRouterRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.GetRouterRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetRouterRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.GetRouterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetRouterRequest build() { + com.google.cloud.edgenetwork.v1.GetRouterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetRouterRequest buildPartial() { + com.google.cloud.edgenetwork.v1.GetRouterRequest result = + new com.google.cloud.edgenetwork.v1.GetRouterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.GetRouterRequest 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.edgenetwork.v1.GetRouterRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.GetRouterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.GetRouterRequest other) { + if (other == com.google.cloud.edgenetwork.v1.GetRouterRequest.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. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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.edgenetwork.v1.GetRouterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.GetRouterRequest) + private static final com.google.cloud.edgenetwork.v1.GetRouterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.GetRouterRequest(); + } + + public static com.google.cloud.edgenetwork.v1.GetRouterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRouterRequest 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.edgenetwork.v1.GetRouterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequestOrBuilder.java new file mode 100644 index 000000000000..6649c92f815c --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetRouterRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface GetRouterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.GetRouterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequest.java new file mode 100644 index 000000000000..54f17ef24406 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequest.java @@ -0,0 +1,638 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for getting a Subnet
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetSubnetRequest} + */ +public final class GetSubnetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.GetSubnetRequest) + GetSubnetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSubnetRequest.newBuilder() to construct. + private GetSubnetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSubnetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSubnetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetSubnetRequest.class, + com.google.cloud.edgenetwork.v1.GetSubnetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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.edgenetwork.v1.GetSubnetRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.GetSubnetRequest other = + (com.google.cloud.edgenetwork.v1.GetSubnetRequest) 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.edgenetwork.v1.GetSubnetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest 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; + } + /** + * + * + *
+   * Message for getting a Subnet
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetSubnetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.GetSubnetRequest) + com.google.cloud.edgenetwork.v1.GetSubnetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetSubnetRequest.class, + com.google.cloud.edgenetwork.v1.GetSubnetRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.GetSubnetRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetSubnetRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.GetSubnetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetSubnetRequest build() { + com.google.cloud.edgenetwork.v1.GetSubnetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetSubnetRequest buildPartial() { + com.google.cloud.edgenetwork.v1.GetSubnetRequest result = + new com.google.cloud.edgenetwork.v1.GetSubnetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.GetSubnetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.GetSubnetRequest other) { + if (other == com.google.cloud.edgenetwork.v1.GetSubnetRequest.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. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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.edgenetwork.v1.GetSubnetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.GetSubnetRequest) + private static final com.google.cloud.edgenetwork.v1.GetSubnetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.GetSubnetRequest(); + } + + public static com.google.cloud.edgenetwork.v1.GetSubnetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubnetRequest 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.edgenetwork.v1.GetSubnetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequestOrBuilder.java new file mode 100644 index 000000000000..faf0f8807537 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetSubnetRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface GetSubnetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.GetSubnetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequest.java new file mode 100644 index 000000000000..0acff4fbaf24 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequest.java @@ -0,0 +1,637 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for getting a Zone
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetZoneRequest} + */ +public final class GetZoneRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.GetZoneRequest) + GetZoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetZoneRequest.newBuilder() to construct. + private GetZoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetZoneRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetZoneRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetZoneRequest.class, + com.google.cloud.edgenetwork.v1.GetZoneRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the 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. Name of the 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.edgenetwork.v1.GetZoneRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.GetZoneRequest other = + (com.google.cloud.edgenetwork.v1.GetZoneRequest) 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.edgenetwork.v1.GetZoneRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest 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.edgenetwork.v1.GetZoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest 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.edgenetwork.v1.GetZoneRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest 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.edgenetwork.v1.GetZoneRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest 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.edgenetwork.v1.GetZoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest 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.edgenetwork.v1.GetZoneRequest 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; + } + /** + * + * + *
+   * Message for getting a Zone
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.GetZoneRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.GetZoneRequest) + com.google.cloud.edgenetwork.v1.GetZoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.GetZoneRequest.class, + com.google.cloud.edgenetwork.v1.GetZoneRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.GetZoneRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetZoneRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.GetZoneRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetZoneRequest build() { + com.google.cloud.edgenetwork.v1.GetZoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.GetZoneRequest buildPartial() { + com.google.cloud.edgenetwork.v1.GetZoneRequest result = + new com.google.cloud.edgenetwork.v1.GetZoneRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.GetZoneRequest 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.edgenetwork.v1.GetZoneRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.GetZoneRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.GetZoneRequest other) { + if (other == com.google.cloud.edgenetwork.v1.GetZoneRequest.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. Name of the 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. Name of the 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. Name of the 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. Name of the 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. Name of the 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.edgenetwork.v1.GetZoneRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.GetZoneRequest) + private static final com.google.cloud.edgenetwork.v1.GetZoneRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.GetZoneRequest(); + } + + public static com.google.cloud.edgenetwork.v1.GetZoneRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetZoneRequest 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.edgenetwork.v1.GetZoneRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequestOrBuilder.java new file mode 100644 index 000000000000..bd32d6386288 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/GetZoneRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface GetZoneRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.GetZoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequest.java new file mode 100644 index 000000000000..f4db4200e9b3 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequest.java @@ -0,0 +1,639 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for initializing a specified zone
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InitializeZoneRequest} + */ +public final class InitializeZoneRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InitializeZoneRequest) + InitializeZoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use InitializeZoneRequest.newBuilder() to construct. + private InitializeZoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InitializeZoneRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InitializeZoneRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InitializeZoneRequest.class, + com.google.cloud.edgenetwork.v1.InitializeZoneRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the zone 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 zone 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.edgenetwork.v1.InitializeZoneRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InitializeZoneRequest other = + (com.google.cloud.edgenetwork.v1.InitializeZoneRequest) 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.edgenetwork.v1.InitializeZoneRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest 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; + } + /** + * + * + *
+   * Message for initializing a specified zone
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InitializeZoneRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InitializeZoneRequest) + com.google.cloud.edgenetwork.v1.InitializeZoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InitializeZoneRequest.class, + com.google.cloud.edgenetwork.v1.InitializeZoneRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.InitializeZoneRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InitializeZoneRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InitializeZoneRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InitializeZoneRequest build() { + com.google.cloud.edgenetwork.v1.InitializeZoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InitializeZoneRequest buildPartial() { + com.google.cloud.edgenetwork.v1.InitializeZoneRequest result = + new com.google.cloud.edgenetwork.v1.InitializeZoneRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.InitializeZoneRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.InitializeZoneRequest other) { + if (other == com.google.cloud.edgenetwork.v1.InitializeZoneRequest.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 zone 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 zone 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 zone 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 zone 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 zone 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.edgenetwork.v1.InitializeZoneRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InitializeZoneRequest) + private static final com.google.cloud.edgenetwork.v1.InitializeZoneRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.InitializeZoneRequest(); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitializeZoneRequest 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.edgenetwork.v1.InitializeZoneRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequestOrBuilder.java new file mode 100644 index 000000000000..e69826bed71d --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneRequestOrBuilder.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface InitializeZoneRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InitializeZoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the zone 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 zone 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponse.java new file mode 100644 index 000000000000..add77fe6b8a8 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponse.java @@ -0,0 +1,432 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * The response of initializing a zone
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InitializeZoneResponse} + */ +public final class InitializeZoneResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InitializeZoneResponse) + InitializeZoneResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use InitializeZoneResponse.newBuilder() to construct. + private InitializeZoneResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InitializeZoneResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InitializeZoneResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InitializeZoneResponse.class, + com.google.cloud.edgenetwork.v1.InitializeZoneResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.edgenetwork.v1.InitializeZoneResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InitializeZoneResponse other = + (com.google.cloud.edgenetwork.v1.InitializeZoneResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse 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.edgenetwork.v1.InitializeZoneResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse 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.edgenetwork.v1.InitializeZoneResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse 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.edgenetwork.v1.InitializeZoneResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse 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.edgenetwork.v1.InitializeZoneResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse 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.edgenetwork.v1.InitializeZoneResponse 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 of initializing a zone
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InitializeZoneResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InitializeZoneResponse) + com.google.cloud.edgenetwork.v1.InitializeZoneResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InitializeZoneResponse.class, + com.google.cloud.edgenetwork.v1.InitializeZoneResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.InitializeZoneResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InitializeZoneResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InitializeZoneResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InitializeZoneResponse build() { + com.google.cloud.edgenetwork.v1.InitializeZoneResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InitializeZoneResponse buildPartial() { + com.google.cloud.edgenetwork.v1.InitializeZoneResponse result = + new com.google.cloud.edgenetwork.v1.InitializeZoneResponse(this); + onBuilt(); + return result; + } + + @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.edgenetwork.v1.InitializeZoneResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.InitializeZoneResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.InitializeZoneResponse other) { + if (other == com.google.cloud.edgenetwork.v1.InitializeZoneResponse.getDefaultInstance()) + return this; + 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; + 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; + } + + @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.edgenetwork.v1.InitializeZoneResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InitializeZoneResponse) + private static final com.google.cloud.edgenetwork.v1.InitializeZoneResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.InitializeZoneResponse(); + } + + public static com.google.cloud.edgenetwork.v1.InitializeZoneResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitializeZoneResponse 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.edgenetwork.v1.InitializeZoneResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponseOrBuilder.java new file mode 100644 index 000000000000..aa30b88a39c6 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InitializeZoneResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface InitializeZoneResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InitializeZoneResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Interconnect.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Interconnect.java new file mode 100644 index 000000000000..4cc5bf2f3821 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Interconnect.java @@ -0,0 +1,2685 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message describing Interconnect object
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Interconnect} + */ +public final class Interconnect extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Interconnect) + InterconnectOrBuilder { + private static final long serialVersionUID = 0L; + // Use Interconnect.newBuilder() to construct. + private Interconnect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Interconnect() { + name_ = ""; + description_ = ""; + interconnectType_ = 0; + uuid_ = ""; + deviceCloudResourceName_ = ""; + physicalPorts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Interconnect(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Interconnect_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Interconnect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Interconnect.class, + com.google.cloud.edgenetwork.v1.Interconnect.Builder.class); + } + + /** + * + * + *
+   * Type of interconnect.
+   * 
+ * + * Protobuf enum {@code google.cloud.edgenetwork.v1.Interconnect.InterconnectType} + */ + public enum InterconnectType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * INTERCONNECT_TYPE_UNSPECIFIED = 0; + */ + INTERCONNECT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Dedicated Interconnect.
+     * 
+ * + * DEDICATED = 1; + */ + DEDICATED(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified.
+     * 
+ * + * INTERCONNECT_TYPE_UNSPECIFIED = 0; + */ + public static final int INTERCONNECT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Dedicated Interconnect.
+     * 
+ * + * DEDICATED = 1; + */ + public static final int DEDICATED_VALUE = 1; + + 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 InterconnectType 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 InterconnectType forNumber(int value) { + switch (value) { + case 0: + return INTERCONNECT_TYPE_UNSPECIFIED; + case 1: + return DEDICATED; + 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 InterconnectType findValueByNumber(int number) { + return InterconnectType.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.edgenetwork.v1.Interconnect.getDescriptor().getEnumTypes().get(0); + } + + private static final InterconnectType[] VALUES = values(); + + public static InterconnectType 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 InterconnectType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.edgenetwork.v1.Interconnect.InterconnectType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The canonical resource name of the interconnect.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Interconnect_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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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; + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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 INTERCONNECT_TYPE_FIELD_NUMBER = 6; + private int interconnectType_ = 0; + /** + * + * + *
+   * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+   * now.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for interconnectType. + */ + @java.lang.Override + public int getInterconnectTypeValue() { + return interconnectType_; + } + /** + * + * + *
+   * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+   * now.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interconnectType. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType getInterconnectType() { + com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType result = + com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType.forNumber(interconnectType_); + return result == null + ? com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType.UNRECOGNIZED + : result; + } + + public static final int UUID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; + /** + * + * + *
+   * Output only. Unique identifier for the link.
+   * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + 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(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier for the link.
+   * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_CLOUD_RESOURCE_NAME_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object deviceCloudResourceName_ = ""; + /** + * + * + *
+   * Output only. Cloud resource name of the switch device.
+   * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deviceCloudResourceName. + */ + @java.lang.Override + public java.lang.String getDeviceCloudResourceName() { + java.lang.Object ref = deviceCloudResourceName_; + 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(); + deviceCloudResourceName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud resource name of the switch device.
+   * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for deviceCloudResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceCloudResourceNameBytes() { + java.lang.Object ref = deviceCloudResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceCloudResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHYSICAL_PORTS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList physicalPorts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the physicalPorts. + */ + public com.google.protobuf.ProtocolStringList getPhysicalPortsList() { + return physicalPorts_; + } + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of physicalPorts. + */ + public int getPhysicalPortsCount() { + return physicalPorts_.size(); + } + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The physicalPorts at the given index. + */ + public java.lang.String getPhysicalPorts(int index) { + return physicalPorts_.get(index); + } + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the physicalPorts at the given index. + */ + public com.google.protobuf.ByteString getPhysicalPortsBytes(int index) { + return physicalPorts_.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(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 (interconnectType_ + != com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType + .INTERCONNECT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, interconnectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, uuid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceCloudResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, deviceCloudResourceName_); + } + for (int i = 0; i < physicalPorts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, physicalPorts_.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(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 (interconnectType_ + != com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType + .INTERCONNECT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, interconnectType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, uuid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceCloudResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, deviceCloudResourceName_); + } + { + int dataSize = 0; + for (int i = 0; i < physicalPorts_.size(); i++) { + dataSize += computeStringSizeNoTag(physicalPorts_.getRaw(i)); + } + size += dataSize; + size += 1 * getPhysicalPortsList().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.edgenetwork.v1.Interconnect)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Interconnect other = + (com.google.cloud.edgenetwork.v1.Interconnect) 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 (interconnectType_ != other.interconnectType_) return false; + if (!getUuid().equals(other.getUuid())) return false; + if (!getDeviceCloudResourceName().equals(other.getDeviceCloudResourceName())) return false; + if (!getPhysicalPortsList().equals(other.getPhysicalPortsList())) 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) + INTERCONNECT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + interconnectType_; + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (37 * hash) + DEVICE_CLOUD_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceCloudResourceName().hashCode(); + if (getPhysicalPortsCount() > 0) { + hash = (37 * hash) + PHYSICAL_PORTS_FIELD_NUMBER; + hash = (53 * hash) + getPhysicalPortsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Interconnect parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect 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.edgenetwork.v1.Interconnect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect 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.edgenetwork.v1.Interconnect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect 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.edgenetwork.v1.Interconnect parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect 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.edgenetwork.v1.Interconnect parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect 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.edgenetwork.v1.Interconnect 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; + } + /** + * + * + *
+   * Message describing Interconnect object
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Interconnect} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Interconnect) + com.google.cloud.edgenetwork.v1.InterconnectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Interconnect_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Interconnect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Interconnect.class, + com.google.cloud.edgenetwork.v1.Interconnect.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Interconnect.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_ = ""; + interconnectType_ = 0; + uuid_ = ""; + deviceCloudResourceName_ = ""; + physicalPorts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Interconnect_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Interconnect getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Interconnect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Interconnect build() { + com.google.cloud.edgenetwork.v1.Interconnect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Interconnect buildPartial() { + com.google.cloud.edgenetwork.v1.Interconnect result = + new com.google.cloud.edgenetwork.v1.Interconnect(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Interconnect 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.interconnectType_ = interconnectType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.uuid_ = uuid_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.deviceCloudResourceName_ = deviceCloudResourceName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + physicalPorts_.makeImmutable(); + result.physicalPorts_ = physicalPorts_; + } + } + + @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.edgenetwork.v1.Interconnect) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Interconnect) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Interconnect other) { + if (other == com.google.cloud.edgenetwork.v1.Interconnect.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.interconnectType_ != 0) { + setInterconnectTypeValue(other.getInterconnectTypeValue()); + } + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getDeviceCloudResourceName().isEmpty()) { + deviceCloudResourceName_ = other.deviceCloudResourceName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.physicalPorts_.isEmpty()) { + if (physicalPorts_.isEmpty()) { + physicalPorts_ = other.physicalPorts_; + bitField0_ |= 0x00000100; + } else { + ensurePhysicalPortsIsMutable(); + physicalPorts_.addAll(other.physicalPorts_); + } + 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: + { + 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 48: + { + interconnectType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + deviceCloudResourceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePhysicalPortsIsMutable(); + physicalPorts_.add(s); + break; + } // case 74 + 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 canonical resource name of the interconnect.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical resource name of the interconnect.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Optional. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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 int interconnectType_ = 0; + /** + * + * + *
+     * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+     * now.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for interconnectType. + */ + @java.lang.Override + public int getInterconnectTypeValue() { + return interconnectType_; + } + /** + * + * + *
+     * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+     * now.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for interconnectType to set. + * @return This builder for chaining. + */ + public Builder setInterconnectTypeValue(int value) { + interconnectType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+     * now.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interconnectType. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType getInterconnectType() { + com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType result = + com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType.forNumber( + interconnectType_); + return result == null + ? com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+     * now.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The interconnectType to set. + * @return This builder for chaining. + */ + public Builder setInterconnectType( + com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + interconnectType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+     * now.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearInterconnectType() { + bitField0_ = (bitField0_ & ~0x00000020); + interconnectType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier for the link.
+     * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier for the link.
+     * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier for the link.
+     * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier for the link.
+     * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier for the link.
+     * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object deviceCloudResourceName_ = ""; + /** + * + * + *
+     * Output only. Cloud resource name of the switch device.
+     * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deviceCloudResourceName. + */ + public java.lang.String getDeviceCloudResourceName() { + java.lang.Object ref = deviceCloudResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceCloudResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud resource name of the switch device.
+     * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for deviceCloudResourceName. + */ + public com.google.protobuf.ByteString getDeviceCloudResourceNameBytes() { + java.lang.Object ref = deviceCloudResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceCloudResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud resource name of the switch device.
+     * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The deviceCloudResourceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceCloudResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceCloudResourceName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud resource name of the switch device.
+     * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeviceCloudResourceName() { + deviceCloudResourceName_ = getDefaultInstance().getDeviceCloudResourceName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud resource name of the switch device.
+     * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for deviceCloudResourceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceCloudResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceCloudResourceName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList physicalPorts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePhysicalPortsIsMutable() { + if (!physicalPorts_.isModifiable()) { + physicalPorts_ = new com.google.protobuf.LazyStringArrayList(physicalPorts_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the physicalPorts. + */ + public com.google.protobuf.ProtocolStringList getPhysicalPortsList() { + physicalPorts_.makeImmutable(); + return physicalPorts_; + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of physicalPorts. + */ + public int getPhysicalPortsCount() { + return physicalPorts_.size(); + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The physicalPorts at the given index. + */ + public java.lang.String getPhysicalPorts(int index) { + return physicalPorts_.get(index); + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the physicalPorts at the given index. + */ + public com.google.protobuf.ByteString getPhysicalPortsBytes(int index) { + return physicalPorts_.getByteString(index); + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The physicalPorts to set. + * @return This builder for chaining. + */ + public Builder setPhysicalPorts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhysicalPortsIsMutable(); + physicalPorts_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The physicalPorts to add. + * @return This builder for chaining. + */ + public Builder addPhysicalPorts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhysicalPortsIsMutable(); + physicalPorts_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The physicalPorts to add. + * @return This builder for chaining. + */ + public Builder addAllPhysicalPorts(java.lang.Iterable values) { + ensurePhysicalPortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, physicalPorts_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPhysicalPorts() { + physicalPorts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+     * interconnect.
+     * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the physicalPorts to add. + * @return This builder for chaining. + */ + public Builder addPhysicalPortsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePhysicalPortsIsMutable(); + physicalPorts_.add(value); + bitField0_ |= 0x00000100; + 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.edgenetwork.v1.Interconnect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Interconnect) + private static final com.google.cloud.edgenetwork.v1.Interconnect DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Interconnect(); + } + + public static com.google.cloud.edgenetwork.v1.Interconnect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Interconnect 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.edgenetwork.v1.Interconnect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachment.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachment.java new file mode 100644 index 000000000000..4d3efc9fb835 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachment.java @@ -0,0 +1,2477 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message describing InterconnectAttachment object
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectAttachment} + */ +public final class InterconnectAttachment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InterconnectAttachment) + InterconnectAttachmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use InterconnectAttachment.newBuilder() to construct. + private InterconnectAttachment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InterconnectAttachment() { + name_ = ""; + description_ = ""; + interconnect_ = ""; + network_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InterconnectAttachment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectAttachment.class, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The canonical resource name of the interconnect attachment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect attachment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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; + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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 INTERCONNECT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object interconnect_ = ""; + /** + * + * + *
+   * Required. The canonical name of underlying Interconnect object that this
+   * attachment's traffic will traverse through. The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+   * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The interconnect. + */ + @java.lang.Override + public java.lang.String getInterconnect() { + java.lang.Object ref = interconnect_; + 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(); + interconnect_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The canonical name of underlying Interconnect object that this
+   * attachment's traffic will traverse through. The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+   * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for interconnect. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterconnectBytes() { + java.lang.Object ref = interconnect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interconnect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Optional. The canonical Network name in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The canonical Network name in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VLAN_ID_FIELD_NUMBER = 8; + private int vlanId_ = 0; + /** + * + * + *
+   * Required. VLAN id provided by user. Must be site-wise unique.
+   * 
+ * + * int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + + public static final int MTU_FIELD_NUMBER = 9; + private int mtu_ = 0; + /** + * + * + *
+   * IP (L3) MTU value of the virtual edge cloud.
+   * Valid values are: 1500 and 9000.
+   * Default to 1500 if not set.
+   * 
+ * + * int32 mtu = 9; + * + * @return The mtu. + */ + @java.lang.Override + public int getMtu() { + return mtu_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ResourceState getState() { + com.google.cloud.edgenetwork.v1.ResourceState result = + com.google.cloud.edgenetwork.v1.ResourceState.forNumber(state_); + return result == null ? com.google.cloud.edgenetwork.v1.ResourceState.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(interconnect_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, interconnect_); + } + if (vlanId_ != 0) { + output.writeInt32(8, vlanId_); + } + if (mtu_ != 0) { + output.writeInt32(9, mtu_); + } + if (state_ != com.google.cloud.edgenetwork.v1.ResourceState.STATE_UNKNOWN.getNumber()) { + output.writeEnum(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, network_); + } + 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(interconnect_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, interconnect_); + } + if (vlanId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, vlanId_); + } + if (mtu_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, mtu_); + } + if (state_ != com.google.cloud.edgenetwork.v1.ResourceState.STATE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, network_); + } + 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.edgenetwork.v1.InterconnectAttachment)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InterconnectAttachment other = + (com.google.cloud.edgenetwork.v1.InterconnectAttachment) 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 (!getInterconnect().equals(other.getInterconnect())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (getVlanId() != other.getVlanId()) return false; + if (getMtu() != other.getMtu()) 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) + INTERCONNECT_FIELD_NUMBER; + hash = (53 * hash) + getInterconnect().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + VLAN_ID_FIELD_NUMBER; + hash = (53 * hash) + getVlanId(); + hash = (37 * hash) + MTU_FIELD_NUMBER; + hash = (53 * hash) + getMtu(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment 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.edgenetwork.v1.InterconnectAttachment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment 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.edgenetwork.v1.InterconnectAttachment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment 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.edgenetwork.v1.InterconnectAttachment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment 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.edgenetwork.v1.InterconnectAttachment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment 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.edgenetwork.v1.InterconnectAttachment 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; + } + /** + * + * + *
+   * Message describing InterconnectAttachment object
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectAttachment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InterconnectAttachment) + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectAttachment.class, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.InterconnectAttachment.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_ = ""; + interconnect_ = ""; + network_ = ""; + vlanId_ = 0; + mtu_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachment getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachment build() { + com.google.cloud.edgenetwork.v1.InterconnectAttachment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachment buildPartial() { + com.google.cloud.edgenetwork.v1.InterconnectAttachment result = + new com.google.cloud.edgenetwork.v1.InterconnectAttachment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.InterconnectAttachment 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.interconnect_ = interconnect_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.vlanId_ = vlanId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.mtu_ = mtu_; + } + if (((from_bitField0_ & 0x00000200) != 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.edgenetwork.v1.InterconnectAttachment) { + return mergeFrom((com.google.cloud.edgenetwork.v1.InterconnectAttachment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.InterconnectAttachment other) { + if (other == com.google.cloud.edgenetwork.v1.InterconnectAttachment.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.getInterconnect().isEmpty()) { + interconnect_ = other.interconnect_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getVlanId() != 0) { + setVlanId(other.getVlanId()); + } + if (other.getMtu() != 0) { + setMtu(other.getMtu()); + } + 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: + { + interconnect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 64: + { + vlanId_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + mtu_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 90 + 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 canonical resource name of the interconnect attachment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect attachment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect attachment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the interconnect attachment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical resource name of the interconnect attachment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Optional. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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 interconnect_ = ""; + /** + * + * + *
+     * Required. The canonical name of underlying Interconnect object that this
+     * attachment's traffic will traverse through. The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+     * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The interconnect. + */ + public java.lang.String getInterconnect() { + java.lang.Object ref = interconnect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interconnect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The canonical name of underlying Interconnect object that this
+     * attachment's traffic will traverse through. The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+     * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for interconnect. + */ + public com.google.protobuf.ByteString getInterconnectBytes() { + java.lang.Object ref = interconnect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interconnect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The canonical name of underlying Interconnect object that this
+     * attachment's traffic will traverse through. The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+     * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The interconnect to set. + * @return This builder for chaining. + */ + public Builder setInterconnect(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interconnect_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical name of underlying Interconnect object that this
+     * attachment's traffic will traverse through. The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+     * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearInterconnect() { + interconnect_ = getDefaultInstance().getInterconnect(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical name of underlying Interconnect object that this
+     * attachment's traffic will traverse through. The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+     * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for interconnect to set. + * @return This builder for chaining. + */ + public Builder setInterconnectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interconnect_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Optional. The canonical Network name in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The canonical Network name in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The canonical Network name in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The canonical Network name in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The canonical Network name in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int vlanId_; + /** + * + * + *
+     * Required. VLAN id provided by user. Must be site-wise unique.
+     * 
+ * + * int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + /** + * + * + *
+     * Required. VLAN id provided by user. Must be site-wise unique.
+     * 
+ * + * int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vlanId to set. + * @return This builder for chaining. + */ + public Builder setVlanId(int value) { + + vlanId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. VLAN id provided by user. Must be site-wise unique.
+     * 
+ * + * int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVlanId() { + bitField0_ = (bitField0_ & ~0x00000080); + vlanId_ = 0; + onChanged(); + return this; + } + + private int mtu_; + /** + * + * + *
+     * IP (L3) MTU value of the virtual edge cloud.
+     * Valid values are: 1500 and 9000.
+     * Default to 1500 if not set.
+     * 
+ * + * int32 mtu = 9; + * + * @return The mtu. + */ + @java.lang.Override + public int getMtu() { + return mtu_; + } + /** + * + * + *
+     * IP (L3) MTU value of the virtual edge cloud.
+     * Valid values are: 1500 and 9000.
+     * Default to 1500 if not set.
+     * 
+ * + * int32 mtu = 9; + * + * @param value The mtu to set. + * @return This builder for chaining. + */ + public Builder setMtu(int value) { + + mtu_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * IP (L3) MTU value of the virtual edge cloud.
+     * Valid values are: 1500 and 9000.
+     * Default to 1500 if not set.
+     * 
+ * + * int32 mtu = 9; + * + * @return This builder for chaining. + */ + public Builder clearMtu() { + bitField0_ = (bitField0_ & ~0x00000100); + mtu_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ResourceState getState() { + com.google.cloud.edgenetwork.v1.ResourceState result = + com.google.cloud.edgenetwork.v1.ResourceState.forNumber(state_); + return result == null ? com.google.cloud.edgenetwork.v1.ResourceState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.edgenetwork.v1.ResourceState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + 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.edgenetwork.v1.InterconnectAttachment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InterconnectAttachment) + private static final com.google.cloud.edgenetwork.v1.InterconnectAttachment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.InterconnectAttachment(); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectAttachment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InterconnectAttachment 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.edgenetwork.v1.InterconnectAttachment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentName.java new file mode 100644 index 000000000000..3c65ff42fa20 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentName.java @@ -0,0 +1,270 @@ +/* + * 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.edgenetwork.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 InterconnectAttachmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE_INTERCONNECT_ATTACHMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/zones/{zone}/interconnectAttachments/{interconnect_attachment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + private final String interconnectAttachment; + + @Deprecated + protected InterconnectAttachmentName() { + project = null; + location = null; + zone = null; + interconnectAttachment = null; + } + + private InterconnectAttachmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + interconnectAttachment = Preconditions.checkNotNull(builder.getInterconnectAttachment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getInterconnectAttachment() { + return interconnectAttachment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InterconnectAttachmentName of( + String project, String location, String zone, String interconnectAttachment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setInterconnectAttachment(interconnectAttachment) + .build(); + } + + public static String format( + String project, String location, String zone, String interconnectAttachment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setInterconnectAttachment(interconnectAttachment) + .build() + .toString(); + } + + public static InterconnectAttachmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE_INTERCONNECT_ATTACHMENT.validatedMatch( + formattedString, + "InterconnectAttachmentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("zone"), + matchMap.get("interconnect_attachment")); + } + + 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 (InterconnectAttachmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE_INTERCONNECT_ATTACHMENT.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (zone != null) { + fieldMapBuilder.put("zone", zone); + } + if (interconnectAttachment != null) { + fieldMapBuilder.put("interconnect_attachment", interconnectAttachment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE_INTERCONNECT_ATTACHMENT.instantiate( + "project", + project, + "location", + location, + "zone", + zone, + "interconnect_attachment", + interconnectAttachment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InterconnectAttachmentName that = ((InterconnectAttachmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone) + && Objects.equals(this.interconnectAttachment, that.interconnectAttachment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(zone); + h *= 1000003; + h ^= Objects.hashCode(interconnectAttachment); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/zones/{zone}/interconnectAttachments/{interconnect_attachment}. + */ + public static class Builder { + private String project; + private String location; + private String zone; + private String interconnectAttachment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getInterconnectAttachment() { + return interconnectAttachment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public Builder setInterconnectAttachment(String interconnectAttachment) { + this.interconnectAttachment = interconnectAttachment; + return this; + } + + private Builder(InterconnectAttachmentName interconnectAttachmentName) { + this.project = interconnectAttachmentName.project; + this.location = interconnectAttachmentName.location; + this.zone = interconnectAttachmentName.zone; + this.interconnectAttachment = interconnectAttachmentName.interconnectAttachment; + } + + public InterconnectAttachmentName build() { + return new InterconnectAttachmentName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentOrBuilder.java new file mode 100644 index 000000000000..2a5285bd66b1 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectAttachmentOrBuilder.java @@ -0,0 +1,332 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface InterconnectAttachmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InterconnectAttachment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The canonical resource name of the interconnect attachment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The canonical resource name of the interconnect attachment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the interconnect attachment 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 when the interconnect attachment 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 when the interconnect attachment was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The canonical name of underlying Interconnect object that this
+   * attachment's traffic will traverse through. The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+   * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The interconnect. + */ + java.lang.String getInterconnect(); + /** + * + * + *
+   * Required. The canonical name of underlying Interconnect object that this
+   * attachment's traffic will traverse through. The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
+   * 
+ * + * + * string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for interconnect. + */ + com.google.protobuf.ByteString getInterconnectBytes(); + + /** + * + * + *
+   * Optional. The canonical Network name in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Optional. The canonical Network name in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Required. VLAN id provided by user. Must be site-wise unique.
+   * 
+ * + * int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vlanId. + */ + int getVlanId(); + + /** + * + * + *
+   * IP (L3) MTU value of the virtual edge cloud.
+   * Valid values are: 1500 and 9000.
+   * Default to 1500 if not set.
+   * 
+ * + * int32 mtu = 9; + * + * @return The mtu. + */ + int getMtu(); + + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.edgenetwork.v1.ResourceState getState(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnostics.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnostics.java new file mode 100644 index 000000000000..753031809547 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnostics.java @@ -0,0 +1,8087 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Diagnostics information about interconnect, contains detailed and current
+ * technical information about Google's side of the connection.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics} + */ +public final class InterconnectDiagnostics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics) + InterconnectDiagnosticsOrBuilder { + private static final long serialVersionUID = 0L; + // Use InterconnectDiagnostics.newBuilder() to construct. + private InterconnectDiagnostics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InterconnectDiagnostics() { + macAddress_ = ""; + linkLayerAddresses_ = java.util.Collections.emptyList(); + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InterconnectDiagnostics(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder.class); + } + + public interface LinkStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The unique ID for this link assigned during turn up by Google.
+     * 
+ * + * string circuit_id = 1; + * + * @return The circuitId. + */ + java.lang.String getCircuitId(); + /** + * + * + *
+     * The unique ID for this link assigned during turn up by Google.
+     * 
+ * + * string circuit_id = 1; + * + * @return The bytes for circuitId. + */ + com.google.protobuf.ByteString getCircuitIdBytes(); + + /** + * + * + *
+     * Describing the state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + * + * @return Whether the lacpStatus field is set. + */ + boolean hasLacpStatus(); + /** + * + * + *
+     * Describing the state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + * + * @return The lacpStatus. + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus getLacpStatus(); + /** + * + * + *
+     * Describing the state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder + getLacpStatusOrBuilder(); + + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + java.util.List + getLldpStatusesList(); + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus getLldpStatuses( + int index); + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + int getLldpStatusesCount(); + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder> + getLldpStatusesOrBuilderList(); + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder + getLldpStatusesOrBuilder(int index); + + /** + * + * + *
+     * Packet counts specific statistics for this link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + * + * @return Whether the packetCounts field is set. + */ + boolean hasPacketCounts(); + /** + * + * + *
+     * Packet counts specific statistics for this link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + * + * @return The packetCounts. + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts getPacketCounts(); + /** + * + * + *
+     * Packet counts specific statistics for this link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder + getPacketCountsOrBuilder(); + } + /** + * + * + *
+   * Describing the status for each link on the Interconnect.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus} + */ + public static final class LinkStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) + LinkStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use LinkStatus.newBuilder() to construct. + private LinkStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkStatus() { + circuitId_ = ""; + lldpStatuses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LinkStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder.class); + } + + public static final int CIRCUIT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object circuitId_ = ""; + /** + * + * + *
+     * The unique ID for this link assigned during turn up by Google.
+     * 
+ * + * string circuit_id = 1; + * + * @return The circuitId. + */ + @java.lang.Override + public java.lang.String getCircuitId() { + java.lang.Object ref = circuitId_; + 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(); + circuitId_ = s; + return s; + } + } + /** + * + * + *
+     * The unique ID for this link assigned during turn up by Google.
+     * 
+ * + * string circuit_id = 1; + * + * @return The bytes for circuitId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCircuitIdBytes() { + java.lang.Object ref = circuitId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + circuitId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LACP_STATUS_FIELD_NUMBER = 2; + private com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacpStatus_; + /** + * + * + *
+     * Describing the state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + * + * @return Whether the lacpStatus field is set. + */ + @java.lang.Override + public boolean hasLacpStatus() { + return lacpStatus_ != null; + } + /** + * + * + *
+     * Describing the state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + * + * @return The lacpStatus. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus getLacpStatus() { + return lacpStatus_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance() + : lacpStatus_; + } + /** + * + * + *
+     * Describing the state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder + getLacpStatusOrBuilder() { + return lacpStatus_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance() + : lacpStatus_; + } + + public static final int LLDP_STATUSES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + lldpStatuses_; + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + @java.lang.Override + public java.util.List + getLldpStatusesList() { + return lldpStatuses_; + } + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder> + getLldpStatusesOrBuilderList() { + return lldpStatuses_; + } + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + @java.lang.Override + public int getLldpStatusesCount() { + return lldpStatuses_.size(); + } + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus getLldpStatuses( + int index) { + return lldpStatuses_.get(index); + } + /** + * + * + *
+     * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+     * peer for each link on the Interconnect.
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder + getLldpStatusesOrBuilder(int index) { + return lldpStatuses_.get(index); + } + + public static final int PACKET_COUNTS_FIELD_NUMBER = 4; + private com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packetCounts_; + /** + * + * + *
+     * Packet counts specific statistics for this link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + * + * @return Whether the packetCounts field is set. + */ + @java.lang.Override + public boolean hasPacketCounts() { + return packetCounts_ != null; + } + /** + * + * + *
+     * Packet counts specific statistics for this link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + * + * @return The packetCounts. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts getPacketCounts() { + return packetCounts_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance() + : packetCounts_; + } + /** + * + * + *
+     * Packet counts specific statistics for this link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder + getPacketCountsOrBuilder() { + return packetCounts_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance() + : packetCounts_; + } + + 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(circuitId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, circuitId_); + } + if (lacpStatus_ != null) { + output.writeMessage(2, getLacpStatus()); + } + for (int i = 0; i < lldpStatuses_.size(); i++) { + output.writeMessage(3, lldpStatuses_.get(i)); + } + if (packetCounts_ != null) { + output.writeMessage(4, getPacketCounts()); + } + 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(circuitId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, circuitId_); + } + if (lacpStatus_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLacpStatus()); + } + for (int i = 0; i < lldpStatuses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, lldpStatuses_.get(i)); + } + if (packetCounts_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPacketCounts()); + } + 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus other = + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) obj; + + if (!getCircuitId().equals(other.getCircuitId())) return false; + if (hasLacpStatus() != other.hasLacpStatus()) return false; + if (hasLacpStatus()) { + if (!getLacpStatus().equals(other.getLacpStatus())) return false; + } + if (!getLldpStatusesList().equals(other.getLldpStatusesList())) return false; + if (hasPacketCounts() != other.hasPacketCounts()) return false; + if (hasPacketCounts()) { + if (!getPacketCounts().equals(other.getPacketCounts())) 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) + CIRCUIT_ID_FIELD_NUMBER; + hash = (53 * hash) + getCircuitId().hashCode(); + if (hasLacpStatus()) { + hash = (37 * hash) + LACP_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getLacpStatus().hashCode(); + } + if (getLldpStatusesCount() > 0) { + hash = (37 * hash) + LLDP_STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getLldpStatusesList().hashCode(); + } + if (hasPacketCounts()) { + hash = (37 * hash) + PACKET_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getPacketCounts().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus 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; + } + /** + * + * + *
+     * Describing the status for each link on the Interconnect.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder.class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + circuitId_ = ""; + lacpStatus_ = null; + if (lacpStatusBuilder_ != null) { + lacpStatusBuilder_.dispose(); + lacpStatusBuilder_ = null; + } + if (lldpStatusesBuilder_ == null) { + lldpStatuses_ = java.util.Collections.emptyList(); + } else { + lldpStatuses_ = null; + lldpStatusesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + packetCounts_ = null; + if (packetCountsBuilder_ != null) { + packetCountsBuilder_.dispose(); + packetCountsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus build() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus buildPartial() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus result = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus result) { + if (lldpStatusesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + lldpStatuses_ = java.util.Collections.unmodifiableList(lldpStatuses_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.lldpStatuses_ = lldpStatuses_; + } else { + result.lldpStatuses_ = lldpStatusesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.circuitId_ = circuitId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lacpStatus_ = + lacpStatusBuilder_ == null ? lacpStatus_ : lacpStatusBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.packetCounts_ = + packetCountsBuilder_ == null ? packetCounts_ : packetCountsBuilder_.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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus other) { + if (other + == com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + .getDefaultInstance()) return this; + if (!other.getCircuitId().isEmpty()) { + circuitId_ = other.circuitId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLacpStatus()) { + mergeLacpStatus(other.getLacpStatus()); + } + if (lldpStatusesBuilder_ == null) { + if (!other.lldpStatuses_.isEmpty()) { + if (lldpStatuses_.isEmpty()) { + lldpStatuses_ = other.lldpStatuses_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLldpStatusesIsMutable(); + lldpStatuses_.addAll(other.lldpStatuses_); + } + onChanged(); + } + } else { + if (!other.lldpStatuses_.isEmpty()) { + if (lldpStatusesBuilder_.isEmpty()) { + lldpStatusesBuilder_.dispose(); + lldpStatusesBuilder_ = null; + lldpStatuses_ = other.lldpStatuses_; + bitField0_ = (bitField0_ & ~0x00000004); + lldpStatusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLldpStatusesFieldBuilder() + : null; + } else { + lldpStatusesBuilder_.addAllMessages(other.lldpStatuses_); + } + } + } + if (other.hasPacketCounts()) { + mergePacketCounts(other.getPacketCounts()); + } + 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: + { + circuitId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getLacpStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus m = + input.readMessage( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + .parser(), + extensionRegistry); + if (lldpStatusesBuilder_ == null) { + ensureLldpStatusesIsMutable(); + lldpStatuses_.add(m); + } else { + lldpStatusesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage(getPacketCountsFieldBuilder().getBuilder(), extensionRegistry); + 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 circuitId_ = ""; + /** + * + * + *
+       * The unique ID for this link assigned during turn up by Google.
+       * 
+ * + * string circuit_id = 1; + * + * @return The circuitId. + */ + public java.lang.String getCircuitId() { + java.lang.Object ref = circuitId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + circuitId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The unique ID for this link assigned during turn up by Google.
+       * 
+ * + * string circuit_id = 1; + * + * @return The bytes for circuitId. + */ + public com.google.protobuf.ByteString getCircuitIdBytes() { + java.lang.Object ref = circuitId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + circuitId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The unique ID for this link assigned during turn up by Google.
+       * 
+ * + * string circuit_id = 1; + * + * @param value The circuitId to set. + * @return This builder for chaining. + */ + public Builder setCircuitId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + circuitId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique ID for this link assigned during turn up by Google.
+       * 
+ * + * string circuit_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearCircuitId() { + circuitId_ = getDefaultInstance().getCircuitId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The unique ID for this link assigned during turn up by Google.
+       * 
+ * + * string circuit_id = 1; + * + * @param value The bytes for circuitId to set. + * @return This builder for chaining. + */ + public Builder setCircuitIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + circuitId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacpStatus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder> + lacpStatusBuilder_; + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + * + * @return Whether the lacpStatus field is set. + */ + public boolean hasLacpStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + * + * @return The lacpStatus. + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + getLacpStatus() { + if (lacpStatusBuilder_ == null) { + return lacpStatus_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance() + : lacpStatus_; + } else { + return lacpStatusBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + public Builder setLacpStatus( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus value) { + if (lacpStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lacpStatus_ = value; + } else { + lacpStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + public Builder setLacpStatus( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder + builderForValue) { + if (lacpStatusBuilder_ == null) { + lacpStatus_ = builderForValue.build(); + } else { + lacpStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + public Builder mergeLacpStatus( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus value) { + if (lacpStatusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && lacpStatus_ != null + && lacpStatus_ + != com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance()) { + getLacpStatusBuilder().mergeFrom(value); + } else { + lacpStatus_ = value; + } + } else { + lacpStatusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + public Builder clearLacpStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + lacpStatus_ = null; + if (lacpStatusBuilder_ != null) { + lacpStatusBuilder_.dispose(); + lacpStatusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder + getLacpStatusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLacpStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder + getLacpStatusOrBuilder() { + if (lacpStatusBuilder_ != null) { + return lacpStatusBuilder_.getMessageOrBuilder(); + } else { + return lacpStatus_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance() + : lacpStatus_; + } + } + /** + * + * + *
+       * Describing the state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus lacp_status = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder> + getLacpStatusFieldBuilder() { + if (lacpStatusBuilder_ == null) { + lacpStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder>( + getLacpStatus(), getParentForChildren(), isClean()); + lacpStatus_ = null; + } + return lacpStatusBuilder_; + } + + private java.util.List + lldpStatuses_ = java.util.Collections.emptyList(); + + private void ensureLldpStatusesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + lldpStatuses_ = + new java.util.ArrayList< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus>( + lldpStatuses_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder> + lldpStatusesBuilder_; + + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public java.util.List + getLldpStatusesList() { + if (lldpStatusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(lldpStatuses_); + } else { + return lldpStatusesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public int getLldpStatusesCount() { + if (lldpStatusesBuilder_ == null) { + return lldpStatuses_.size(); + } else { + return lldpStatusesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus getLldpStatuses( + int index) { + if (lldpStatusesBuilder_ == null) { + return lldpStatuses_.get(index); + } else { + return lldpStatusesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder setLldpStatuses( + int index, com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus value) { + if (lldpStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLldpStatusesIsMutable(); + lldpStatuses_.set(index, value); + onChanged(); + } else { + lldpStatusesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder setLldpStatuses( + int index, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + builderForValue) { + if (lldpStatusesBuilder_ == null) { + ensureLldpStatusesIsMutable(); + lldpStatuses_.set(index, builderForValue.build()); + onChanged(); + } else { + lldpStatusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder addLldpStatuses( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus value) { + if (lldpStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLldpStatusesIsMutable(); + lldpStatuses_.add(value); + onChanged(); + } else { + lldpStatusesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder addLldpStatuses( + int index, com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus value) { + if (lldpStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLldpStatusesIsMutable(); + lldpStatuses_.add(index, value); + onChanged(); + } else { + lldpStatusesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder addLldpStatuses( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + builderForValue) { + if (lldpStatusesBuilder_ == null) { + ensureLldpStatusesIsMutable(); + lldpStatuses_.add(builderForValue.build()); + onChanged(); + } else { + lldpStatusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder addLldpStatuses( + int index, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + builderForValue) { + if (lldpStatusesBuilder_ == null) { + ensureLldpStatusesIsMutable(); + lldpStatuses_.add(index, builderForValue.build()); + onChanged(); + } else { + lldpStatusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder addAllLldpStatuses( + java.lang.Iterable< + ? extends com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus> + values) { + if (lldpStatusesBuilder_ == null) { + ensureLldpStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lldpStatuses_); + onChanged(); + } else { + lldpStatusesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder clearLldpStatuses() { + if (lldpStatusesBuilder_ == null) { + lldpStatuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + lldpStatusesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public Builder removeLldpStatuses(int index) { + if (lldpStatusesBuilder_ == null) { + ensureLldpStatusesIsMutable(); + lldpStatuses_.remove(index); + onChanged(); + } else { + lldpStatusesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + getLldpStatusesBuilder(int index) { + return getLldpStatusesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder + getLldpStatusesOrBuilder(int index) { + if (lldpStatusesBuilder_ == null) { + return lldpStatuses_.get(index); + } else { + return lldpStatusesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder> + getLldpStatusesOrBuilderList() { + if (lldpStatusesBuilder_ != null) { + return lldpStatusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(lldpStatuses_); + } + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + addLldpStatusesBuilder() { + return getLldpStatusesFieldBuilder() + .addBuilder( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + addLldpStatusesBuilder(int index) { + return getLldpStatusesFieldBuilder() + .addBuilder( + index, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of LinkLLDPStatus objects, used to describe LLDP status of each
+       * peer for each link on the Interconnect.
+       * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus lldp_statuses = 3; + * + */ + public java.util.List< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder> + getLldpStatusesBuilderList() { + return getLldpStatusesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder> + getLldpStatusesFieldBuilder() { + if (lldpStatusesBuilder_ == null) { + lldpStatusesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder>( + lldpStatuses_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + lldpStatuses_ = null; + } + return lldpStatusesBuilder_; + } + + private com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packetCounts_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder> + packetCountsBuilder_; + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + * + * @return Whether the packetCounts field is set. + */ + public boolean hasPacketCounts() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + * + * @return The packetCounts. + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + getPacketCounts() { + if (packetCountsBuilder_ == null) { + return packetCounts_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance() + : packetCounts_; + } else { + return packetCountsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + public Builder setPacketCounts( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts value) { + if (packetCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + packetCounts_ = value; + } else { + packetCountsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + public Builder setPacketCounts( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder + builderForValue) { + if (packetCountsBuilder_ == null) { + packetCounts_ = builderForValue.build(); + } else { + packetCountsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + public Builder mergePacketCounts( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts value) { + if (packetCountsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && packetCounts_ != null + && packetCounts_ + != com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance()) { + getPacketCountsBuilder().mergeFrom(value); + } else { + packetCounts_ = value; + } + } else { + packetCountsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + public Builder clearPacketCounts() { + bitField0_ = (bitField0_ & ~0x00000008); + packetCounts_ = null; + if (packetCountsBuilder_ != null) { + packetCountsBuilder_.dispose(); + packetCountsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder + getPacketCountsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPacketCountsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder + getPacketCountsOrBuilder() { + if (packetCountsBuilder_ != null) { + return packetCountsBuilder_.getMessageOrBuilder(); + } else { + return packetCounts_ == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance() + : packetCounts_; + } + } + /** + * + * + *
+       * Packet counts specific statistics for this link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts packet_counts = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder> + getPacketCountsFieldBuilder() { + if (packetCountsBuilder_ == null) { + packetCountsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder>( + getPacketCounts(), getParentForChildren(), isClean()); + packetCounts_ = null; + } + return packetCountsBuilder_; + } + + @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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus) + private static final com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus(); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PacketCountsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The number of packets that are delivered.
+     * 
+ * + * int64 inbound_unicast = 1; + * + * @return The inboundUnicast. + */ + long getInboundUnicast(); + + /** + * + * + *
+     * The number of inbound packets that contained errors.
+     * 
+ * + * int64 inbound_errors = 2; + * + * @return The inboundErrors. + */ + long getInboundErrors(); + + /** + * + * + *
+     * The number of inbound packets that were chosen to be discarded even
+     * though no errors had been detected to prevent their being deliverable.
+     * 
+ * + * int64 inbound_discards = 3; + * + * @return The inboundDiscards. + */ + long getInboundDiscards(); + + /** + * + * + *
+     * The total number of packets that are requested be transmitted.
+     * 
+ * + * int64 outbound_unicast = 4; + * + * @return The outboundUnicast. + */ + long getOutboundUnicast(); + + /** + * + * + *
+     * The number of outbound packets that could not be transmitted because of
+     * errors.
+     * 
+ * + * int64 outbound_errors = 5; + * + * @return The outboundErrors. + */ + long getOutboundErrors(); + + /** + * + * + *
+     * The number of outbound packets that were chosen to be discarded even
+     * though no errors had been detected to prevent their being transmitted.
+     * 
+ * + * int64 outbound_discards = 6; + * + * @return The outboundDiscards. + */ + long getOutboundDiscards(); + } + /** + * + * + *
+   * Containing a collection of interface-related statistics objects.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts} + */ + public static final class PacketCounts extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) + PacketCountsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PacketCounts.newBuilder() to construct. + private PacketCounts(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PacketCounts() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PacketCounts(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder.class); + } + + public static final int INBOUND_UNICAST_FIELD_NUMBER = 1; + private long inboundUnicast_ = 0L; + /** + * + * + *
+     * The number of packets that are delivered.
+     * 
+ * + * int64 inbound_unicast = 1; + * + * @return The inboundUnicast. + */ + @java.lang.Override + public long getInboundUnicast() { + return inboundUnicast_; + } + + public static final int INBOUND_ERRORS_FIELD_NUMBER = 2; + private long inboundErrors_ = 0L; + /** + * + * + *
+     * The number of inbound packets that contained errors.
+     * 
+ * + * int64 inbound_errors = 2; + * + * @return The inboundErrors. + */ + @java.lang.Override + public long getInboundErrors() { + return inboundErrors_; + } + + public static final int INBOUND_DISCARDS_FIELD_NUMBER = 3; + private long inboundDiscards_ = 0L; + /** + * + * + *
+     * The number of inbound packets that were chosen to be discarded even
+     * though no errors had been detected to prevent their being deliverable.
+     * 
+ * + * int64 inbound_discards = 3; + * + * @return The inboundDiscards. + */ + @java.lang.Override + public long getInboundDiscards() { + return inboundDiscards_; + } + + public static final int OUTBOUND_UNICAST_FIELD_NUMBER = 4; + private long outboundUnicast_ = 0L; + /** + * + * + *
+     * The total number of packets that are requested be transmitted.
+     * 
+ * + * int64 outbound_unicast = 4; + * + * @return The outboundUnicast. + */ + @java.lang.Override + public long getOutboundUnicast() { + return outboundUnicast_; + } + + public static final int OUTBOUND_ERRORS_FIELD_NUMBER = 5; + private long outboundErrors_ = 0L; + /** + * + * + *
+     * The number of outbound packets that could not be transmitted because of
+     * errors.
+     * 
+ * + * int64 outbound_errors = 5; + * + * @return The outboundErrors. + */ + @java.lang.Override + public long getOutboundErrors() { + return outboundErrors_; + } + + public static final int OUTBOUND_DISCARDS_FIELD_NUMBER = 6; + private long outboundDiscards_ = 0L; + /** + * + * + *
+     * The number of outbound packets that were chosen to be discarded even
+     * though no errors had been detected to prevent their being transmitted.
+     * 
+ * + * int64 outbound_discards = 6; + * + * @return The outboundDiscards. + */ + @java.lang.Override + public long getOutboundDiscards() { + return outboundDiscards_; + } + + 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 (inboundUnicast_ != 0L) { + output.writeInt64(1, inboundUnicast_); + } + if (inboundErrors_ != 0L) { + output.writeInt64(2, inboundErrors_); + } + if (inboundDiscards_ != 0L) { + output.writeInt64(3, inboundDiscards_); + } + if (outboundUnicast_ != 0L) { + output.writeInt64(4, outboundUnicast_); + } + if (outboundErrors_ != 0L) { + output.writeInt64(5, outboundErrors_); + } + if (outboundDiscards_ != 0L) { + output.writeInt64(6, outboundDiscards_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inboundUnicast_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, inboundUnicast_); + } + if (inboundErrors_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, inboundErrors_); + } + if (inboundDiscards_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, inboundDiscards_); + } + if (outboundUnicast_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, outboundUnicast_); + } + if (outboundErrors_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, outboundErrors_); + } + if (outboundDiscards_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, outboundDiscards_); + } + 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts other = + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) obj; + + if (getInboundUnicast() != other.getInboundUnicast()) return false; + if (getInboundErrors() != other.getInboundErrors()) return false; + if (getInboundDiscards() != other.getInboundDiscards()) return false; + if (getOutboundUnicast() != other.getOutboundUnicast()) return false; + if (getOutboundErrors() != other.getOutboundErrors()) return false; + if (getOutboundDiscards() != other.getOutboundDiscards()) 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) + INBOUND_UNICAST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInboundUnicast()); + hash = (37 * hash) + INBOUND_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInboundErrors()); + hash = (37 * hash) + INBOUND_DISCARDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInboundDiscards()); + hash = (37 * hash) + OUTBOUND_UNICAST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOutboundUnicast()); + hash = (37 * hash) + OUTBOUND_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOutboundErrors()); + hash = (37 * hash) + OUTBOUND_DISCARDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOutboundDiscards()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts 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; + } + /** + * + * + *
+     * Containing a collection of interface-related statistics objects.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCountsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.Builder.class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inboundUnicast_ = 0L; + inboundErrors_ = 0L; + inboundDiscards_ = 0L; + outboundUnicast_ = 0L; + outboundErrors_ = 0L; + outboundDiscards_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts build() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts buildPartial() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts result = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inboundUnicast_ = inboundUnicast_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.inboundErrors_ = inboundErrors_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.inboundDiscards_ = inboundDiscards_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.outboundUnicast_ = outboundUnicast_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.outboundErrors_ = outboundErrors_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.outboundDiscards_ = outboundDiscards_; + } + } + + @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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts other) { + if (other + == com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + .getDefaultInstance()) return this; + if (other.getInboundUnicast() != 0L) { + setInboundUnicast(other.getInboundUnicast()); + } + if (other.getInboundErrors() != 0L) { + setInboundErrors(other.getInboundErrors()); + } + if (other.getInboundDiscards() != 0L) { + setInboundDiscards(other.getInboundDiscards()); + } + if (other.getOutboundUnicast() != 0L) { + setOutboundUnicast(other.getOutboundUnicast()); + } + if (other.getOutboundErrors() != 0L) { + setOutboundErrors(other.getOutboundErrors()); + } + if (other.getOutboundDiscards() != 0L) { + setOutboundDiscards(other.getOutboundDiscards()); + } + 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: + { + inboundUnicast_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + inboundErrors_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + inboundDiscards_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + outboundUnicast_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + outboundErrors_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + outboundDiscards_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 long inboundUnicast_; + /** + * + * + *
+       * The number of packets that are delivered.
+       * 
+ * + * int64 inbound_unicast = 1; + * + * @return The inboundUnicast. + */ + @java.lang.Override + public long getInboundUnicast() { + return inboundUnicast_; + } + /** + * + * + *
+       * The number of packets that are delivered.
+       * 
+ * + * int64 inbound_unicast = 1; + * + * @param value The inboundUnicast to set. + * @return This builder for chaining. + */ + public Builder setInboundUnicast(long value) { + + inboundUnicast_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of packets that are delivered.
+       * 
+ * + * int64 inbound_unicast = 1; + * + * @return This builder for chaining. + */ + public Builder clearInboundUnicast() { + bitField0_ = (bitField0_ & ~0x00000001); + inboundUnicast_ = 0L; + onChanged(); + return this; + } + + private long inboundErrors_; + /** + * + * + *
+       * The number of inbound packets that contained errors.
+       * 
+ * + * int64 inbound_errors = 2; + * + * @return The inboundErrors. + */ + @java.lang.Override + public long getInboundErrors() { + return inboundErrors_; + } + /** + * + * + *
+       * The number of inbound packets that contained errors.
+       * 
+ * + * int64 inbound_errors = 2; + * + * @param value The inboundErrors to set. + * @return This builder for chaining. + */ + public Builder setInboundErrors(long value) { + + inboundErrors_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of inbound packets that contained errors.
+       * 
+ * + * int64 inbound_errors = 2; + * + * @return This builder for chaining. + */ + public Builder clearInboundErrors() { + bitField0_ = (bitField0_ & ~0x00000002); + inboundErrors_ = 0L; + onChanged(); + return this; + } + + private long inboundDiscards_; + /** + * + * + *
+       * The number of inbound packets that were chosen to be discarded even
+       * though no errors had been detected to prevent their being deliverable.
+       * 
+ * + * int64 inbound_discards = 3; + * + * @return The inboundDiscards. + */ + @java.lang.Override + public long getInboundDiscards() { + return inboundDiscards_; + } + /** + * + * + *
+       * The number of inbound packets that were chosen to be discarded even
+       * though no errors had been detected to prevent their being deliverable.
+       * 
+ * + * int64 inbound_discards = 3; + * + * @param value The inboundDiscards to set. + * @return This builder for chaining. + */ + public Builder setInboundDiscards(long value) { + + inboundDiscards_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of inbound packets that were chosen to be discarded even
+       * though no errors had been detected to prevent their being deliverable.
+       * 
+ * + * int64 inbound_discards = 3; + * + * @return This builder for chaining. + */ + public Builder clearInboundDiscards() { + bitField0_ = (bitField0_ & ~0x00000004); + inboundDiscards_ = 0L; + onChanged(); + return this; + } + + private long outboundUnicast_; + /** + * + * + *
+       * The total number of packets that are requested be transmitted.
+       * 
+ * + * int64 outbound_unicast = 4; + * + * @return The outboundUnicast. + */ + @java.lang.Override + public long getOutboundUnicast() { + return outboundUnicast_; + } + /** + * + * + *
+       * The total number of packets that are requested be transmitted.
+       * 
+ * + * int64 outbound_unicast = 4; + * + * @param value The outboundUnicast to set. + * @return This builder for chaining. + */ + public Builder setOutboundUnicast(long value) { + + outboundUnicast_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The total number of packets that are requested be transmitted.
+       * 
+ * + * int64 outbound_unicast = 4; + * + * @return This builder for chaining. + */ + public Builder clearOutboundUnicast() { + bitField0_ = (bitField0_ & ~0x00000008); + outboundUnicast_ = 0L; + onChanged(); + return this; + } + + private long outboundErrors_; + /** + * + * + *
+       * The number of outbound packets that could not be transmitted because of
+       * errors.
+       * 
+ * + * int64 outbound_errors = 5; + * + * @return The outboundErrors. + */ + @java.lang.Override + public long getOutboundErrors() { + return outboundErrors_; + } + /** + * + * + *
+       * The number of outbound packets that could not be transmitted because of
+       * errors.
+       * 
+ * + * int64 outbound_errors = 5; + * + * @param value The outboundErrors to set. + * @return This builder for chaining. + */ + public Builder setOutboundErrors(long value) { + + outboundErrors_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of outbound packets that could not be transmitted because of
+       * errors.
+       * 
+ * + * int64 outbound_errors = 5; + * + * @return This builder for chaining. + */ + public Builder clearOutboundErrors() { + bitField0_ = (bitField0_ & ~0x00000010); + outboundErrors_ = 0L; + onChanged(); + return this; + } + + private long outboundDiscards_; + /** + * + * + *
+       * The number of outbound packets that were chosen to be discarded even
+       * though no errors had been detected to prevent their being transmitted.
+       * 
+ * + * int64 outbound_discards = 6; + * + * @return The outboundDiscards. + */ + @java.lang.Override + public long getOutboundDiscards() { + return outboundDiscards_; + } + /** + * + * + *
+       * The number of outbound packets that were chosen to be discarded even
+       * though no errors had been detected to prevent their being transmitted.
+       * 
+ * + * int64 outbound_discards = 6; + * + * @param value The outboundDiscards to set. + * @return This builder for chaining. + */ + public Builder setOutboundDiscards(long value) { + + outboundDiscards_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The number of outbound packets that were chosen to be discarded even
+       * though no errors had been detected to prevent their being transmitted.
+       * 
+ * + * int64 outbound_discards = 6; + * + * @return This builder for chaining. + */ + public Builder clearOutboundDiscards() { + bitField0_ = (bitField0_ & ~0x00000020); + outboundDiscards_ = 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts) + private static final com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts(); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PacketCounts 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.edgenetwork.v1.InterconnectDiagnostics.PacketCounts + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkLACPStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * The state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return The state. + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State getState(); + + /** + * + * + *
+     * System ID of the port on Google's side of the LACP exchange.
+     * 
+ * + * string google_system_id = 2; + * + * @return The googleSystemId. + */ + java.lang.String getGoogleSystemId(); + /** + * + * + *
+     * System ID of the port on Google's side of the LACP exchange.
+     * 
+ * + * string google_system_id = 2; + * + * @return The bytes for googleSystemId. + */ + com.google.protobuf.ByteString getGoogleSystemIdBytes(); + + /** + * + * + *
+     * System ID of the port on the neighbor's side of the LACP exchange.
+     * 
+ * + * string neighbor_system_id = 3; + * + * @return The neighborSystemId. + */ + java.lang.String getNeighborSystemId(); + /** + * + * + *
+     * System ID of the port on the neighbor's side of the LACP exchange.
+     * 
+ * + * string neighbor_system_id = 3; + * + * @return The bytes for neighborSystemId. + */ + com.google.protobuf.ByteString getNeighborSystemIdBytes(); + + /** + * + * + *
+     * A true value indicates that the participant will allow the link to be
+     * used as part of the aggregate.
+     * A false value indicates the link should be used as an individual link.
+     * 
+ * + * bool aggregatable = 4; + * + * @return The aggregatable. + */ + boolean getAggregatable(); + + /** + * + * + *
+     * If true, the participant is collecting incoming frames on the link,
+     * otherwise false
+     * 
+ * + * bool collecting = 5; + * + * @return The collecting. + */ + boolean getCollecting(); + + /** + * + * + *
+     * When true, the participant is distributing outgoing frames; when false,
+     * distribution is disabled
+     * 
+ * + * bool distributing = 6; + * + * @return The distributing. + */ + boolean getDistributing(); + } + /** + * + * + *
+   * Describing the status of a LACP link.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus} + */ + public static final class LinkLACPStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) + LinkLACPStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use LinkLACPStatus.newBuilder() to construct. + private LinkLACPStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkLACPStatus() { + state_ = 0; + googleSystemId_ = ""; + neighborSystemId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LinkLACPStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder.class); + } + + /** + * + * + *
+     * State enum for LACP link.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default state indicating state is in unknown state.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+       * The link is configured and active within the bundle.
+       * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+       * The link is not configured within the bundle, this means the rest of
+       * the object should be empty.
+       * 
+ * + * DETACHED = 2; + */ + DETACHED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default state indicating state is in unknown state.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+       * The link is configured and active within the bundle.
+       * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+       * The link is not configured within the bundle, this means the rest of
+       * the object should be empty.
+       * 
+ * + * DETACHED = 2; + */ + public static final int DETACHED_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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return ACTIVE; + case 2: + return DETACHED; + 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 State findValueByNumber(int number) { + return State.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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * + * + *
+     * The state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of a LACP link.
+     * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State getState() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State result = + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State.forNumber( + state_); + return result == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State + .UNRECOGNIZED + : result; + } + + public static final int GOOGLE_SYSTEM_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object googleSystemId_ = ""; + /** + * + * + *
+     * System ID of the port on Google's side of the LACP exchange.
+     * 
+ * + * string google_system_id = 2; + * + * @return The googleSystemId. + */ + @java.lang.Override + public java.lang.String getGoogleSystemId() { + java.lang.Object ref = googleSystemId_; + 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(); + googleSystemId_ = s; + return s; + } + } + /** + * + * + *
+     * System ID of the port on Google's side of the LACP exchange.
+     * 
+ * + * string google_system_id = 2; + * + * @return The bytes for googleSystemId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGoogleSystemIdBytes() { + java.lang.Object ref = googleSystemId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleSystemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEIGHBOR_SYSTEM_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object neighborSystemId_ = ""; + /** + * + * + *
+     * System ID of the port on the neighbor's side of the LACP exchange.
+     * 
+ * + * string neighbor_system_id = 3; + * + * @return The neighborSystemId. + */ + @java.lang.Override + public java.lang.String getNeighborSystemId() { + java.lang.Object ref = neighborSystemId_; + 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(); + neighborSystemId_ = s; + return s; + } + } + /** + * + * + *
+     * System ID of the port on the neighbor's side of the LACP exchange.
+     * 
+ * + * string neighbor_system_id = 3; + * + * @return The bytes for neighborSystemId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNeighborSystemIdBytes() { + java.lang.Object ref = neighborSystemId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + neighborSystemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGGREGATABLE_FIELD_NUMBER = 4; + private boolean aggregatable_ = false; + /** + * + * + *
+     * A true value indicates that the participant will allow the link to be
+     * used as part of the aggregate.
+     * A false value indicates the link should be used as an individual link.
+     * 
+ * + * bool aggregatable = 4; + * + * @return The aggregatable. + */ + @java.lang.Override + public boolean getAggregatable() { + return aggregatable_; + } + + public static final int COLLECTING_FIELD_NUMBER = 5; + private boolean collecting_ = false; + /** + * + * + *
+     * If true, the participant is collecting incoming frames on the link,
+     * otherwise false
+     * 
+ * + * bool collecting = 5; + * + * @return The collecting. + */ + @java.lang.Override + public boolean getCollecting() { + return collecting_; + } + + public static final int DISTRIBUTING_FIELD_NUMBER = 6; + private boolean distributing_ = false; + /** + * + * + *
+     * When true, the participant is distributing outgoing frames; when false,
+     * distribution is disabled
+     * 
+ * + * bool distributing = 6; + * + * @return The distributing. + */ + @java.lang.Override + public boolean getDistributing() { + return distributing_; + } + + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State.UNKNOWN + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(googleSystemId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, googleSystemId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(neighborSystemId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, neighborSystemId_); + } + if (aggregatable_ != false) { + output.writeBool(4, aggregatable_); + } + if (collecting_ != false) { + output.writeBool(5, collecting_); + } + if (distributing_ != false) { + output.writeBool(6, distributing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State.UNKNOWN + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(googleSystemId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, googleSystemId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(neighborSystemId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, neighborSystemId_); + } + if (aggregatable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, aggregatable_); + } + if (collecting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, collecting_); + } + if (distributing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, distributing_); + } + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus other = + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) obj; + + if (state_ != other.state_) return false; + if (!getGoogleSystemId().equals(other.getGoogleSystemId())) return false; + if (!getNeighborSystemId().equals(other.getNeighborSystemId())) return false; + if (getAggregatable() != other.getAggregatable()) return false; + if (getCollecting() != other.getCollecting()) return false; + if (getDistributing() != other.getDistributing()) 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) + GOOGLE_SYSTEM_ID_FIELD_NUMBER; + hash = (53 * hash) + getGoogleSystemId().hashCode(); + hash = (37 * hash) + NEIGHBOR_SYSTEM_ID_FIELD_NUMBER; + hash = (53 * hash) + getNeighborSystemId().hashCode(); + hash = (37 * hash) + AGGREGATABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAggregatable()); + hash = (37 * hash) + COLLECTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCollecting()); + hash = (37 * hash) + DISTRIBUTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDistributing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus 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; + } + /** + * + * + *
+     * Describing the status of a LACP link.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.Builder + .class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.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; + googleSystemId_ = ""; + neighborSystemId_ = ""; + aggregatable_ = false; + collecting_ = false; + distributing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus build() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus buildPartial() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus result = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.googleSystemId_ = googleSystemId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.neighborSystemId_ = neighborSystemId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.aggregatable_ = aggregatable_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.collecting_ = collecting_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.distributing_ = distributing_; + } + } + + @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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus other) { + if (other + == com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getGoogleSystemId().isEmpty()) { + googleSystemId_ = other.googleSystemId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNeighborSystemId().isEmpty()) { + neighborSystemId_ = other.neighborSystemId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getAggregatable() != false) { + setAggregatable(other.getAggregatable()); + } + if (other.getCollecting() != false) { + setCollecting(other.getCollecting()); + } + if (other.getDistributing() != false) { + setDistributing(other.getDistributing()); + } + 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 18: + { + googleSystemId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + neighborSystemId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + aggregatable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + collecting_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + distributing_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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; + /** + * + * + *
+       * The state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * The state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @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; + } + /** + * + * + *
+       * The state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State + getState() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State result = + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State.forNumber( + state_); + return result == null + ? com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The state of a LACP link.
+       * 
+ * + * .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State state = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object googleSystemId_ = ""; + /** + * + * + *
+       * System ID of the port on Google's side of the LACP exchange.
+       * 
+ * + * string google_system_id = 2; + * + * @return The googleSystemId. + */ + public java.lang.String getGoogleSystemId() { + java.lang.Object ref = googleSystemId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleSystemId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * System ID of the port on Google's side of the LACP exchange.
+       * 
+ * + * string google_system_id = 2; + * + * @return The bytes for googleSystemId. + */ + public com.google.protobuf.ByteString getGoogleSystemIdBytes() { + java.lang.Object ref = googleSystemId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleSystemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * System ID of the port on Google's side of the LACP exchange.
+       * 
+ * + * string google_system_id = 2; + * + * @param value The googleSystemId to set. + * @return This builder for chaining. + */ + public Builder setGoogleSystemId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + googleSystemId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * System ID of the port on Google's side of the LACP exchange.
+       * 
+ * + * string google_system_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearGoogleSystemId() { + googleSystemId_ = getDefaultInstance().getGoogleSystemId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * System ID of the port on Google's side of the LACP exchange.
+       * 
+ * + * string google_system_id = 2; + * + * @param value The bytes for googleSystemId to set. + * @return This builder for chaining. + */ + public Builder setGoogleSystemIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + googleSystemId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object neighborSystemId_ = ""; + /** + * + * + *
+       * System ID of the port on the neighbor's side of the LACP exchange.
+       * 
+ * + * string neighbor_system_id = 3; + * + * @return The neighborSystemId. + */ + public java.lang.String getNeighborSystemId() { + java.lang.Object ref = neighborSystemId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + neighborSystemId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * System ID of the port on the neighbor's side of the LACP exchange.
+       * 
+ * + * string neighbor_system_id = 3; + * + * @return The bytes for neighborSystemId. + */ + public com.google.protobuf.ByteString getNeighborSystemIdBytes() { + java.lang.Object ref = neighborSystemId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + neighborSystemId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * System ID of the port on the neighbor's side of the LACP exchange.
+       * 
+ * + * string neighbor_system_id = 3; + * + * @param value The neighborSystemId to set. + * @return This builder for chaining. + */ + public Builder setNeighborSystemId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + neighborSystemId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * System ID of the port on the neighbor's side of the LACP exchange.
+       * 
+ * + * string neighbor_system_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearNeighborSystemId() { + neighborSystemId_ = getDefaultInstance().getNeighborSystemId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * System ID of the port on the neighbor's side of the LACP exchange.
+       * 
+ * + * string neighbor_system_id = 3; + * + * @param value The bytes for neighborSystemId to set. + * @return This builder for chaining. + */ + public Builder setNeighborSystemIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + neighborSystemId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean aggregatable_; + /** + * + * + *
+       * A true value indicates that the participant will allow the link to be
+       * used as part of the aggregate.
+       * A false value indicates the link should be used as an individual link.
+       * 
+ * + * bool aggregatable = 4; + * + * @return The aggregatable. + */ + @java.lang.Override + public boolean getAggregatable() { + return aggregatable_; + } + /** + * + * + *
+       * A true value indicates that the participant will allow the link to be
+       * used as part of the aggregate.
+       * A false value indicates the link should be used as an individual link.
+       * 
+ * + * bool aggregatable = 4; + * + * @param value The aggregatable to set. + * @return This builder for chaining. + */ + public Builder setAggregatable(boolean value) { + + aggregatable_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * A true value indicates that the participant will allow the link to be
+       * used as part of the aggregate.
+       * A false value indicates the link should be used as an individual link.
+       * 
+ * + * bool aggregatable = 4; + * + * @return This builder for chaining. + */ + public Builder clearAggregatable() { + bitField0_ = (bitField0_ & ~0x00000008); + aggregatable_ = false; + onChanged(); + return this; + } + + private boolean collecting_; + /** + * + * + *
+       * If true, the participant is collecting incoming frames on the link,
+       * otherwise false
+       * 
+ * + * bool collecting = 5; + * + * @return The collecting. + */ + @java.lang.Override + public boolean getCollecting() { + return collecting_; + } + /** + * + * + *
+       * If true, the participant is collecting incoming frames on the link,
+       * otherwise false
+       * 
+ * + * bool collecting = 5; + * + * @param value The collecting to set. + * @return This builder for chaining. + */ + public Builder setCollecting(boolean value) { + + collecting_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the participant is collecting incoming frames on the link,
+       * otherwise false
+       * 
+ * + * bool collecting = 5; + * + * @return This builder for chaining. + */ + public Builder clearCollecting() { + bitField0_ = (bitField0_ & ~0x00000010); + collecting_ = false; + onChanged(); + return this; + } + + private boolean distributing_; + /** + * + * + *
+       * When true, the participant is distributing outgoing frames; when false,
+       * distribution is disabled
+       * 
+ * + * bool distributing = 6; + * + * @return The distributing. + */ + @java.lang.Override + public boolean getDistributing() { + return distributing_; + } + /** + * + * + *
+       * When true, the participant is distributing outgoing frames; when false,
+       * distribution is disabled
+       * 
+ * + * bool distributing = 6; + * + * @param value The distributing to set. + * @return This builder for chaining. + */ + public Builder setDistributing(boolean value) { + + distributing_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * When true, the participant is distributing outgoing frames; when false,
+       * distribution is disabled
+       * 
+ * + * bool distributing = 6; + * + * @return This builder for chaining. + */ + public Builder clearDistributing() { + bitField0_ = (bitField0_ & ~0x00000020); + distributing_ = false; + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus) + private static final com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus(); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkLACPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkLLDPStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The peer system's administratively assigned name.
+     * 
+ * + * string peer_system_name = 1; + * + * @return The peerSystemName. + */ + java.lang.String getPeerSystemName(); + /** + * + * + *
+     * The peer system's administratively assigned name.
+     * 
+ * + * string peer_system_name = 1; + * + * @return The bytes for peerSystemName. + */ + com.google.protobuf.ByteString getPeerSystemNameBytes(); + + /** + * + * + *
+     * The textual description of the network entity of LLDP peer.
+     * 
+ * + * string peer_system_description = 2; + * + * @return The peerSystemDescription. + */ + java.lang.String getPeerSystemDescription(); + /** + * + * + *
+     * The textual description of the network entity of LLDP peer.
+     * 
+ * + * string peer_system_description = 2; + * + * @return The bytes for peerSystemDescription. + */ + com.google.protobuf.ByteString getPeerSystemDescriptionBytes(); + + /** + * + * + *
+     * The peer chassis component of the endpoint identifier associated with the
+     * transmitting LLDP agent.
+     * 
+ * + * string peer_chassis_id = 3; + * + * @return The peerChassisId. + */ + java.lang.String getPeerChassisId(); + /** + * + * + *
+     * The peer chassis component of the endpoint identifier associated with the
+     * transmitting LLDP agent.
+     * 
+ * + * string peer_chassis_id = 3; + * + * @return The bytes for peerChassisId. + */ + com.google.protobuf.ByteString getPeerChassisIdBytes(); + + /** + * + * + *
+     * The format and source of the peer chassis identifier string.
+     * 
+ * + * string peer_chassis_id_type = 4; + * + * @return The peerChassisIdType. + */ + java.lang.String getPeerChassisIdType(); + /** + * + * + *
+     * The format and source of the peer chassis identifier string.
+     * 
+ * + * string peer_chassis_id_type = 4; + * + * @return The bytes for peerChassisIdType. + */ + com.google.protobuf.ByteString getPeerChassisIdTypeBytes(); + + /** + * + * + *
+     * The port component of the endpoint identifier associated with the
+     * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+     * port, then this TLV is optional.
+     * 
+ * + * string peer_port_id = 5; + * + * @return The peerPortId. + */ + java.lang.String getPeerPortId(); + /** + * + * + *
+     * The port component of the endpoint identifier associated with the
+     * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+     * port, then this TLV is optional.
+     * 
+ * + * string peer_port_id = 5; + * + * @return The bytes for peerPortId. + */ + com.google.protobuf.ByteString getPeerPortIdBytes(); + + /** + * + * + *
+     * The format and source of the peer port identifier string.
+     * 
+ * + * string peer_port_id_type = 6; + * + * @return The peerPortIdType. + */ + java.lang.String getPeerPortIdType(); + /** + * + * + *
+     * The format and source of the peer port identifier string.
+     * 
+ * + * string peer_port_id_type = 6; + * + * @return The bytes for peerPortIdType. + */ + com.google.protobuf.ByteString getPeerPortIdTypeBytes(); + } + /** + * + * + *
+   * Describing a LLDP link.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus} + */ + public static final class LinkLLDPStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) + LinkLLDPStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use LinkLLDPStatus.newBuilder() to construct. + private LinkLLDPStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkLLDPStatus() { + peerSystemName_ = ""; + peerSystemDescription_ = ""; + peerChassisId_ = ""; + peerChassisIdType_ = ""; + peerPortId_ = ""; + peerPortIdType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LinkLLDPStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder.class); + } + + public static final int PEER_SYSTEM_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerSystemName_ = ""; + /** + * + * + *
+     * The peer system's administratively assigned name.
+     * 
+ * + * string peer_system_name = 1; + * + * @return The peerSystemName. + */ + @java.lang.Override + public java.lang.String getPeerSystemName() { + java.lang.Object ref = peerSystemName_; + 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(); + peerSystemName_ = s; + return s; + } + } + /** + * + * + *
+     * The peer system's administratively assigned name.
+     * 
+ * + * string peer_system_name = 1; + * + * @return The bytes for peerSystemName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerSystemNameBytes() { + java.lang.Object ref = peerSystemName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerSystemName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_SYSTEM_DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerSystemDescription_ = ""; + /** + * + * + *
+     * The textual description of the network entity of LLDP peer.
+     * 
+ * + * string peer_system_description = 2; + * + * @return The peerSystemDescription. + */ + @java.lang.Override + public java.lang.String getPeerSystemDescription() { + java.lang.Object ref = peerSystemDescription_; + 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(); + peerSystemDescription_ = s; + return s; + } + } + /** + * + * + *
+     * The textual description of the network entity of LLDP peer.
+     * 
+ * + * string peer_system_description = 2; + * + * @return The bytes for peerSystemDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerSystemDescriptionBytes() { + java.lang.Object ref = peerSystemDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerSystemDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_CHASSIS_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerChassisId_ = ""; + /** + * + * + *
+     * The peer chassis component of the endpoint identifier associated with the
+     * transmitting LLDP agent.
+     * 
+ * + * string peer_chassis_id = 3; + * + * @return The peerChassisId. + */ + @java.lang.Override + public java.lang.String getPeerChassisId() { + java.lang.Object ref = peerChassisId_; + 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(); + peerChassisId_ = s; + return s; + } + } + /** + * + * + *
+     * The peer chassis component of the endpoint identifier associated with the
+     * transmitting LLDP agent.
+     * 
+ * + * string peer_chassis_id = 3; + * + * @return The bytes for peerChassisId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerChassisIdBytes() { + java.lang.Object ref = peerChassisId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerChassisId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_CHASSIS_ID_TYPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerChassisIdType_ = ""; + /** + * + * + *
+     * The format and source of the peer chassis identifier string.
+     * 
+ * + * string peer_chassis_id_type = 4; + * + * @return The peerChassisIdType. + */ + @java.lang.Override + public java.lang.String getPeerChassisIdType() { + java.lang.Object ref = peerChassisIdType_; + 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(); + peerChassisIdType_ = s; + return s; + } + } + /** + * + * + *
+     * The format and source of the peer chassis identifier string.
+     * 
+ * + * string peer_chassis_id_type = 4; + * + * @return The bytes for peerChassisIdType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerChassisIdTypeBytes() { + java.lang.Object ref = peerChassisIdType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerChassisIdType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_PORT_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerPortId_ = ""; + /** + * + * + *
+     * The port component of the endpoint identifier associated with the
+     * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+     * port, then this TLV is optional.
+     * 
+ * + * string peer_port_id = 5; + * + * @return The peerPortId. + */ + @java.lang.Override + public java.lang.String getPeerPortId() { + java.lang.Object ref = peerPortId_; + 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(); + peerPortId_ = s; + return s; + } + } + /** + * + * + *
+     * The port component of the endpoint identifier associated with the
+     * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+     * port, then this TLV is optional.
+     * 
+ * + * string peer_port_id = 5; + * + * @return The bytes for peerPortId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerPortIdBytes() { + java.lang.Object ref = peerPortId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerPortId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_PORT_ID_TYPE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerPortIdType_ = ""; + /** + * + * + *
+     * The format and source of the peer port identifier string.
+     * 
+ * + * string peer_port_id_type = 6; + * + * @return The peerPortIdType. + */ + @java.lang.Override + public java.lang.String getPeerPortIdType() { + java.lang.Object ref = peerPortIdType_; + 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(); + peerPortIdType_ = s; + return s; + } + } + /** + * + * + *
+     * The format and source of the peer port identifier string.
+     * 
+ * + * string peer_port_id_type = 6; + * + * @return The bytes for peerPortIdType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerPortIdTypeBytes() { + java.lang.Object ref = peerPortIdType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerPortIdType_ = 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(peerSystemName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, peerSystemName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerSystemDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, peerSystemDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerChassisId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, peerChassisId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerChassisIdType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, peerChassisIdType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerPortId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, peerPortId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerPortIdType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, peerPortIdType_); + } + 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(peerSystemName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, peerSystemName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerSystemDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, peerSystemDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerChassisId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, peerChassisId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerChassisIdType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, peerChassisIdType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerPortId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, peerPortId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerPortIdType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, peerPortIdType_); + } + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus other = + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) obj; + + if (!getPeerSystemName().equals(other.getPeerSystemName())) return false; + if (!getPeerSystemDescription().equals(other.getPeerSystemDescription())) return false; + if (!getPeerChassisId().equals(other.getPeerChassisId())) return false; + if (!getPeerChassisIdType().equals(other.getPeerChassisIdType())) return false; + if (!getPeerPortId().equals(other.getPeerPortId())) return false; + if (!getPeerPortIdType().equals(other.getPeerPortIdType())) 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) + PEER_SYSTEM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPeerSystemName().hashCode(); + hash = (37 * hash) + PEER_SYSTEM_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getPeerSystemDescription().hashCode(); + hash = (37 * hash) + PEER_CHASSIS_ID_FIELD_NUMBER; + hash = (53 * hash) + getPeerChassisId().hashCode(); + hash = (37 * hash) + PEER_CHASSIS_ID_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPeerChassisIdType().hashCode(); + hash = (37 * hash) + PEER_PORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getPeerPortId().hashCode(); + hash = (37 * hash) + PEER_PORT_ID_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPeerPortIdType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus 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; + } + /** + * + * + *
+     * Describing a LLDP link.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.Builder + .class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + peerSystemName_ = ""; + peerSystemDescription_ = ""; + peerChassisId_ = ""; + peerChassisIdType_ = ""; + peerPortId_ = ""; + peerPortIdType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus build() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus buildPartial() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus result = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.peerSystemName_ = peerSystemName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.peerSystemDescription_ = peerSystemDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.peerChassisId_ = peerChassisId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.peerChassisIdType_ = peerChassisIdType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.peerPortId_ = peerPortId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.peerPortIdType_ = peerPortIdType_; + } + } + + @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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus other) { + if (other + == com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + .getDefaultInstance()) return this; + if (!other.getPeerSystemName().isEmpty()) { + peerSystemName_ = other.peerSystemName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPeerSystemDescription().isEmpty()) { + peerSystemDescription_ = other.peerSystemDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPeerChassisId().isEmpty()) { + peerChassisId_ = other.peerChassisId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPeerChassisIdType().isEmpty()) { + peerChassisIdType_ = other.peerChassisIdType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getPeerPortId().isEmpty()) { + peerPortId_ = other.peerPortId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getPeerPortIdType().isEmpty()) { + peerPortIdType_ = other.peerPortIdType_; + bitField0_ |= 0x00000020; + 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: + { + peerSystemName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + peerSystemDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + peerChassisId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + peerChassisIdType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + peerPortId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + peerPortIdType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + 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 peerSystemName_ = ""; + /** + * + * + *
+       * The peer system's administratively assigned name.
+       * 
+ * + * string peer_system_name = 1; + * + * @return The peerSystemName. + */ + public java.lang.String getPeerSystemName() { + java.lang.Object ref = peerSystemName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerSystemName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The peer system's administratively assigned name.
+       * 
+ * + * string peer_system_name = 1; + * + * @return The bytes for peerSystemName. + */ + public com.google.protobuf.ByteString getPeerSystemNameBytes() { + java.lang.Object ref = peerSystemName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerSystemName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The peer system's administratively assigned name.
+       * 
+ * + * string peer_system_name = 1; + * + * @param value The peerSystemName to set. + * @return This builder for chaining. + */ + public Builder setPeerSystemName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerSystemName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The peer system's administratively assigned name.
+       * 
+ * + * string peer_system_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearPeerSystemName() { + peerSystemName_ = getDefaultInstance().getPeerSystemName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The peer system's administratively assigned name.
+       * 
+ * + * string peer_system_name = 1; + * + * @param value The bytes for peerSystemName to set. + * @return This builder for chaining. + */ + public Builder setPeerSystemNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerSystemName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object peerSystemDescription_ = ""; + /** + * + * + *
+       * The textual description of the network entity of LLDP peer.
+       * 
+ * + * string peer_system_description = 2; + * + * @return The peerSystemDescription. + */ + public java.lang.String getPeerSystemDescription() { + java.lang.Object ref = peerSystemDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerSystemDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The textual description of the network entity of LLDP peer.
+       * 
+ * + * string peer_system_description = 2; + * + * @return The bytes for peerSystemDescription. + */ + public com.google.protobuf.ByteString getPeerSystemDescriptionBytes() { + java.lang.Object ref = peerSystemDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerSystemDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The textual description of the network entity of LLDP peer.
+       * 
+ * + * string peer_system_description = 2; + * + * @param value The peerSystemDescription to set. + * @return This builder for chaining. + */ + public Builder setPeerSystemDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerSystemDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The textual description of the network entity of LLDP peer.
+       * 
+ * + * string peer_system_description = 2; + * + * @return This builder for chaining. + */ + public Builder clearPeerSystemDescription() { + peerSystemDescription_ = getDefaultInstance().getPeerSystemDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The textual description of the network entity of LLDP peer.
+       * 
+ * + * string peer_system_description = 2; + * + * @param value The bytes for peerSystemDescription to set. + * @return This builder for chaining. + */ + public Builder setPeerSystemDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerSystemDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object peerChassisId_ = ""; + /** + * + * + *
+       * The peer chassis component of the endpoint identifier associated with the
+       * transmitting LLDP agent.
+       * 
+ * + * string peer_chassis_id = 3; + * + * @return The peerChassisId. + */ + public java.lang.String getPeerChassisId() { + java.lang.Object ref = peerChassisId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerChassisId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The peer chassis component of the endpoint identifier associated with the
+       * transmitting LLDP agent.
+       * 
+ * + * string peer_chassis_id = 3; + * + * @return The bytes for peerChassisId. + */ + public com.google.protobuf.ByteString getPeerChassisIdBytes() { + java.lang.Object ref = peerChassisId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerChassisId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The peer chassis component of the endpoint identifier associated with the
+       * transmitting LLDP agent.
+       * 
+ * + * string peer_chassis_id = 3; + * + * @param value The peerChassisId to set. + * @return This builder for chaining. + */ + public Builder setPeerChassisId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerChassisId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The peer chassis component of the endpoint identifier associated with the
+       * transmitting LLDP agent.
+       * 
+ * + * string peer_chassis_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearPeerChassisId() { + peerChassisId_ = getDefaultInstance().getPeerChassisId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The peer chassis component of the endpoint identifier associated with the
+       * transmitting LLDP agent.
+       * 
+ * + * string peer_chassis_id = 3; + * + * @param value The bytes for peerChassisId to set. + * @return This builder for chaining. + */ + public Builder setPeerChassisIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerChassisId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object peerChassisIdType_ = ""; + /** + * + * + *
+       * The format and source of the peer chassis identifier string.
+       * 
+ * + * string peer_chassis_id_type = 4; + * + * @return The peerChassisIdType. + */ + public java.lang.String getPeerChassisIdType() { + java.lang.Object ref = peerChassisIdType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerChassisIdType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The format and source of the peer chassis identifier string.
+       * 
+ * + * string peer_chassis_id_type = 4; + * + * @return The bytes for peerChassisIdType. + */ + public com.google.protobuf.ByteString getPeerChassisIdTypeBytes() { + java.lang.Object ref = peerChassisIdType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerChassisIdType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The format and source of the peer chassis identifier string.
+       * 
+ * + * string peer_chassis_id_type = 4; + * + * @param value The peerChassisIdType to set. + * @return This builder for chaining. + */ + public Builder setPeerChassisIdType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerChassisIdType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The format and source of the peer chassis identifier string.
+       * 
+ * + * string peer_chassis_id_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearPeerChassisIdType() { + peerChassisIdType_ = getDefaultInstance().getPeerChassisIdType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The format and source of the peer chassis identifier string.
+       * 
+ * + * string peer_chassis_id_type = 4; + * + * @param value The bytes for peerChassisIdType to set. + * @return This builder for chaining. + */ + public Builder setPeerChassisIdTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerChassisIdType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object peerPortId_ = ""; + /** + * + * + *
+       * The port component of the endpoint identifier associated with the
+       * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+       * port, then this TLV is optional.
+       * 
+ * + * string peer_port_id = 5; + * + * @return The peerPortId. + */ + public java.lang.String getPeerPortId() { + java.lang.Object ref = peerPortId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerPortId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The port component of the endpoint identifier associated with the
+       * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+       * port, then this TLV is optional.
+       * 
+ * + * string peer_port_id = 5; + * + * @return The bytes for peerPortId. + */ + public com.google.protobuf.ByteString getPeerPortIdBytes() { + java.lang.Object ref = peerPortId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerPortId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The port component of the endpoint identifier associated with the
+       * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+       * port, then this TLV is optional.
+       * 
+ * + * string peer_port_id = 5; + * + * @param value The peerPortId to set. + * @return This builder for chaining. + */ + public Builder setPeerPortId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerPortId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The port component of the endpoint identifier associated with the
+       * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+       * port, then this TLV is optional.
+       * 
+ * + * string peer_port_id = 5; + * + * @return This builder for chaining. + */ + public Builder clearPeerPortId() { + peerPortId_ = getDefaultInstance().getPeerPortId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * The port component of the endpoint identifier associated with the
+       * transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
+       * port, then this TLV is optional.
+       * 
+ * + * string peer_port_id = 5; + * + * @param value The bytes for peerPortId to set. + * @return This builder for chaining. + */ + public Builder setPeerPortIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerPortId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object peerPortIdType_ = ""; + /** + * + * + *
+       * The format and source of the peer port identifier string.
+       * 
+ * + * string peer_port_id_type = 6; + * + * @return The peerPortIdType. + */ + public java.lang.String getPeerPortIdType() { + java.lang.Object ref = peerPortIdType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerPortIdType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The format and source of the peer port identifier string.
+       * 
+ * + * string peer_port_id_type = 6; + * + * @return The bytes for peerPortIdType. + */ + public com.google.protobuf.ByteString getPeerPortIdTypeBytes() { + java.lang.Object ref = peerPortIdType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerPortIdType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The format and source of the peer port identifier string.
+       * 
+ * + * string peer_port_id_type = 6; + * + * @param value The peerPortIdType to set. + * @return This builder for chaining. + */ + public Builder setPeerPortIdType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerPortIdType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The format and source of the peer port identifier string.
+       * 
+ * + * string peer_port_id_type = 6; + * + * @return This builder for chaining. + */ + public Builder clearPeerPortIdType() { + peerPortIdType_ = getDefaultInstance().getPeerPortIdType(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+       * The format and source of the peer port identifier string.
+       * 
+ * + * string peer_port_id_type = 6; + * + * @param value The bytes for peerPortIdType to set. + * @return This builder for chaining. + */ + public Builder setPeerPortIdTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerPortIdType_ = value; + bitField0_ |= 0x00000020; + 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus) + private static final com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus(); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkLLDPStatus 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.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MAC_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object macAddress_ = ""; + /** + * + * + *
+   * The MAC address of the Interconnect's bundle interface.
+   * 
+ * + * string mac_address = 1; + * + * @return The macAddress. + */ + @java.lang.Override + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + 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(); + macAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The MAC address of the Interconnect's bundle interface.
+   * 
+ * + * string mac_address = 1; + * + * @return The bytes for macAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINK_LAYER_ADDRESSES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List linkLayerAddresses_; + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + @java.lang.Override + public java.util.List + getLinkLayerAddressesList() { + return linkLayerAddresses_; + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + @java.lang.Override + public java.util.List + getLinkLayerAddressesOrBuilderList() { + return linkLayerAddresses_; + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + @java.lang.Override + public int getLinkLayerAddressesCount() { + return linkLayerAddresses_.size(); + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddress getLinkLayerAddresses(int index) { + return linkLayerAddresses_.get(index); + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder getLinkLayerAddressesOrBuilder( + int index) { + return linkLayerAddresses_.get(index); + } + + public static final int LINKS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List links_; + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + @java.lang.Override + public java.util.List + getLinksList() { + return links_; + } + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder> + getLinksOrBuilderList() { + return links_; + } + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus getLinks(int index) { + return links_.get(index); + } + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder + getLinksOrBuilder(int index) { + return links_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(macAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, macAddress_); + } + for (int i = 0; i < linkLayerAddresses_.size(); i++) { + output.writeMessage(2, linkLayerAddresses_.get(i)); + } + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(3, links_.get(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(macAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, macAddress_); + } + for (int i = 0; i < linkLayerAddresses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, linkLayerAddresses_.get(i)); + } + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, links_.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.edgenetwork.v1.InterconnectDiagnostics)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics other = + (com.google.cloud.edgenetwork.v1.InterconnectDiagnostics) obj; + + if (!getMacAddress().equals(other.getMacAddress())) return false; + if (!getLinkLayerAddressesList().equals(other.getLinkLayerAddressesList())) return false; + if (!getLinksList().equals(other.getLinksList())) 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) + MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMacAddress().hashCode(); + if (getLinkLayerAddressesCount() > 0) { + hash = (37 * hash) + LINK_LAYER_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getLinkLayerAddressesList().hashCode(); + } + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics 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.edgenetwork.v1.InterconnectDiagnostics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics 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.edgenetwork.v1.InterconnectDiagnostics parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics 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.edgenetwork.v1.InterconnectDiagnostics parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics 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.edgenetwork.v1.InterconnectDiagnostics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics 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.edgenetwork.v1.InterconnectDiagnostics 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; + } + /** + * + * + *
+   * Diagnostics information about interconnect, contains detailed and current
+   * technical information about Google's side of the connection.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.InterconnectDiagnostics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.InterconnectDiagnostics) + com.google.cloud.edgenetwork.v1.InterconnectDiagnosticsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.class, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + macAddress_ = ""; + if (linkLayerAddressesBuilder_ == null) { + linkLayerAddresses_ = java.util.Collections.emptyList(); + } else { + linkLayerAddresses_ = null; + linkLayerAddressesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + } else { + links_ = null; + linksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics build() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics buildPartial() { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics result = + new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics result) { + if (linkLayerAddressesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + linkLayerAddresses_ = java.util.Collections.unmodifiableList(linkLayerAddresses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.linkLayerAddresses_ = linkLayerAddresses_; + } else { + result.linkLayerAddresses_ = linkLayerAddressesBuilder_.build(); + } + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.links_ = links_; + } else { + result.links_ = linksBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.InterconnectDiagnostics result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.macAddress_ = macAddress_; + } + } + + @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.edgenetwork.v1.InterconnectDiagnostics) { + return mergeFrom((com.google.cloud.edgenetwork.v1.InterconnectDiagnostics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.InterconnectDiagnostics other) { + if (other == com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.getDefaultInstance()) + return this; + if (!other.getMacAddress().isEmpty()) { + macAddress_ = other.macAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (linkLayerAddressesBuilder_ == null) { + if (!other.linkLayerAddresses_.isEmpty()) { + if (linkLayerAddresses_.isEmpty()) { + linkLayerAddresses_ = other.linkLayerAddresses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.addAll(other.linkLayerAddresses_); + } + onChanged(); + } + } else { + if (!other.linkLayerAddresses_.isEmpty()) { + if (linkLayerAddressesBuilder_.isEmpty()) { + linkLayerAddressesBuilder_.dispose(); + linkLayerAddressesBuilder_ = null; + linkLayerAddresses_ = other.linkLayerAddresses_; + bitField0_ = (bitField0_ & ~0x00000002); + linkLayerAddressesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinkLayerAddressesFieldBuilder() + : null; + } else { + linkLayerAddressesBuilder_.addAllMessages(other.linkLayerAddresses_); + } + } + } + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000004); + linksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinksFieldBuilder() + : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + 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: + { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.edgenetwork.v1.LinkLayerAddress m = + input.readMessage( + com.google.cloud.edgenetwork.v1.LinkLayerAddress.parser(), + extensionRegistry); + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(m); + } else { + linkLayerAddressesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus m = + input.readMessage( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.parser(), + extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.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.lang.Object macAddress_ = ""; + /** + * + * + *
+     * The MAC address of the Interconnect's bundle interface.
+     * 
+ * + * string mac_address = 1; + * + * @return The macAddress. + */ + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The MAC address of the Interconnect's bundle interface.
+     * 
+ * + * string mac_address = 1; + * + * @return The bytes for macAddress. + */ + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The MAC address of the Interconnect's bundle interface.
+     * 
+ * + * string mac_address = 1; + * + * @param value The macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The MAC address of the Interconnect's bundle interface.
+     * 
+ * + * string mac_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearMacAddress() { + macAddress_ = getDefaultInstance().getMacAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The MAC address of the Interconnect's bundle interface.
+     * 
+ * + * string mac_address = 1; + * + * @param value The bytes for macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List linkLayerAddresses_ = + java.util.Collections.emptyList(); + + private void ensureLinkLayerAddressesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + linkLayerAddresses_ = + new java.util.ArrayList( + linkLayerAddresses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.LinkLayerAddress, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder, + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder> + linkLayerAddressesBuilder_; + + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public java.util.List + getLinkLayerAddressesList() { + if (linkLayerAddressesBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkLayerAddresses_); + } else { + return linkLayerAddressesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public int getLinkLayerAddressesCount() { + if (linkLayerAddressesBuilder_ == null) { + return linkLayerAddresses_.size(); + } else { + return linkLayerAddressesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress getLinkLayerAddresses(int index) { + if (linkLayerAddressesBuilder_ == null) { + return linkLayerAddresses_.get(index); + } else { + return linkLayerAddressesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder setLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress value) { + if (linkLayerAddressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.set(index, value); + onChanged(); + } else { + linkLayerAddressesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder setLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder builderForValue) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.set(index, builderForValue.build()); + onChanged(); + } else { + linkLayerAddressesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder addLinkLayerAddresses(com.google.cloud.edgenetwork.v1.LinkLayerAddress value) { + if (linkLayerAddressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(value); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder addLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress value) { + if (linkLayerAddressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(index, value); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder addLinkLayerAddresses( + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder builderForValue) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(builderForValue.build()); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder addLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder builderForValue) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(index, builderForValue.build()); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder addAllLinkLayerAddresses( + java.lang.Iterable values) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkLayerAddresses_); + onChanged(); + } else { + linkLayerAddressesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder clearLinkLayerAddresses() { + if (linkLayerAddressesBuilder_ == null) { + linkLayerAddresses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + linkLayerAddressesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public Builder removeLinkLayerAddresses(int index) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.remove(index); + onChanged(); + } else { + linkLayerAddressesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder getLinkLayerAddressesBuilder( + int index) { + return getLinkLayerAddressesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder getLinkLayerAddressesOrBuilder( + int index) { + if (linkLayerAddressesBuilder_ == null) { + return linkLayerAddresses_.get(index); + } else { + return linkLayerAddressesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public java.util.List + getLinkLayerAddressesOrBuilderList() { + if (linkLayerAddressesBuilder_ != null) { + return linkLayerAddressesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkLayerAddresses_); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder addLinkLayerAddressesBuilder() { + return getLinkLayerAddressesFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.LinkLayerAddress.getDefaultInstance()); + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder addLinkLayerAddressesBuilder( + int index) { + return getLinkLayerAddressesFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.LinkLayerAddress.getDefaultInstance()); + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + public java.util.List + getLinkLayerAddressesBuilderList() { + return getLinkLayerAddressesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.LinkLayerAddress, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder, + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder> + getLinkLayerAddressesFieldBuilder() { + if (linkLayerAddressesBuilder_ == null) { + linkLayerAddressesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.LinkLayerAddress, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder, + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder>( + linkLayerAddresses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + linkLayerAddresses_ = null; + } + return linkLayerAddressesBuilder_; + } + + private java.util.List + links_ = java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + links_ = + new java.util.ArrayList< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus>(links_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder> + linksBuilder_; + + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public java.util.List + getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder setLinks( + int index, com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder setLinks( + int index, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder + builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder addLinks( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder addLinks( + int index, com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder addLinks( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder + builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder addLinks( + int index, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder + builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder addAllLinks( + java.lang.Iterable< + ? extends com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus> + values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder + getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder + getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder> + getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder + addLinksBuilder() { + return getLinksFieldBuilder() + .addBuilder( + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder + addLinksBuilder(int index) { + return getLinksFieldBuilder() + .addBuilder( + index, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of LinkStatus objects, used to describe the status for each link on
+     * the Interconnect.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + public java.util.List< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder> + getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder> + getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus.Builder, + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder>( + links_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + @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.edgenetwork.v1.InterconnectDiagnostics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.InterconnectDiagnostics) + private static final com.google.cloud.edgenetwork.v1.InterconnectDiagnostics DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.InterconnectDiagnostics(); + } + + public static com.google.cloud.edgenetwork.v1.InterconnectDiagnostics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InterconnectDiagnostics 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.edgenetwork.v1.InterconnectDiagnostics getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnosticsOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnosticsOrBuilder.java new file mode 100644 index 000000000000..a0a0de822e41 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectDiagnosticsOrBuilder.java @@ -0,0 +1,172 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface InterconnectDiagnosticsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.InterconnectDiagnostics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The MAC address of the Interconnect's bundle interface.
+   * 
+ * + * string mac_address = 1; + * + * @return The macAddress. + */ + java.lang.String getMacAddress(); + /** + * + * + *
+   * The MAC address of the Interconnect's bundle interface.
+   * 
+ * + * string mac_address = 1; + * + * @return The bytes for macAddress. + */ + com.google.protobuf.ByteString getMacAddressBytes(); + + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + java.util.List getLinkLayerAddressesList(); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + com.google.cloud.edgenetwork.v1.LinkLayerAddress getLinkLayerAddresses(int index); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + int getLinkLayerAddressesCount(); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + java.util.List + getLinkLayerAddressesOrBuilderList(); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2; + */ + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder getLinkLayerAddressesOrBuilder( + int index); + + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + java.util.List getLinksList(); + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus getLinks(int index); + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + int getLinksCount(); + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + java.util.List< + ? extends com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder> + getLinksOrBuilderList(); + /** + * + * + *
+   * A list of LinkStatus objects, used to describe the status for each link on
+   * the Interconnect.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatusOrBuilder getLinksOrBuilder( + int index); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectName.java new file mode 100644 index 000000000000..e530acdb6dd2 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectName.java @@ -0,0 +1,260 @@ +/* + * 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.edgenetwork.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 InterconnectName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE_INTERCONNECT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + private final String interconnect; + + @Deprecated + protected InterconnectName() { + project = null; + location = null; + zone = null; + interconnect = null; + } + + private InterconnectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + interconnect = Preconditions.checkNotNull(builder.getInterconnect()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getInterconnect() { + return interconnect; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InterconnectName of( + String project, String location, String zone, String interconnect) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setInterconnect(interconnect) + .build(); + } + + public static String format(String project, String location, String zone, String interconnect) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setInterconnect(interconnect) + .build() + .toString(); + } + + public static InterconnectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE_INTERCONNECT.validatedMatch( + formattedString, "InterconnectName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("zone"), + matchMap.get("interconnect")); + } + + 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 (InterconnectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE_INTERCONNECT.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (zone != null) { + fieldMapBuilder.put("zone", zone); + } + if (interconnect != null) { + fieldMapBuilder.put("interconnect", interconnect); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE_INTERCONNECT.instantiate( + "project", project, "location", location, "zone", zone, "interconnect", interconnect); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InterconnectName that = ((InterconnectName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone) + && Objects.equals(this.interconnect, that.interconnect); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(zone); + h *= 1000003; + h ^= Objects.hashCode(interconnect); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}. + */ + public static class Builder { + private String project; + private String location; + private String zone; + private String interconnect; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getInterconnect() { + return interconnect; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public Builder setInterconnect(String interconnect) { + this.interconnect = interconnect; + return this; + } + + private Builder(InterconnectName interconnectName) { + this.project = interconnectName.project; + this.location = interconnectName.location; + this.zone = interconnectName.zone; + this.interconnect = interconnectName.interconnect; + } + + public InterconnectName build() { + return new InterconnectName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectOrBuilder.java new file mode 100644 index 000000000000..96f180313ea5 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/InterconnectOrBuilder.java @@ -0,0 +1,349 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface InterconnectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Interconnect) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The canonical resource name of the interconnect.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The canonical resource name of the interconnect.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time when the subnet 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 when the subnet 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 when the subnet was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the subnet 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 when the subnet 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 when the subnet was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+   * now.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for interconnectType. + */ + int getInterconnectTypeValue(); + /** + * + * + *
+   * Optional. Type of interconnect, which takes only the value 'DEDICATED' for
+   * now.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.Interconnect.InterconnectType interconnect_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interconnectType. + */ + com.google.cloud.edgenetwork.v1.Interconnect.InterconnectType getInterconnectType(); + + /** + * + * + *
+   * Output only. Unique identifier for the link.
+   * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+   * Output only. Unique identifier for the link.
+   * 
+ * + * string uuid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+   * Output only. Cloud resource name of the switch device.
+   * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deviceCloudResourceName. + */ + java.lang.String getDeviceCloudResourceName(); + /** + * + * + *
+   * Output only. Cloud resource name of the switch device.
+   * 
+ * + * string device_cloud_resource_name = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for deviceCloudResourceName. + */ + com.google.protobuf.ByteString getDeviceCloudResourceNameBytes(); + + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the physicalPorts. + */ + java.util.List getPhysicalPortsList(); + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of physicalPorts. + */ + int getPhysicalPortsCount(); + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The physicalPorts at the given index. + */ + java.lang.String getPhysicalPorts(int index); + /** + * + * + *
+   * Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
+   * interconnect.
+   * 
+ * + * repeated string physical_ports = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the physicalPorts at the given index. + */ + com.google.protobuf.ByteString getPhysicalPortsBytes(int index); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddress.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddress.java new file mode 100644 index 000000000000..7be81941909b --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddress.java @@ -0,0 +1,806 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * LinkLayerAddress contains an IP address and corresponding link-layer address.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.LinkLayerAddress} + */ +public final class LinkLayerAddress extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.LinkLayerAddress) + LinkLayerAddressOrBuilder { + private static final long serialVersionUID = 0L; + // Use LinkLayerAddress.newBuilder() to construct. + private LinkLayerAddress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkLayerAddress() { + macAddress_ = ""; + ipAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LinkLayerAddress(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.LinkLayerAddress.class, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder.class); + } + + public static final int MAC_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object macAddress_ = ""; + /** + * + * + *
+   * The MAC address of this neighbor.
+   * 
+ * + * string mac_address = 1; + * + * @return The macAddress. + */ + @java.lang.Override + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + 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(); + macAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The MAC address of this neighbor.
+   * 
+ * + * string mac_address = 1; + * + * @return The bytes for macAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + /** + * + * + *
+   * The IP address of this neighbor.
+   * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + 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(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The IP address of this neighbor.
+   * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = 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(macAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, macAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + 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(macAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, macAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + 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.edgenetwork.v1.LinkLayerAddress)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.LinkLayerAddress other = + (com.google.cloud.edgenetwork.v1.LinkLayerAddress) obj; + + if (!getMacAddress().equals(other.getMacAddress())) return false; + if (!getIpAddress().equals(other.getIpAddress())) 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) + MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMacAddress().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress 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.edgenetwork.v1.LinkLayerAddress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress 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.edgenetwork.v1.LinkLayerAddress parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress 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.edgenetwork.v1.LinkLayerAddress parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress 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.edgenetwork.v1.LinkLayerAddress parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress 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.edgenetwork.v1.LinkLayerAddress 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; + } + /** + * + * + *
+   * LinkLayerAddress contains an IP address and corresponding link-layer address.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.LinkLayerAddress} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.LinkLayerAddress) + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.LinkLayerAddress.class, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.LinkLayerAddress.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + macAddress_ = ""; + ipAddress_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddress getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.LinkLayerAddress.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddress build() { + com.google.cloud.edgenetwork.v1.LinkLayerAddress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddress buildPartial() { + com.google.cloud.edgenetwork.v1.LinkLayerAddress result = + new com.google.cloud.edgenetwork.v1.LinkLayerAddress(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.LinkLayerAddress result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.macAddress_ = macAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipAddress_ = ipAddress_; + } + } + + @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.edgenetwork.v1.LinkLayerAddress) { + return mergeFrom((com.google.cloud.edgenetwork.v1.LinkLayerAddress) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.LinkLayerAddress other) { + if (other == com.google.cloud.edgenetwork.v1.LinkLayerAddress.getDefaultInstance()) + return this; + if (!other.getMacAddress().isEmpty()) { + macAddress_ = other.macAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000002; + 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: + { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 macAddress_ = ""; + /** + * + * + *
+     * The MAC address of this neighbor.
+     * 
+ * + * string mac_address = 1; + * + * @return The macAddress. + */ + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The MAC address of this neighbor.
+     * 
+ * + * string mac_address = 1; + * + * @return The bytes for macAddress. + */ + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The MAC address of this neighbor.
+     * 
+ * + * string mac_address = 1; + * + * @param value The macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The MAC address of this neighbor.
+     * 
+ * + * string mac_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearMacAddress() { + macAddress_ = getDefaultInstance().getMacAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The MAC address of this neighbor.
+     * 
+ * + * string mac_address = 1; + * + * @param value The bytes for macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * The IP address of this neighbor.
+     * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP address of this neighbor.
+     * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP address of this neighbor.
+     * 
+ * + * string ip_address = 2; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of this neighbor.
+     * 
+ * + * string ip_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP address of this neighbor.
+     * 
+ * + * string ip_address = 2; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = 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.edgenetwork.v1.LinkLayerAddress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.LinkLayerAddress) + private static final com.google.cloud.edgenetwork.v1.LinkLayerAddress DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.LinkLayerAddress(); + } + + public static com.google.cloud.edgenetwork.v1.LinkLayerAddress getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkLayerAddress 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.edgenetwork.v1.LinkLayerAddress getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddressOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddressOrBuilder.java new file mode 100644 index 000000000000..9f3164bf82d5 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LinkLayerAddressOrBuilder.java @@ -0,0 +1,75 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface LinkLayerAddressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.LinkLayerAddress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The MAC address of this neighbor.
+   * 
+ * + * string mac_address = 1; + * + * @return The macAddress. + */ + java.lang.String getMacAddress(); + /** + * + * + *
+   * The MAC address of this neighbor.
+   * 
+ * + * string mac_address = 1; + * + * @return The bytes for macAddress. + */ + com.google.protobuf.ByteString getMacAddressBytes(); + + /** + * + * + *
+   * The IP address of this neighbor.
+   * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+   * The IP address of this neighbor.
+   * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequest.java new file mode 100644 index 000000000000..6e8ce800b2bb --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequest.java @@ -0,0 +1,1294 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting list of InterconnectAttachments
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest} + */ +public final class ListInterconnectAttachmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) + ListInterconnectAttachmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInterconnectAttachmentsRequest.newBuilder() to construct. + private ListInterconnectAttachmentsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInterconnectAttachmentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInterconnectAttachmentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest.class, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListInterconnectAttachmentsRequest
+   * 
+ * + * + * 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. Parent value for ListInterconnectAttachmentsRequest
+   * 
+ * + * + * 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; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Filtering 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; + } + } + /** + * + * + *
+   * Filtering 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_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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.edgenetwork.v1.ListInterconnectAttachmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest other = + (com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) 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.edgenetwork.v1.ListInterconnectAttachmentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest 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.edgenetwork.v1.ListInterconnectAttachmentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest 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.edgenetwork.v1.ListInterconnectAttachmentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest 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.edgenetwork.v1.ListInterconnectAttachmentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + 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.edgenetwork.v1.ListInterconnectAttachmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest 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.edgenetwork.v1.ListInterconnectAttachmentsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of InterconnectAttachments
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest.class, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest build() { + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest buildPartial() { + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest result = + new com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest 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.edgenetwork.v1.ListInterconnectAttachmentsRequest) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest other) { + if (other + == com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + .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. Parent value for ListInterconnectAttachmentsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectAttachmentsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectAttachmentsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectAttachmentsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectAttachmentsRequest
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering 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_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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.edgenetwork.v1.ListInterconnectAttachmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) + private static final com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest(); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInterconnectAttachmentsRequest 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.edgenetwork.v1.ListInterconnectAttachmentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequestOrBuilder.java new file mode 100644 index 000000000000..e083c9a95f50 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListInterconnectAttachmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListInterconnectAttachmentsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListInterconnectAttachmentsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponse.java new file mode 100644 index 000000000000..c44bcc07a02b --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponse.java @@ -0,0 +1,1480 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for response to listing InterconnectAttachments
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse} + */ +public final class ListInterconnectAttachmentsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse) + ListInterconnectAttachmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInterconnectAttachmentsResponse.newBuilder() to construct. + private ListInterconnectAttachmentsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInterconnectAttachmentsResponse() { + interconnectAttachments_ = 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 ListInterconnectAttachmentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse.class, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse.Builder.class); + } + + public static final int INTERCONNECT_ATTACHMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + interconnectAttachments_; + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + @java.lang.Override + public java.util.List + getInterconnectAttachmentsList() { + return interconnectAttachments_; + } + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + @java.lang.Override + public java.util.List + getInterconnectAttachmentsOrBuilderList() { + return interconnectAttachments_; + } + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + @java.lang.Override + public int getInterconnectAttachmentsCount() { + return interconnectAttachments_.size(); + } + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachments( + int index) { + return interconnectAttachments_.get(index); + } + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder + getInterconnectAttachmentsOrBuilder(int index) { + return interconnectAttachments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < interconnectAttachments_.size(); i++) { + output.writeMessage(1, interconnectAttachments_.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 < interconnectAttachments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, interconnectAttachments_.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.edgenetwork.v1.ListInterconnectAttachmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse other = + (com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse) obj; + + if (!getInterconnectAttachmentsList().equals(other.getInterconnectAttachmentsList())) + 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 (getInterconnectAttachmentsCount() > 0) { + hash = (37 * hash) + INTERCONNECT_ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + getInterconnectAttachmentsList().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.edgenetwork.v1.ListInterconnectAttachmentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse 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.edgenetwork.v1.ListInterconnectAttachmentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse 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.edgenetwork.v1.ListInterconnectAttachmentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse 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.edgenetwork.v1.ListInterconnectAttachmentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + 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.edgenetwork.v1.ListInterconnectAttachmentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse 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.edgenetwork.v1.ListInterconnectAttachmentsResponse 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; + } + /** + * + * + *
+   * Message for response to listing InterconnectAttachments
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse) + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse.class, + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (interconnectAttachmentsBuilder_ == null) { + interconnectAttachments_ = java.util.Collections.emptyList(); + } else { + interconnectAttachments_ = null; + interconnectAttachmentsBuilder_.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse build() { + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse buildPartial() { + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse result = + new com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse result) { + if (interconnectAttachmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + interconnectAttachments_ = + java.util.Collections.unmodifiableList(interconnectAttachments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.interconnectAttachments_ = interconnectAttachments_; + } else { + result.interconnectAttachments_ = interconnectAttachmentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse 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.edgenetwork.v1.ListInterconnectAttachmentsResponse) { + return mergeFrom( + (com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse other) { + if (other + == com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + .getDefaultInstance()) return this; + if (interconnectAttachmentsBuilder_ == null) { + if (!other.interconnectAttachments_.isEmpty()) { + if (interconnectAttachments_.isEmpty()) { + interconnectAttachments_ = other.interconnectAttachments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.addAll(other.interconnectAttachments_); + } + onChanged(); + } + } else { + if (!other.interconnectAttachments_.isEmpty()) { + if (interconnectAttachmentsBuilder_.isEmpty()) { + interconnectAttachmentsBuilder_.dispose(); + interconnectAttachmentsBuilder_ = null; + interconnectAttachments_ = other.interconnectAttachments_; + bitField0_ = (bitField0_ & ~0x00000001); + interconnectAttachmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInterconnectAttachmentsFieldBuilder() + : null; + } else { + interconnectAttachmentsBuilder_.addAllMessages(other.interconnectAttachments_); + } + } + } + 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.edgenetwork.v1.InterconnectAttachment m = + input.readMessage( + com.google.cloud.edgenetwork.v1.InterconnectAttachment.parser(), + extensionRegistry); + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(m); + } else { + interconnectAttachmentsBuilder_.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 + interconnectAttachments_ = java.util.Collections.emptyList(); + + private void ensureInterconnectAttachmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + interconnectAttachments_ = + new java.util.ArrayList( + interconnectAttachments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectAttachment, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder, + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder> + interconnectAttachmentsBuilder_; + + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public java.util.List + getInterconnectAttachmentsList() { + if (interconnectAttachmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(interconnectAttachments_); + } else { + return interconnectAttachmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public int getInterconnectAttachmentsCount() { + if (interconnectAttachmentsBuilder_ == null) { + return interconnectAttachments_.size(); + } else { + return interconnectAttachmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachments( + int index) { + if (interconnectAttachmentsBuilder_ == null) { + return interconnectAttachments_.get(index); + } else { + return interconnectAttachmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder setInterconnectAttachments( + int index, com.google.cloud.edgenetwork.v1.InterconnectAttachment value) { + if (interconnectAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.set(index, value); + onChanged(); + } else { + interconnectAttachmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder setInterconnectAttachments( + int index, com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder builderForValue) { + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.set(index, builderForValue.build()); + onChanged(); + } else { + interconnectAttachmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder addInterconnectAttachments( + com.google.cloud.edgenetwork.v1.InterconnectAttachment value) { + if (interconnectAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(value); + onChanged(); + } else { + interconnectAttachmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder addInterconnectAttachments( + int index, com.google.cloud.edgenetwork.v1.InterconnectAttachment value) { + if (interconnectAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(index, value); + onChanged(); + } else { + interconnectAttachmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder addInterconnectAttachments( + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder builderForValue) { + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(builderForValue.build()); + onChanged(); + } else { + interconnectAttachmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder addInterconnectAttachments( + int index, com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder builderForValue) { + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(index, builderForValue.build()); + onChanged(); + } else { + interconnectAttachmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder addAllInterconnectAttachments( + java.lang.Iterable + values) { + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interconnectAttachments_); + onChanged(); + } else { + interconnectAttachmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder clearInterconnectAttachments() { + if (interconnectAttachmentsBuilder_ == null) { + interconnectAttachments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + interconnectAttachmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public Builder removeInterconnectAttachments(int index) { + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.remove(index); + onChanged(); + } else { + interconnectAttachmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder + getInterconnectAttachmentsBuilder(int index) { + return getInterconnectAttachmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder + getInterconnectAttachmentsOrBuilder(int index) { + if (interconnectAttachmentsBuilder_ == null) { + return interconnectAttachments_.get(index); + } else { + return interconnectAttachmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public java.util.List + getInterconnectAttachmentsOrBuilderList() { + if (interconnectAttachmentsBuilder_ != null) { + return interconnectAttachmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interconnectAttachments_); + } + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder + addInterconnectAttachmentsBuilder() { + return getInterconnectAttachmentsFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder + addInterconnectAttachmentsBuilder(int index) { + return getInterconnectAttachmentsFieldBuilder() + .addBuilder( + index, com.google.cloud.edgenetwork.v1.InterconnectAttachment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of InterconnectAttachment
+     * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + public java.util.List + getInterconnectAttachmentsBuilderList() { + return getInterconnectAttachmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectAttachment, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder, + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder> + getInterconnectAttachmentsFieldBuilder() { + if (interconnectAttachmentsBuilder_ == null) { + interconnectAttachmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.InterconnectAttachment, + com.google.cloud.edgenetwork.v1.InterconnectAttachment.Builder, + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder>( + interconnectAttachments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + interconnectAttachments_ = null; + } + return interconnectAttachmentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.edgenetwork.v1.ListInterconnectAttachmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse) + private static final com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse(); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInterconnectAttachmentsResponse 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.edgenetwork.v1.ListInterconnectAttachmentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponseOrBuilder.java new file mode 100644 index 000000000000..2bd4077a7ec7 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectAttachmentsResponseOrBuilder.java @@ -0,0 +1,165 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListInterconnectAttachmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + java.util.List + getInterconnectAttachmentsList(); + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectAttachment getInterconnectAttachments(int index); + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + int getInterconnectAttachmentsCount(); + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + java.util.List + getInterconnectAttachmentsOrBuilderList(); + /** + * + * + *
+   * The list of InterconnectAttachment
+   * 
+ * + * + * repeated .google.cloud.edgenetwork.v1.InterconnectAttachment interconnect_attachments = 1; + * + */ + com.google.cloud.edgenetwork.v1.InterconnectAttachmentOrBuilder + getInterconnectAttachmentsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequest.java new file mode 100644 index 000000000000..d945bc843875 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequest.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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting list of Interconnects
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectsRequest} + */ +public final class ListInterconnectsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListInterconnectsRequest) + ListInterconnectsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInterconnectsRequest.newBuilder() to construct. + private ListInterconnectsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInterconnectsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInterconnectsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.class, + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListInterconnectsRequest
+   * 
+ * + * + * 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. Parent value for ListInterconnectsRequest
+   * 
+ * + * + * 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; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Filtering 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; + } + } + /** + * + * + *
+   * Filtering 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_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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.edgenetwork.v1.ListInterconnectsRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest other = + (com.google.cloud.edgenetwork.v1.ListInterconnectsRequest) 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.edgenetwork.v1.ListInterconnectsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Interconnects
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListInterconnectsRequest) + com.google.cloud.edgenetwork.v1.ListInterconnectsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.class, + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectsRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectsRequest build() { + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectsRequest buildPartial() { + com.google.cloud.edgenetwork.v1.ListInterconnectsRequest result = + new com.google.cloud.edgenetwork.v1.ListInterconnectsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListInterconnectsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListInterconnectsRequest other) { + if (other == com.google.cloud.edgenetwork.v1.ListInterconnectsRequest.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. Parent value for ListInterconnectsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectsRequest
+     * 
+ * + * + * 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. Parent value for ListInterconnectsRequest
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering 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_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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.edgenetwork.v1.ListInterconnectsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListInterconnectsRequest) + private static final com.google.cloud.edgenetwork.v1.ListInterconnectsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListInterconnectsRequest(); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInterconnectsRequest 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.edgenetwork.v1.ListInterconnectsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequestOrBuilder.java new file mode 100644 index 000000000000..3c37f2d53758 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListInterconnectsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListInterconnectsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListInterconnectsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListInterconnectsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponse.java new file mode 100644 index 000000000000..4518ced2d674 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponse.java @@ -0,0 +1,1402 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for response to listing Interconnects
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectsResponse} + */ +public final class ListInterconnectsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListInterconnectsResponse) + ListInterconnectsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInterconnectsResponse.newBuilder() to construct. + private ListInterconnectsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInterconnectsResponse() { + interconnects_ = 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 ListInterconnectsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.class, + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.Builder.class); + } + + public static final int INTERCONNECTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List interconnects_; + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + @java.lang.Override + public java.util.List getInterconnectsList() { + return interconnects_; + } + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + @java.lang.Override + public java.util.List + getInterconnectsOrBuilderList() { + return interconnects_; + } + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + @java.lang.Override + public int getInterconnectsCount() { + return interconnects_.size(); + } + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Interconnect getInterconnects(int index) { + return interconnects_.get(index); + } + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.InterconnectOrBuilder getInterconnectsOrBuilder( + int index) { + return interconnects_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < interconnects_.size(); i++) { + output.writeMessage(1, interconnects_.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 < interconnects_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, interconnects_.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.edgenetwork.v1.ListInterconnectsResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse other = + (com.google.cloud.edgenetwork.v1.ListInterconnectsResponse) obj; + + if (!getInterconnectsList().equals(other.getInterconnectsList())) 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 (getInterconnectsCount() > 0) { + hash = (37 * hash) + INTERCONNECTS_FIELD_NUMBER; + hash = (53 * hash) + getInterconnectsList().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.edgenetwork.v1.ListInterconnectsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Interconnects
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListInterconnectsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListInterconnectsResponse) + com.google.cloud.edgenetwork.v1.ListInterconnectsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.class, + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (interconnectsBuilder_ == null) { + interconnects_ = java.util.Collections.emptyList(); + } else { + interconnects_ = null; + interconnectsBuilder_.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectsResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectsResponse build() { + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListInterconnectsResponse buildPartial() { + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse result = + new com.google.cloud.edgenetwork.v1.ListInterconnectsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.ListInterconnectsResponse result) { + if (interconnectsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + interconnects_ = java.util.Collections.unmodifiableList(interconnects_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.interconnects_ = interconnects_; + } else { + result.interconnects_ = interconnectsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListInterconnectsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListInterconnectsResponse other) { + if (other == com.google.cloud.edgenetwork.v1.ListInterconnectsResponse.getDefaultInstance()) + return this; + if (interconnectsBuilder_ == null) { + if (!other.interconnects_.isEmpty()) { + if (interconnects_.isEmpty()) { + interconnects_ = other.interconnects_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInterconnectsIsMutable(); + interconnects_.addAll(other.interconnects_); + } + onChanged(); + } + } else { + if (!other.interconnects_.isEmpty()) { + if (interconnectsBuilder_.isEmpty()) { + interconnectsBuilder_.dispose(); + interconnectsBuilder_ = null; + interconnects_ = other.interconnects_; + bitField0_ = (bitField0_ & ~0x00000001); + interconnectsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInterconnectsFieldBuilder() + : null; + } else { + interconnectsBuilder_.addAllMessages(other.interconnects_); + } + } + } + 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.edgenetwork.v1.Interconnect m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Interconnect.parser(), extensionRegistry); + if (interconnectsBuilder_ == null) { + ensureInterconnectsIsMutable(); + interconnects_.add(m); + } else { + interconnectsBuilder_.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 interconnects_ = + java.util.Collections.emptyList(); + + private void ensureInterconnectsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + interconnects_ = + new java.util.ArrayList(interconnects_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Interconnect, + com.google.cloud.edgenetwork.v1.Interconnect.Builder, + com.google.cloud.edgenetwork.v1.InterconnectOrBuilder> + interconnectsBuilder_; + + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public java.util.List getInterconnectsList() { + if (interconnectsBuilder_ == null) { + return java.util.Collections.unmodifiableList(interconnects_); + } else { + return interconnectsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public int getInterconnectsCount() { + if (interconnectsBuilder_ == null) { + return interconnects_.size(); + } else { + return interconnectsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public com.google.cloud.edgenetwork.v1.Interconnect getInterconnects(int index) { + if (interconnectsBuilder_ == null) { + return interconnects_.get(index); + } else { + return interconnectsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder setInterconnects(int index, com.google.cloud.edgenetwork.v1.Interconnect value) { + if (interconnectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterconnectsIsMutable(); + interconnects_.set(index, value); + onChanged(); + } else { + interconnectsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder setInterconnects( + int index, com.google.cloud.edgenetwork.v1.Interconnect.Builder builderForValue) { + if (interconnectsBuilder_ == null) { + ensureInterconnectsIsMutable(); + interconnects_.set(index, builderForValue.build()); + onChanged(); + } else { + interconnectsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder addInterconnects(com.google.cloud.edgenetwork.v1.Interconnect value) { + if (interconnectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterconnectsIsMutable(); + interconnects_.add(value); + onChanged(); + } else { + interconnectsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder addInterconnects(int index, com.google.cloud.edgenetwork.v1.Interconnect value) { + if (interconnectsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterconnectsIsMutable(); + interconnects_.add(index, value); + onChanged(); + } else { + interconnectsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder addInterconnects( + com.google.cloud.edgenetwork.v1.Interconnect.Builder builderForValue) { + if (interconnectsBuilder_ == null) { + ensureInterconnectsIsMutable(); + interconnects_.add(builderForValue.build()); + onChanged(); + } else { + interconnectsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder addInterconnects( + int index, com.google.cloud.edgenetwork.v1.Interconnect.Builder builderForValue) { + if (interconnectsBuilder_ == null) { + ensureInterconnectsIsMutable(); + interconnects_.add(index, builderForValue.build()); + onChanged(); + } else { + interconnectsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder addAllInterconnects( + java.lang.Iterable values) { + if (interconnectsBuilder_ == null) { + ensureInterconnectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interconnects_); + onChanged(); + } else { + interconnectsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder clearInterconnects() { + if (interconnectsBuilder_ == null) { + interconnects_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + interconnectsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public Builder removeInterconnects(int index) { + if (interconnectsBuilder_ == null) { + ensureInterconnectsIsMutable(); + interconnects_.remove(index); + onChanged(); + } else { + interconnectsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public com.google.cloud.edgenetwork.v1.Interconnect.Builder getInterconnectsBuilder(int index) { + return getInterconnectsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public com.google.cloud.edgenetwork.v1.InterconnectOrBuilder getInterconnectsOrBuilder( + int index) { + if (interconnectsBuilder_ == null) { + return interconnects_.get(index); + } else { + return interconnectsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public java.util.List + getInterconnectsOrBuilderList() { + if (interconnectsBuilder_ != null) { + return interconnectsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interconnects_); + } + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public com.google.cloud.edgenetwork.v1.Interconnect.Builder addInterconnectsBuilder() { + return getInterconnectsFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Interconnect.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public com.google.cloud.edgenetwork.v1.Interconnect.Builder addInterconnectsBuilder(int index) { + return getInterconnectsFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Interconnect.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Interconnect
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + public java.util.List + getInterconnectsBuilderList() { + return getInterconnectsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Interconnect, + com.google.cloud.edgenetwork.v1.Interconnect.Builder, + com.google.cloud.edgenetwork.v1.InterconnectOrBuilder> + getInterconnectsFieldBuilder() { + if (interconnectsBuilder_ == null) { + interconnectsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Interconnect, + com.google.cloud.edgenetwork.v1.Interconnect.Builder, + com.google.cloud.edgenetwork.v1.InterconnectOrBuilder>( + interconnects_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + interconnects_ = null; + } + return interconnectsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.edgenetwork.v1.ListInterconnectsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListInterconnectsResponse) + private static final com.google.cloud.edgenetwork.v1.ListInterconnectsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListInterconnectsResponse(); + } + + public static com.google.cloud.edgenetwork.v1.ListInterconnectsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInterconnectsResponse 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.edgenetwork.v1.ListInterconnectsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponseOrBuilder.java new file mode 100644 index 000000000000..ff214290df2f --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListInterconnectsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListInterconnectsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListInterconnectsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + java.util.List getInterconnectsList(); + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + com.google.cloud.edgenetwork.v1.Interconnect getInterconnects(int index); + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + int getInterconnectsCount(); + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + java.util.List + getInterconnectsOrBuilderList(); + /** + * + * + *
+   * The list of Interconnect
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Interconnect interconnects = 1; + */ + com.google.cloud.edgenetwork.v1.InterconnectOrBuilder getInterconnectsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequest.java new file mode 100644 index 000000000000..42f30706f0a2 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequest.java @@ -0,0 +1,1281 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting list of Networks
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListNetworksRequest} + */ +public final class ListNetworksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListNetworksRequest) + ListNetworksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNetworksRequest.newBuilder() to construct. + private ListNetworksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNetworksRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNetworksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListNetworksRequest.class, + com.google.cloud.edgenetwork.v1.ListNetworksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListNetworksRequest
+   * 
+ * + * + * 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. Parent value for ListNetworksRequest
+   * 
+ * + * + * 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; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Filtering 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; + } + } + /** + * + * + *
+   * Filtering 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_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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.edgenetwork.v1.ListNetworksRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListNetworksRequest other = + (com.google.cloud.edgenetwork.v1.ListNetworksRequest) 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.edgenetwork.v1.ListNetworksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Networks
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListNetworksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListNetworksRequest) + com.google.cloud.edgenetwork.v1.ListNetworksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListNetworksRequest.class, + com.google.cloud.edgenetwork.v1.ListNetworksRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListNetworksRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListNetworksRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListNetworksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListNetworksRequest build() { + com.google.cloud.edgenetwork.v1.ListNetworksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListNetworksRequest buildPartial() { + com.google.cloud.edgenetwork.v1.ListNetworksRequest result = + new com.google.cloud.edgenetwork.v1.ListNetworksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListNetworksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListNetworksRequest other) { + if (other == com.google.cloud.edgenetwork.v1.ListNetworksRequest.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. Parent value for ListNetworksRequest
+     * 
+ * + * + * 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. Parent value for ListNetworksRequest
+     * 
+ * + * + * 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. Parent value for ListNetworksRequest
+     * 
+ * + * + * 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. Parent value for ListNetworksRequest
+     * 
+ * + * + * 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. Parent value for ListNetworksRequest
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering 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_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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.edgenetwork.v1.ListNetworksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListNetworksRequest) + private static final com.google.cloud.edgenetwork.v1.ListNetworksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListNetworksRequest(); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNetworksRequest 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.edgenetwork.v1.ListNetworksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequestOrBuilder.java new file mode 100644 index 000000000000..40ff7c68144d --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListNetworksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListNetworksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListNetworksRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListNetworksRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponse.java new file mode 100644 index 000000000000..4f2c619ddf93 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponse.java @@ -0,0 +1,1394 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for response to listing Networks
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListNetworksResponse} + */ +public final class ListNetworksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListNetworksResponse) + ListNetworksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNetworksResponse.newBuilder() to construct. + private ListNetworksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNetworksResponse() { + networks_ = 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 ListNetworksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListNetworksResponse.class, + com.google.cloud.edgenetwork.v1.ListNetworksResponse.Builder.class); + } + + public static final int NETWORKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List networks_; + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + @java.lang.Override + public java.util.List getNetworksList() { + return networks_; + } + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + @java.lang.Override + public java.util.List + getNetworksOrBuilderList() { + return networks_; + } + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + @java.lang.Override + public int getNetworksCount() { + return networks_.size(); + } + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Network getNetworks(int index) { + return networks_.get(index); + } + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.NetworkOrBuilder getNetworksOrBuilder(int index) { + return networks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < networks_.size(); i++) { + output.writeMessage(1, networks_.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 < networks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, networks_.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.edgenetwork.v1.ListNetworksResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListNetworksResponse other = + (com.google.cloud.edgenetwork.v1.ListNetworksResponse) obj; + + if (!getNetworksList().equals(other.getNetworksList())) 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 (getNetworksCount() > 0) { + hash = (37 * hash) + NETWORKS_FIELD_NUMBER; + hash = (53 * hash) + getNetworksList().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.edgenetwork.v1.ListNetworksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse 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; + } + /** + * + * + *
+   * Message for response to listing Networks
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListNetworksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListNetworksResponse) + com.google.cloud.edgenetwork.v1.ListNetworksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListNetworksResponse.class, + com.google.cloud.edgenetwork.v1.ListNetworksResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListNetworksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (networksBuilder_ == null) { + networks_ = java.util.Collections.emptyList(); + } else { + networks_ = null; + networksBuilder_.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListNetworksResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListNetworksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListNetworksResponse build() { + com.google.cloud.edgenetwork.v1.ListNetworksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListNetworksResponse buildPartial() { + com.google.cloud.edgenetwork.v1.ListNetworksResponse result = + new com.google.cloud.edgenetwork.v1.ListNetworksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.ListNetworksResponse result) { + if (networksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + networks_ = java.util.Collections.unmodifiableList(networks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.networks_ = networks_; + } else { + result.networks_ = networksBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListNetworksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListNetworksResponse other) { + if (other == com.google.cloud.edgenetwork.v1.ListNetworksResponse.getDefaultInstance()) + return this; + if (networksBuilder_ == null) { + if (!other.networks_.isEmpty()) { + if (networks_.isEmpty()) { + networks_ = other.networks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNetworksIsMutable(); + networks_.addAll(other.networks_); + } + onChanged(); + } + } else { + if (!other.networks_.isEmpty()) { + if (networksBuilder_.isEmpty()) { + networksBuilder_.dispose(); + networksBuilder_ = null; + networks_ = other.networks_; + bitField0_ = (bitField0_ & ~0x00000001); + networksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNetworksFieldBuilder() + : null; + } else { + networksBuilder_.addAllMessages(other.networks_); + } + } + } + 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.edgenetwork.v1.Network m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Network.parser(), extensionRegistry); + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(m); + } else { + networksBuilder_.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 networks_ = + java.util.Collections.emptyList(); + + private void ensureNetworksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + networks_ = new java.util.ArrayList(networks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Network, + com.google.cloud.edgenetwork.v1.Network.Builder, + com.google.cloud.edgenetwork.v1.NetworkOrBuilder> + networksBuilder_; + + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public java.util.List getNetworksList() { + if (networksBuilder_ == null) { + return java.util.Collections.unmodifiableList(networks_); + } else { + return networksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public int getNetworksCount() { + if (networksBuilder_ == null) { + return networks_.size(); + } else { + return networksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public com.google.cloud.edgenetwork.v1.Network getNetworks(int index) { + if (networksBuilder_ == null) { + return networks_.get(index); + } else { + return networksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder setNetworks(int index, com.google.cloud.edgenetwork.v1.Network value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.set(index, value); + onChanged(); + } else { + networksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder setNetworks( + int index, com.google.cloud.edgenetwork.v1.Network.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.set(index, builderForValue.build()); + onChanged(); + } else { + networksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder addNetworks(com.google.cloud.edgenetwork.v1.Network value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.add(value); + onChanged(); + } else { + networksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder addNetworks(int index, com.google.cloud.edgenetwork.v1.Network value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.add(index, value); + onChanged(); + } else { + networksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder addNetworks(com.google.cloud.edgenetwork.v1.Network.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(builderForValue.build()); + onChanged(); + } else { + networksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder addNetworks( + int index, com.google.cloud.edgenetwork.v1.Network.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(index, builderForValue.build()); + onChanged(); + } else { + networksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder addAllNetworks( + java.lang.Iterable values) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networks_); + onChanged(); + } else { + networksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder clearNetworks() { + if (networksBuilder_ == null) { + networks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + networksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public Builder removeNetworks(int index) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.remove(index); + onChanged(); + } else { + networksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public com.google.cloud.edgenetwork.v1.Network.Builder getNetworksBuilder(int index) { + return getNetworksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public com.google.cloud.edgenetwork.v1.NetworkOrBuilder getNetworksOrBuilder(int index) { + if (networksBuilder_ == null) { + return networks_.get(index); + } else { + return networksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public java.util.List + getNetworksOrBuilderList() { + if (networksBuilder_ != null) { + return networksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(networks_); + } + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public com.google.cloud.edgenetwork.v1.Network.Builder addNetworksBuilder() { + return getNetworksFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Network.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public com.google.cloud.edgenetwork.v1.Network.Builder addNetworksBuilder(int index) { + return getNetworksFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Network.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Network
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + public java.util.List + getNetworksBuilderList() { + return getNetworksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Network, + com.google.cloud.edgenetwork.v1.Network.Builder, + com.google.cloud.edgenetwork.v1.NetworkOrBuilder> + getNetworksFieldBuilder() { + if (networksBuilder_ == null) { + networksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Network, + com.google.cloud.edgenetwork.v1.Network.Builder, + com.google.cloud.edgenetwork.v1.NetworkOrBuilder>( + networks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + networks_ = null; + } + return networksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.edgenetwork.v1.ListNetworksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListNetworksResponse) + private static final com.google.cloud.edgenetwork.v1.ListNetworksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListNetworksResponse(); + } + + public static com.google.cloud.edgenetwork.v1.ListNetworksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNetworksResponse 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.edgenetwork.v1.ListNetworksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponseOrBuilder.java new file mode 100644 index 000000000000..1403aee38ab8 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListNetworksResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListNetworksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListNetworksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + java.util.List getNetworksList(); + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + com.google.cloud.edgenetwork.v1.Network getNetworks(int index); + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + int getNetworksCount(); + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + java.util.List + getNetworksOrBuilderList(); + /** + * + * + *
+   * The list of Network
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Network networks = 1; + */ + com.google.cloud.edgenetwork.v1.NetworkOrBuilder getNetworksOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequest.java new file mode 100644 index 000000000000..c7b89e24b0dc --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequest.java @@ -0,0 +1,1281 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting list of Routers
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListRoutersRequest} + */ +public final class ListRoutersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListRoutersRequest) + ListRoutersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRoutersRequest.newBuilder() to construct. + private ListRoutersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRoutersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRoutersRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListRoutersRequest.class, + com.google.cloud.edgenetwork.v1.ListRoutersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListRoutersRequest
+   * 
+ * + * + * 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. Parent value for ListRoutersRequest
+   * 
+ * + * + * 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; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Filtering 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; + } + } + /** + * + * + *
+   * Filtering 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_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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.edgenetwork.v1.ListRoutersRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListRoutersRequest other = + (com.google.cloud.edgenetwork.v1.ListRoutersRequest) 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.edgenetwork.v1.ListRoutersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Routers
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListRoutersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListRoutersRequest) + com.google.cloud.edgenetwork.v1.ListRoutersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListRoutersRequest.class, + com.google.cloud.edgenetwork.v1.ListRoutersRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListRoutersRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListRoutersRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListRoutersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListRoutersRequest build() { + com.google.cloud.edgenetwork.v1.ListRoutersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListRoutersRequest buildPartial() { + com.google.cloud.edgenetwork.v1.ListRoutersRequest result = + new com.google.cloud.edgenetwork.v1.ListRoutersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListRoutersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListRoutersRequest other) { + if (other == com.google.cloud.edgenetwork.v1.ListRoutersRequest.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. Parent value for ListRoutersRequest
+     * 
+ * + * + * 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. Parent value for ListRoutersRequest
+     * 
+ * + * + * 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. Parent value for ListRoutersRequest
+     * 
+ * + * + * 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. Parent value for ListRoutersRequest
+     * 
+ * + * + * 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. Parent value for ListRoutersRequest
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering 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_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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.edgenetwork.v1.ListRoutersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListRoutersRequest) + private static final com.google.cloud.edgenetwork.v1.ListRoutersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListRoutersRequest(); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRoutersRequest 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.edgenetwork.v1.ListRoutersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequestOrBuilder.java new file mode 100644 index 000000000000..a65f7aa7964b --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListRoutersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListRoutersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListRoutersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListRoutersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponse.java new file mode 100644 index 000000000000..3c0d6280a420 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponse.java @@ -0,0 +1,1393 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for response to listing Routers
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListRoutersResponse} + */ +public final class ListRoutersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListRoutersResponse) + ListRoutersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRoutersResponse.newBuilder() to construct. + private ListRoutersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRoutersResponse() { + routers_ = 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 ListRoutersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListRoutersResponse.class, + com.google.cloud.edgenetwork.v1.ListRoutersResponse.Builder.class); + } + + public static final int ROUTERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List routers_; + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + @java.lang.Override + public java.util.List getRoutersList() { + return routers_; + } + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + @java.lang.Override + public java.util.List + getRoutersOrBuilderList() { + return routers_; + } + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + @java.lang.Override + public int getRoutersCount() { + return routers_.size(); + } + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router getRouters(int index) { + return routers_.get(index); + } + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterOrBuilder getRoutersOrBuilder(int index) { + return routers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < routers_.size(); i++) { + output.writeMessage(1, routers_.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 < routers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, routers_.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.edgenetwork.v1.ListRoutersResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListRoutersResponse other = + (com.google.cloud.edgenetwork.v1.ListRoutersResponse) obj; + + if (!getRoutersList().equals(other.getRoutersList())) 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 (getRoutersCount() > 0) { + hash = (37 * hash) + ROUTERS_FIELD_NUMBER; + hash = (53 * hash) + getRoutersList().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.edgenetwork.v1.ListRoutersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse 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; + } + /** + * + * + *
+   * Message for response to listing Routers
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListRoutersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListRoutersResponse) + com.google.cloud.edgenetwork.v1.ListRoutersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListRoutersResponse.class, + com.google.cloud.edgenetwork.v1.ListRoutersResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListRoutersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (routersBuilder_ == null) { + routers_ = java.util.Collections.emptyList(); + } else { + routers_ = null; + routersBuilder_.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListRoutersResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListRoutersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListRoutersResponse build() { + com.google.cloud.edgenetwork.v1.ListRoutersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListRoutersResponse buildPartial() { + com.google.cloud.edgenetwork.v1.ListRoutersResponse result = + new com.google.cloud.edgenetwork.v1.ListRoutersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.ListRoutersResponse result) { + if (routersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + routers_ = java.util.Collections.unmodifiableList(routers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.routers_ = routers_; + } else { + result.routers_ = routersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListRoutersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListRoutersResponse other) { + if (other == com.google.cloud.edgenetwork.v1.ListRoutersResponse.getDefaultInstance()) + return this; + if (routersBuilder_ == null) { + if (!other.routers_.isEmpty()) { + if (routers_.isEmpty()) { + routers_ = other.routers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRoutersIsMutable(); + routers_.addAll(other.routers_); + } + onChanged(); + } + } else { + if (!other.routers_.isEmpty()) { + if (routersBuilder_.isEmpty()) { + routersBuilder_.dispose(); + routersBuilder_ = null; + routers_ = other.routers_; + bitField0_ = (bitField0_ & ~0x00000001); + routersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRoutersFieldBuilder() + : null; + } else { + routersBuilder_.addAllMessages(other.routers_); + } + } + } + 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.edgenetwork.v1.Router m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Router.parser(), extensionRegistry); + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + routers_.add(m); + } else { + routersBuilder_.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 routers_ = + java.util.Collections.emptyList(); + + private void ensureRoutersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + routers_ = new java.util.ArrayList(routers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder> + routersBuilder_; + + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public java.util.List getRoutersList() { + if (routersBuilder_ == null) { + return java.util.Collections.unmodifiableList(routers_); + } else { + return routersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public int getRoutersCount() { + if (routersBuilder_ == null) { + return routers_.size(); + } else { + return routersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public com.google.cloud.edgenetwork.v1.Router getRouters(int index) { + if (routersBuilder_ == null) { + return routers_.get(index); + } else { + return routersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder setRouters(int index, com.google.cloud.edgenetwork.v1.Router value) { + if (routersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutersIsMutable(); + routers_.set(index, value); + onChanged(); + } else { + routersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder setRouters( + int index, com.google.cloud.edgenetwork.v1.Router.Builder builderForValue) { + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + routers_.set(index, builderForValue.build()); + onChanged(); + } else { + routersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder addRouters(com.google.cloud.edgenetwork.v1.Router value) { + if (routersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutersIsMutable(); + routers_.add(value); + onChanged(); + } else { + routersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder addRouters(int index, com.google.cloud.edgenetwork.v1.Router value) { + if (routersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutersIsMutable(); + routers_.add(index, value); + onChanged(); + } else { + routersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder addRouters(com.google.cloud.edgenetwork.v1.Router.Builder builderForValue) { + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + routers_.add(builderForValue.build()); + onChanged(); + } else { + routersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder addRouters( + int index, com.google.cloud.edgenetwork.v1.Router.Builder builderForValue) { + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + routers_.add(index, builderForValue.build()); + onChanged(); + } else { + routersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder addAllRouters( + java.lang.Iterable values) { + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routers_); + onChanged(); + } else { + routersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder clearRouters() { + if (routersBuilder_ == null) { + routers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + routersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public Builder removeRouters(int index) { + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + routers_.remove(index); + onChanged(); + } else { + routersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public com.google.cloud.edgenetwork.v1.Router.Builder getRoutersBuilder(int index) { + return getRoutersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public com.google.cloud.edgenetwork.v1.RouterOrBuilder getRoutersOrBuilder(int index) { + if (routersBuilder_ == null) { + return routers_.get(index); + } else { + return routersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public java.util.List + getRoutersOrBuilderList() { + if (routersBuilder_ != null) { + return routersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routers_); + } + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public com.google.cloud.edgenetwork.v1.Router.Builder addRoutersBuilder() { + return getRoutersFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Router.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public com.google.cloud.edgenetwork.v1.Router.Builder addRoutersBuilder(int index) { + return getRoutersFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Router.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Router
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + public java.util.List getRoutersBuilderList() { + return getRoutersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder> + getRoutersFieldBuilder() { + if (routersBuilder_ == null) { + routersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder>( + routers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + routers_ = null; + } + return routersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.edgenetwork.v1.ListRoutersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListRoutersResponse) + private static final com.google.cloud.edgenetwork.v1.ListRoutersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListRoutersResponse(); + } + + public static com.google.cloud.edgenetwork.v1.ListRoutersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRoutersResponse 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.edgenetwork.v1.ListRoutersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponseOrBuilder.java new file mode 100644 index 000000000000..eb9d79766d14 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListRoutersResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListRoutersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListRoutersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + java.util.List getRoutersList(); + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + com.google.cloud.edgenetwork.v1.Router getRouters(int index); + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + int getRoutersCount(); + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + java.util.List + getRoutersOrBuilderList(); + /** + * + * + *
+   * The list of Router
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router routers = 1; + */ + com.google.cloud.edgenetwork.v1.RouterOrBuilder getRoutersOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequest.java new file mode 100644 index 000000000000..d3067cf38b1a --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequest.java @@ -0,0 +1,1281 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting list of Subnets
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListSubnetsRequest} + */ +public final class ListSubnetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListSubnetsRequest) + ListSubnetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSubnetsRequest.newBuilder() to construct. + private ListSubnetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSubnetsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSubnetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListSubnetsRequest.class, + com.google.cloud.edgenetwork.v1.ListSubnetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListSubnetsRequest
+   * 
+ * + * + * 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. Parent value for ListSubnetsRequest
+   * 
+ * + * + * 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; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Filtering 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; + } + } + /** + * + * + *
+   * Filtering 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_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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.edgenetwork.v1.ListSubnetsRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListSubnetsRequest other = + (com.google.cloud.edgenetwork.v1.ListSubnetsRequest) 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.edgenetwork.v1.ListSubnetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Subnets
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListSubnetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListSubnetsRequest) + com.google.cloud.edgenetwork.v1.ListSubnetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListSubnetsRequest.class, + com.google.cloud.edgenetwork.v1.ListSubnetsRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListSubnetsRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListSubnetsRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListSubnetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListSubnetsRequest build() { + com.google.cloud.edgenetwork.v1.ListSubnetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListSubnetsRequest buildPartial() { + com.google.cloud.edgenetwork.v1.ListSubnetsRequest result = + new com.google.cloud.edgenetwork.v1.ListSubnetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListSubnetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListSubnetsRequest other) { + if (other == com.google.cloud.edgenetwork.v1.ListSubnetsRequest.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. Parent value for ListSubnetsRequest
+     * 
+ * + * + * 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. Parent value for ListSubnetsRequest
+     * 
+ * + * + * 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. Parent value for ListSubnetsRequest
+     * 
+ * + * + * 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. Parent value for ListSubnetsRequest
+     * 
+ * + * + * 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. Parent value for ListSubnetsRequest
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering 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_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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.edgenetwork.v1.ListSubnetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListSubnetsRequest) + private static final com.google.cloud.edgenetwork.v1.ListSubnetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListSubnetsRequest(); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubnetsRequest 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.edgenetwork.v1.ListSubnetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequestOrBuilder.java new file mode 100644 index 000000000000..eae3df29c033 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListSubnetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListSubnetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListSubnetsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListSubnetsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponse.java new file mode 100644 index 000000000000..75d51d2cadbe --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponse.java @@ -0,0 +1,1393 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for response to listing Subnets
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListSubnetsResponse} + */ +public final class ListSubnetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListSubnetsResponse) + ListSubnetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSubnetsResponse.newBuilder() to construct. + private ListSubnetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSubnetsResponse() { + subnets_ = 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 ListSubnetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListSubnetsResponse.class, + com.google.cloud.edgenetwork.v1.ListSubnetsResponse.Builder.class); + } + + public static final int SUBNETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List subnets_; + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + @java.lang.Override + public java.util.List getSubnetsList() { + return subnets_; + } + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + @java.lang.Override + public java.util.List + getSubnetsOrBuilderList() { + return subnets_; + } + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + @java.lang.Override + public int getSubnetsCount() { + return subnets_.size(); + } + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Subnet getSubnets(int index) { + return subnets_.get(index); + } + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetsOrBuilder(int index) { + return subnets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < subnets_.size(); i++) { + output.writeMessage(1, subnets_.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 < subnets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subnets_.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.edgenetwork.v1.ListSubnetsResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListSubnetsResponse other = + (com.google.cloud.edgenetwork.v1.ListSubnetsResponse) obj; + + if (!getSubnetsList().equals(other.getSubnetsList())) 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 (getSubnetsCount() > 0) { + hash = (37 * hash) + SUBNETS_FIELD_NUMBER; + hash = (53 * hash) + getSubnetsList().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.edgenetwork.v1.ListSubnetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Subnets
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListSubnetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListSubnetsResponse) + com.google.cloud.edgenetwork.v1.ListSubnetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListSubnetsResponse.class, + com.google.cloud.edgenetwork.v1.ListSubnetsResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListSubnetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subnetsBuilder_ == null) { + subnets_ = java.util.Collections.emptyList(); + } else { + subnets_ = null; + subnetsBuilder_.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListSubnetsResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListSubnetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListSubnetsResponse build() { + com.google.cloud.edgenetwork.v1.ListSubnetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListSubnetsResponse buildPartial() { + com.google.cloud.edgenetwork.v1.ListSubnetsResponse result = + new com.google.cloud.edgenetwork.v1.ListSubnetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.ListSubnetsResponse result) { + if (subnetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subnets_ = java.util.Collections.unmodifiableList(subnets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subnets_ = subnets_; + } else { + result.subnets_ = subnetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListSubnetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListSubnetsResponse other) { + if (other == com.google.cloud.edgenetwork.v1.ListSubnetsResponse.getDefaultInstance()) + return this; + if (subnetsBuilder_ == null) { + if (!other.subnets_.isEmpty()) { + if (subnets_.isEmpty()) { + subnets_ = other.subnets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubnetsIsMutable(); + subnets_.addAll(other.subnets_); + } + onChanged(); + } + } else { + if (!other.subnets_.isEmpty()) { + if (subnetsBuilder_.isEmpty()) { + subnetsBuilder_.dispose(); + subnetsBuilder_ = null; + subnets_ = other.subnets_; + bitField0_ = (bitField0_ & ~0x00000001); + subnetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubnetsFieldBuilder() + : null; + } else { + subnetsBuilder_.addAllMessages(other.subnets_); + } + } + } + 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.edgenetwork.v1.Subnet m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Subnet.parser(), extensionRegistry); + if (subnetsBuilder_ == null) { + ensureSubnetsIsMutable(); + subnets_.add(m); + } else { + subnetsBuilder_.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 subnets_ = + java.util.Collections.emptyList(); + + private void ensureSubnetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subnets_ = new java.util.ArrayList(subnets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder> + subnetsBuilder_; + + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public java.util.List getSubnetsList() { + if (subnetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subnets_); + } else { + return subnetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public int getSubnetsCount() { + if (subnetsBuilder_ == null) { + return subnets_.size(); + } else { + return subnetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public com.google.cloud.edgenetwork.v1.Subnet getSubnets(int index) { + if (subnetsBuilder_ == null) { + return subnets_.get(index); + } else { + return subnetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder setSubnets(int index, com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetsIsMutable(); + subnets_.set(index, value); + onChanged(); + } else { + subnetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder setSubnets( + int index, com.google.cloud.edgenetwork.v1.Subnet.Builder builderForValue) { + if (subnetsBuilder_ == null) { + ensureSubnetsIsMutable(); + subnets_.set(index, builderForValue.build()); + onChanged(); + } else { + subnetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder addSubnets(com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetsIsMutable(); + subnets_.add(value); + onChanged(); + } else { + subnetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder addSubnets(int index, com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubnetsIsMutable(); + subnets_.add(index, value); + onChanged(); + } else { + subnetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder addSubnets(com.google.cloud.edgenetwork.v1.Subnet.Builder builderForValue) { + if (subnetsBuilder_ == null) { + ensureSubnetsIsMutable(); + subnets_.add(builderForValue.build()); + onChanged(); + } else { + subnetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder addSubnets( + int index, com.google.cloud.edgenetwork.v1.Subnet.Builder builderForValue) { + if (subnetsBuilder_ == null) { + ensureSubnetsIsMutable(); + subnets_.add(index, builderForValue.build()); + onChanged(); + } else { + subnetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder addAllSubnets( + java.lang.Iterable values) { + if (subnetsBuilder_ == null) { + ensureSubnetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subnets_); + onChanged(); + } else { + subnetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder clearSubnets() { + if (subnetsBuilder_ == null) { + subnets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subnetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public Builder removeSubnets(int index) { + if (subnetsBuilder_ == null) { + ensureSubnetsIsMutable(); + subnets_.remove(index); + onChanged(); + } else { + subnetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public com.google.cloud.edgenetwork.v1.Subnet.Builder getSubnetsBuilder(int index) { + return getSubnetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetsOrBuilder(int index) { + if (subnetsBuilder_ == null) { + return subnets_.get(index); + } else { + return subnetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public java.util.List + getSubnetsOrBuilderList() { + if (subnetsBuilder_ != null) { + return subnetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subnets_); + } + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public com.google.cloud.edgenetwork.v1.Subnet.Builder addSubnetsBuilder() { + return getSubnetsFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public com.google.cloud.edgenetwork.v1.Subnet.Builder addSubnetsBuilder(int index) { + return getSubnetsFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Subnet
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + public java.util.List getSubnetsBuilderList() { + return getSubnetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder> + getSubnetsFieldBuilder() { + if (subnetsBuilder_ == null) { + subnetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder>( + subnets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + subnets_ = null; + } + return subnetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.edgenetwork.v1.ListSubnetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListSubnetsResponse) + private static final com.google.cloud.edgenetwork.v1.ListSubnetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListSubnetsResponse(); + } + + public static com.google.cloud.edgenetwork.v1.ListSubnetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubnetsResponse 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.edgenetwork.v1.ListSubnetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponseOrBuilder.java new file mode 100644 index 000000000000..bd0f9d757e99 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListSubnetsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListSubnetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListSubnetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + java.util.List getSubnetsList(); + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + com.google.cloud.edgenetwork.v1.Subnet getSubnets(int index); + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + int getSubnetsCount(); + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + java.util.List + getSubnetsOrBuilderList(); + /** + * + * + *
+   * The list of Subnet
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Subnet subnets = 1; + */ + com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequest.java new file mode 100644 index 000000000000..779ada4050b3 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequest.java @@ -0,0 +1,1281 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for requesting list of Zones
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListZonesRequest} + */ +public final class ListZonesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListZonesRequest) + ListZonesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListZonesRequest.newBuilder() to construct. + private ListZonesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListZonesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListZonesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListZonesRequest.class, + com.google.cloud.edgenetwork.v1.ListZonesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListZonesRequest
+   * 
+ * + * + * 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. Parent value for ListZonesRequest
+   * 
+ * + * + * 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; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Filtering 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; + } + } + /** + * + * + *
+   * Filtering 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_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * 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.edgenetwork.v1.ListZonesRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListZonesRequest other = + (com.google.cloud.edgenetwork.v1.ListZonesRequest) 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.edgenetwork.v1.ListZonesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest 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.edgenetwork.v1.ListZonesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest 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.edgenetwork.v1.ListZonesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest 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.edgenetwork.v1.ListZonesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest 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.edgenetwork.v1.ListZonesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest 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.edgenetwork.v1.ListZonesRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Zones
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListZonesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListZonesRequest) + com.google.cloud.edgenetwork.v1.ListZonesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListZonesRequest.class, + com.google.cloud.edgenetwork.v1.ListZonesRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListZonesRequest.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListZonesRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListZonesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListZonesRequest build() { + com.google.cloud.edgenetwork.v1.ListZonesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListZonesRequest buildPartial() { + com.google.cloud.edgenetwork.v1.ListZonesRequest result = + new com.google.cloud.edgenetwork.v1.ListZonesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListZonesRequest 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.edgenetwork.v1.ListZonesRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListZonesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListZonesRequest other) { + if (other == com.google.cloud.edgenetwork.v1.ListZonesRequest.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. Parent value for ListZonesRequest
+     * 
+ * + * + * 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. Parent value for ListZonesRequest
+     * 
+ * + * + * 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. Parent value for ListZonesRequest
+     * 
+ * + * + * 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. Parent value for ListZonesRequest
+     * 
+ * + * + * 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. Parent value for ListZonesRequest
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + } + /** + * + * + *
+     * Filtering 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; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering 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_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * 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.edgenetwork.v1.ListZonesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListZonesRequest) + private static final com.google.cloud.edgenetwork.v1.ListZonesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListZonesRequest(); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListZonesRequest 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.edgenetwork.v1.ListZonesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequestOrBuilder.java new file mode 100644 index 000000000000..3284febfaefc --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListZonesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListZonesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListZonesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListZonesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponse.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponse.java new file mode 100644 index 000000000000..ae3f78ffe00e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponse.java @@ -0,0 +1,1393 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for response to listing Zones
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListZonesResponse} + */ +public final class ListZonesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.ListZonesResponse) + ListZonesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListZonesResponse.newBuilder() to construct. + private ListZonesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListZonesResponse() { + zones_ = 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 ListZonesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListZonesResponse.class, + com.google.cloud.edgenetwork.v1.ListZonesResponse.Builder.class); + } + + public static final int ZONES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List zones_; + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + @java.lang.Override + public java.util.List getZonesList() { + return zones_; + } + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + @java.lang.Override + public java.util.List + getZonesOrBuilderList() { + return zones_; + } + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + @java.lang.Override + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Zone getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ZoneOrBuilder getZonesOrBuilder(int index) { + return zones_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 < zones_.size(); i++) { + output.writeMessage(1, zones_.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 < zones_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, zones_.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.edgenetwork.v1.ListZonesResponse)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.ListZonesResponse other = + (com.google.cloud.edgenetwork.v1.ListZonesResponse) obj; + + if (!getZonesList().equals(other.getZonesList())) 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 (getZonesCount() > 0) { + hash = (37 * hash) + ZONES_FIELD_NUMBER; + hash = (53 * hash) + getZonesList().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.edgenetwork.v1.ListZonesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse 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.edgenetwork.v1.ListZonesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse 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.edgenetwork.v1.ListZonesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse 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.edgenetwork.v1.ListZonesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse 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.edgenetwork.v1.ListZonesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse 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.edgenetwork.v1.ListZonesResponse 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; + } + /** + * + * + *
+   * Message for response to listing Zones
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.ListZonesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.ListZonesResponse) + com.google.cloud.edgenetwork.v1.ListZonesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.ListZonesResponse.class, + com.google.cloud.edgenetwork.v1.ListZonesResponse.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.ListZonesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (zonesBuilder_ == null) { + zones_ = java.util.Collections.emptyList(); + } else { + zones_ = null; + zonesBuilder_.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.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListZonesResponse getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.ListZonesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListZonesResponse build() { + com.google.cloud.edgenetwork.v1.ListZonesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ListZonesResponse buildPartial() { + com.google.cloud.edgenetwork.v1.ListZonesResponse result = + new com.google.cloud.edgenetwork.v1.ListZonesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.edgenetwork.v1.ListZonesResponse result) { + if (zonesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + zones_ = java.util.Collections.unmodifiableList(zones_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.zones_ = zones_; + } else { + result.zones_ = zonesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.ListZonesResponse 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.edgenetwork.v1.ListZonesResponse) { + return mergeFrom((com.google.cloud.edgenetwork.v1.ListZonesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.ListZonesResponse other) { + if (other == com.google.cloud.edgenetwork.v1.ListZonesResponse.getDefaultInstance()) + return this; + if (zonesBuilder_ == null) { + if (!other.zones_.isEmpty()) { + if (zones_.isEmpty()) { + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureZonesIsMutable(); + zones_.addAll(other.zones_); + } + onChanged(); + } + } else { + if (!other.zones_.isEmpty()) { + if (zonesBuilder_.isEmpty()) { + zonesBuilder_.dispose(); + zonesBuilder_ = null; + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000001); + zonesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getZonesFieldBuilder() + : null; + } else { + zonesBuilder_.addAllMessages(other.zones_); + } + } + } + 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.edgenetwork.v1.Zone m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Zone.parser(), extensionRegistry); + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(m); + } else { + zonesBuilder_.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 zones_ = + java.util.Collections.emptyList(); + + private void ensureZonesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + zones_ = new java.util.ArrayList(zones_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Zone, + com.google.cloud.edgenetwork.v1.Zone.Builder, + com.google.cloud.edgenetwork.v1.ZoneOrBuilder> + zonesBuilder_; + + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public java.util.List getZonesList() { + if (zonesBuilder_ == null) { + return java.util.Collections.unmodifiableList(zones_); + } else { + return zonesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public int getZonesCount() { + if (zonesBuilder_ == null) { + return zones_.size(); + } else { + return zonesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public com.google.cloud.edgenetwork.v1.Zone getZones(int index) { + if (zonesBuilder_ == null) { + return zones_.get(index); + } else { + return zonesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder setZones(int index, com.google.cloud.edgenetwork.v1.Zone value) { + if (zonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.set(index, value); + onChanged(); + } else { + zonesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder setZones( + int index, com.google.cloud.edgenetwork.v1.Zone.Builder builderForValue) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.set(index, builderForValue.build()); + onChanged(); + } else { + zonesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder addZones(com.google.cloud.edgenetwork.v1.Zone value) { + if (zonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + } else { + zonesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder addZones(int index, com.google.cloud.edgenetwork.v1.Zone value) { + if (zonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(index, value); + onChanged(); + } else { + zonesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder addZones(com.google.cloud.edgenetwork.v1.Zone.Builder builderForValue) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(builderForValue.build()); + onChanged(); + } else { + zonesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder addZones( + int index, com.google.cloud.edgenetwork.v1.Zone.Builder builderForValue) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(index, builderForValue.build()); + onChanged(); + } else { + zonesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder addAllZones( + java.lang.Iterable values) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); + onChanged(); + } else { + zonesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder clearZones() { + if (zonesBuilder_ == null) { + zones_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + zonesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public Builder removeZones(int index) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.remove(index); + onChanged(); + } else { + zonesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public com.google.cloud.edgenetwork.v1.Zone.Builder getZonesBuilder(int index) { + return getZonesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public com.google.cloud.edgenetwork.v1.ZoneOrBuilder getZonesOrBuilder(int index) { + if (zonesBuilder_ == null) { + return zones_.get(index); + } else { + return zonesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public java.util.List + getZonesOrBuilderList() { + if (zonesBuilder_ != null) { + return zonesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(zones_); + } + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public com.google.cloud.edgenetwork.v1.Zone.Builder addZonesBuilder() { + return getZonesFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Zone.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public com.google.cloud.edgenetwork.v1.Zone.Builder addZonesBuilder(int index) { + return getZonesFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Zone.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Zone
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + public java.util.List getZonesBuilderList() { + return getZonesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Zone, + com.google.cloud.edgenetwork.v1.Zone.Builder, + com.google.cloud.edgenetwork.v1.ZoneOrBuilder> + getZonesFieldBuilder() { + if (zonesBuilder_ == null) { + zonesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Zone, + com.google.cloud.edgenetwork.v1.Zone.Builder, + com.google.cloud.edgenetwork.v1.ZoneOrBuilder>( + zones_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + zones_ = null; + } + return zonesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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.edgenetwork.v1.ListZonesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.ListZonesResponse) + private static final com.google.cloud.edgenetwork.v1.ListZonesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.ListZonesResponse(); + } + + public static com.google.cloud.edgenetwork.v1.ListZonesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListZonesResponse 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.edgenetwork.v1.ListZonesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponseOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponseOrBuilder.java new file mode 100644 index 000000000000..ae3a9d54ce63 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ListZonesResponseOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ListZonesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.ListZonesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + java.util.List getZonesList(); + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + com.google.cloud.edgenetwork.v1.Zone getZones(int index); + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + int getZonesCount(); + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + java.util.List getZonesOrBuilderList(); + /** + * + * + *
+   * The list of Zone
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Zone zones = 1; + */ + com.google.cloud.edgenetwork.v1.ZoneOrBuilder getZonesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LocationName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LocationName.java new file mode 100644 index 000000000000..20666ce9d639 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * 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.edgenetwork.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 LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + 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 (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.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 (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Network.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Network.java new file mode 100644 index 000000000000..62767f874f0c --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Network.java @@ -0,0 +1,1806 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message describing Network object
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Network} + */ +public final class Network extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Network) + NetworkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Network.newBuilder() to construct. + private Network(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Network() { + name_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Network(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Network_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Network.class, + com.google.cloud.edgenetwork.v1.Network.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The canonical resource name of the network.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the network.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Network_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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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; + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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 MTU_FIELD_NUMBER = 6; + private int mtu_ = 0; + /** + * + * + *
+   * IP (L3) MTU value of the network.
+   * Valid values are: 1500 and 9000.
+   * Default to 1500 if not set.
+   * 
+ * + * int32 mtu = 6; + * + * @return The mtu. + */ + @java.lang.Override + public int getMtu() { + return mtu_; + } + + 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 (mtu_ != 0) { + output.writeInt32(6, mtu_); + } + 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 (mtu_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, mtu_); + } + 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.edgenetwork.v1.Network)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Network other = (com.google.cloud.edgenetwork.v1.Network) 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 (getMtu() != other.getMtu()) 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) + MTU_FIELD_NUMBER; + hash = (53 * hash) + getMtu(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Network parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Network 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.edgenetwork.v1.Network parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Network 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.edgenetwork.v1.Network parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Network parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Network parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Network 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.edgenetwork.v1.Network parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Network 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.edgenetwork.v1.Network parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Network 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.edgenetwork.v1.Network 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; + } + /** + * + * + *
+   * Message describing Network object
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Network} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Network) + com.google.cloud.edgenetwork.v1.NetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Network_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Network_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Network.class, + com.google.cloud.edgenetwork.v1.Network.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Network.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_ = ""; + mtu_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Network_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Network getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Network.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Network build() { + com.google.cloud.edgenetwork.v1.Network result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Network buildPartial() { + com.google.cloud.edgenetwork.v1.Network result = + new com.google.cloud.edgenetwork.v1.Network(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Network 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.mtu_ = mtu_; + } + } + + @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.edgenetwork.v1.Network) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Network) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Network other) { + if (other == com.google.cloud.edgenetwork.v1.Network.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.getMtu() != 0) { + setMtu(other.getMtu()); + } + 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 48: + { + mtu_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 canonical resource name of the network.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the network.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the network.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the network.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical resource name of the network.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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 when the network 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Optional. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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 int mtu_; + /** + * + * + *
+     * IP (L3) MTU value of the network.
+     * Valid values are: 1500 and 9000.
+     * Default to 1500 if not set.
+     * 
+ * + * int32 mtu = 6; + * + * @return The mtu. + */ + @java.lang.Override + public int getMtu() { + return mtu_; + } + /** + * + * + *
+     * IP (L3) MTU value of the network.
+     * Valid values are: 1500 and 9000.
+     * Default to 1500 if not set.
+     * 
+ * + * int32 mtu = 6; + * + * @param value The mtu to set. + * @return This builder for chaining. + */ + public Builder setMtu(int value) { + + mtu_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * IP (L3) MTU value of the network.
+     * Valid values are: 1500 and 9000.
+     * Default to 1500 if not set.
+     * 
+ * + * int32 mtu = 6; + * + * @return This builder for chaining. + */ + public Builder clearMtu() { + bitField0_ = (bitField0_ & ~0x00000020); + mtu_ = 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.edgenetwork.v1.Network) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Network) + private static final com.google.cloud.edgenetwork.v1.Network DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Network(); + } + + public static com.google.cloud.edgenetwork.v1.Network getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Network 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.edgenetwork.v1.Network getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkName.java new file mode 100644 index 000000000000..f9aa4bf15478 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkName.java @@ -0,0 +1,257 @@ +/* + * 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.edgenetwork.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 NetworkName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE_NETWORK = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/zones/{zone}/networks/{network}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + private final String network; + + @Deprecated + protected NetworkName() { + project = null; + location = null; + zone = null; + network = null; + } + + private NetworkName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + network = Preconditions.checkNotNull(builder.getNetwork()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getNetwork() { + return network; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NetworkName of(String project, String location, String zone, String network) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setNetwork(network) + .build(); + } + + public static String format(String project, String location, String zone, String network) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setNetwork(network) + .build() + .toString(); + } + + public static NetworkName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE_NETWORK.validatedMatch( + formattedString, "NetworkName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("zone"), + matchMap.get("network")); + } + + 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 (NetworkName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE_NETWORK.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (zone != null) { + fieldMapBuilder.put("zone", zone); + } + if (network != null) { + fieldMapBuilder.put("network", network); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE_NETWORK.instantiate( + "project", project, "location", location, "zone", zone, "network", network); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + NetworkName that = ((NetworkName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone) + && Objects.equals(this.network, that.network); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(zone); + h *= 1000003; + h ^= Objects.hashCode(network); + return h; + } + + /** Builder for projects/{project}/locations/{location}/zones/{zone}/networks/{network}. */ + public static class Builder { + private String project; + private String location; + private String zone; + private String network; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getNetwork() { + return network; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public Builder setNetwork(String network) { + this.network = network; + return this; + } + + private Builder(NetworkName networkName) { + this.project = networkName.project; + this.location = networkName.location; + this.zone = networkName.zone; + this.network = networkName.network; + } + + public NetworkName build() { + return new NetworkName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkOrBuilder.java new file mode 100644 index 000000000000..cac722e96efd --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/NetworkOrBuilder.java @@ -0,0 +1,226 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface NetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Network) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The canonical resource name of the network.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The canonical resource name of the network.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time when the network 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 when the network 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 when the network was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the network 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 when the network 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 when the network was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * IP (L3) MTU value of the network.
+   * Valid values are: 1500 and 9000.
+   * Default to 1500 if not set.
+   * 
+ * + * int32 mtu = 6; + * + * @return The mtu. + */ + int getMtu(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadata.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadata.java new file mode 100644 index 000000000000..280b1fa1b363 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadata.java @@ -0,0 +1,1828 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.OperationMetadata.class, + com.google.cloud.edgenetwork.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + * + * + *
+   * 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`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = 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 (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + 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.edgenetwork.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.OperationMetadata other = + (com.google.cloud.edgenetwork.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata 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.edgenetwork.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata 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.edgenetwork.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata 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.edgenetwork.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata 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.edgenetwork.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata 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.edgenetwork.v1.OperationMetadata 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; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.OperationMetadata) + com.google.cloud.edgenetwork.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.OperationMetadata.class, + com.google.cloud.edgenetwork.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.OperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.OperationMetadata build() { + com.google.cloud.edgenetwork.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.OperationMetadata buildPartial() { + com.google.cloud.edgenetwork.v1.OperationMetadata result = + new com.google.cloud.edgenetwork.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + @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.edgenetwork.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.edgenetwork.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.OperationMetadata other) { + if (other == com.google.cloud.edgenetwork.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + 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: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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.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 operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_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> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * 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`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * 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`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * 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`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + 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.edgenetwork.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.OperationMetadata) + private static final com.google.cloud.edgenetwork.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.OperationMetadata(); + } + + public static com.google.cloud.edgenetwork.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata 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.edgenetwork.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadataOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..0e260baf3588 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,218 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + 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`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourceState.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourceState.java new file mode 100644 index 000000000000..51a4b870f0ce --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourceState.java @@ -0,0 +1,246 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * ResourceState describes the state the resource.
+ * A normal lifecycle of a new resource being created would be: PENDING ->
+ * PROVISIONING -> RUNNING. A normal lifecycle of an existing resource being
+ * deleted would be: RUNNING -> DELETING. Any failures during processing will
+ * result the resource to be in a SUSPENDED state.
+ * 
+ * + * Protobuf enum {@code google.cloud.edgenetwork.v1.ResourceState} + */ +public enum ResourceState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified state.
+   * 
+ * + * STATE_UNKNOWN = 0; + */ + STATE_UNKNOWN(0), + /** + * + * + *
+   * The resource is being prepared to be applied to the rack.
+   * 
+ * + * STATE_PENDING = 1; + */ + STATE_PENDING(1), + /** + * + * + *
+   * The resource has started being applied to the rack.
+   * 
+ * + * STATE_PROVISIONING = 2; + */ + STATE_PROVISIONING(2), + /** + * + * + *
+   * The resource has been pushed to the rack.
+   * 
+ * + * STATE_RUNNING = 3; + */ + STATE_RUNNING(3), + /** + * + * + *
+   * The resource failed to push to the rack.
+   * 
+ * + * STATE_SUSPENDED = 4; + */ + STATE_SUSPENDED(4), + /** + * + * + *
+   * The resource is under deletion.
+   * 
+ * + * STATE_DELETING = 5; + */ + STATE_DELETING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified state.
+   * 
+ * + * STATE_UNKNOWN = 0; + */ + public static final int STATE_UNKNOWN_VALUE = 0; + /** + * + * + *
+   * The resource is being prepared to be applied to the rack.
+   * 
+ * + * STATE_PENDING = 1; + */ + public static final int STATE_PENDING_VALUE = 1; + /** + * + * + *
+   * The resource has started being applied to the rack.
+   * 
+ * + * STATE_PROVISIONING = 2; + */ + public static final int STATE_PROVISIONING_VALUE = 2; + /** + * + * + *
+   * The resource has been pushed to the rack.
+   * 
+ * + * STATE_RUNNING = 3; + */ + public static final int STATE_RUNNING_VALUE = 3; + /** + * + * + *
+   * The resource failed to push to the rack.
+   * 
+ * + * STATE_SUSPENDED = 4; + */ + public static final int STATE_SUSPENDED_VALUE = 4; + /** + * + * + *
+   * The resource is under deletion.
+   * 
+ * + * STATE_DELETING = 5; + */ + public static final int STATE_DELETING_VALUE = 5; + + 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 ResourceState 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 ResourceState forNumber(int value) { + switch (value) { + case 0: + return STATE_UNKNOWN; + case 1: + return STATE_PENDING; + case 2: + return STATE_PROVISIONING; + case 3: + return STATE_RUNNING; + case 4: + return STATE_SUSPENDED; + case 5: + return STATE_DELETING; + 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 ResourceState findValueByNumber(int number) { + return ResourceState.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.edgenetwork.v1.ResourcesProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ResourceState[] VALUES = values(); + + public static ResourceState 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 ResourceState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.edgenetwork.v1.ResourceState) +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourcesProto.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourcesProto.java new file mode 100644 index 000000000000..0896e5975360 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ResourcesProto.java @@ -0,0 +1,601 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public final class ResourcesProto { + private ResourcesProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Zone_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Zone_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Zone_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Zone_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Network_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Network_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Network_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Network_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Subnet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Subnet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Subnet_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Subnet_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Interconnect_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Interconnect_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Interconnect_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Interconnect_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Router_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Router_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Router_Interface_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Router_Interface_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Router_Bgp_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Router_Bgp_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_Router_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_Router_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_SubnetStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_SubnetStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_RouterStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/edgenetwork/v1/resources." + + "proto\022\033google.cloud.edgenetwork.v1\032\037goog" + + "le/api/field_behavior.proto\032\031google/api/" + + "resource.proto\032\037google/protobuf/timestam" + + "p.proto\"\347\002\n\004Zone\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\0225\n\013" + + "create_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032.googl" + + "e.protobuf.TimestampB\004\342A\001\003\022=\n\006labels\030\004 \003" + + "(\0132-.google.cloud.edgenetwork.v1.Zone.La" + + "belsEntry\022\023\n\013layout_name\030\005 \001(\t\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:Z\352" + + "AW\n\037edgenetwork.googleapis.com/Zone\0224pro" + + "jects/{project}/locations/{location}/zon" + + "es/{zone}\"\226\003\n\007Network\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\002\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\022@\n\006label" + + "s\030\004 \003(\01320.google.cloud.edgenetwork.v1.Ne" + + "twork.LabelsEntry\022\031\n\013description\030\005 \001(\tB\004" + + "\342A\001\001\022\013\n\003mtu\030\006 \001(\005\032-\n\013LabelsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:p\352Am\n\"edgenetwo" + + "rk.googleapis.com/Network\022Gprojects/{pro" + + "ject}/locations/{location}/zones/{zone}/" + + "networks/{network}\"\300\004\n\006Subnet\022\022\n\004name\030\001 " + + "\001(\tB\004\342A\001\002\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\022" + + "?\n\006labels\030\004 \003(\0132/.google.cloud.edgenetwo" + + "rk.v1.Subnet.LabelsEntry\022\031\n\013description\030" + + "\005 \001(\tB\004\342A\001\001\022<\n\007network\030\006 \001(\tB+\342A\001\002\372A$\n\"e" + + "dgenetwork.googleapis.com/Network\022\021\n\tipv" + + "4_cidr\030\007 \003(\t\022\021\n\tipv6_cidr\030\010 \003(\t\022\025\n\007vlan_" + + "id\030\t \001(\005B\004\342A\001\001\022?\n\005state\030\n \001(\0162*.google.c" + + "loud.edgenetwork.v1.ResourceStateB\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:m\352Aj\n!edgenetwork.googleapis.com/" + + "Subnet\022Eprojects/{project}/locations/{lo" + + "cation}/zones/{zone}/subnets/{subnet}\"\241\005" + + "\n\014Interconnect\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\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\022E\n\006labels\030\004 \003(\013" + + "25.google.cloud.edgenetwork.v1.Interconn" + + "ect.LabelsEntry\022\031\n\013description\030\005 \001(\tB\004\342A" + + "\001\001\022[\n\021interconnect_type\030\006 \001(\0162:.google.c" + + "loud.edgenetwork.v1.Interconnect.Interco" + + "nnectTypeB\004\342A\001\001\022\022\n\004uuid\030\007 \001(\tB\004\342A\001\003\022(\n\032d" + + "evice_cloud_resource_name\030\010 \001(\tB\004\342A\001\003\022\034\n" + + "\016physical_ports\030\t \003(\tB\004\342A\001\003\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"D\n\020In" + + "terconnectType\022!\n\035INTERCONNECT_TYPE_UNSP" + + "ECIFIED\020\000\022\r\n\tDEDICATED\020\001:\177\352A|\n\'edgenetwo" + + "rk.googleapis.com/Interconnect\022Qprojects" + + "/{project}/locations/{location}/zones/{z" + + "one}/interconnects/{interconnect}\"\302\005\n\026In" + + "terconnectAttachment\022\022\n\004name\030\001 \001(\tB\004\342A\001\002" + + "\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.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\022O\n\006labels" + + "\030\004 \003(\0132?.google.cloud.edgenetwork.v1.Int" + + "erconnectAttachment.LabelsEntry\022\031\n\013descr" + + "iption\030\005 \001(\tB\004\342A\001\001\022F\n\014interconnect\030\006 \001(\t" + + "B0\342A\001\002\372A)\n\'edgenetwork.googleapis.com/In" + + "terconnect\022<\n\007network\030\013 \001(\tB+\342A\001\001\372A$\n\"ed" + + "genetwork.googleapis.com/Network\022\025\n\007vlan" + + "_id\030\010 \001(\005B\004\342A\001\002\022\013\n\003mtu\030\t \001(\005\022?\n\005state\030\n " + + "\001(\0162*.google.cloud.edgenetwork.v1.Resour" + + "ceStateB\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:\237\001\352A\233\001\n1edgenetwork" + + ".googleapis.com/InterconnectAttachment\022f" + + "projects/{project}/locations/{location}/" + + "zones/{zone}/interconnectAttachments/{in" + + "terconnect_attachment}\"\370\010\n\006Router\022\022\n\004nam" + + "e\030\001 \001(\tB\004\342A\001\002\0225\n\013create_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\0225\n\013update_t" + + "ime\030\003 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\022?\n\006labels\030\004 \003(\0132/.google.cloud.edgen" + + "etwork.v1.Router.LabelsEntry\022\031\n\013descript" + + "ion\030\005 \001(\tB\004\342A\001\001\022<\n\007network\030\006 \001(\tB+\342A\001\002\372A" + + "$\n\"edgenetwork.googleapis.com/Network\022@\n" + + "\tinterface\030\007 \003(\0132-.google.cloud.edgenetw" + + "ork.v1.Router.Interface\022=\n\010bgp_peer\030\010 \003(" + + "\0132+.google.cloud.edgenetwork.v1.Router.B" + + "gpPeer\0224\n\003bgp\030\t \001(\0132\'.google.cloud.edgen" + + "etwork.v1.Router.Bgp\022?\n\005state\030\n \001(\0162*.go" + + "ogle.cloud.edgenetwork.v1.ResourceStateB" + + "\004\342A\001\003\022\"\n\024route_advertisements\030\013 \003(\tB\004\342A\001" + + "\001\032\232\001\n\tInterface\022\014\n\004name\030\001 \001(\t\022\021\n\tipv4_ci" + + "dr\030\003 \001(\t\022\021\n\tipv6_cidr\030\006 \001(\t\022&\n\036linked_in" + + "terconnect_attachment\030\002 \001(\t\022\022\n\nsubnetwor" + + "k\030\004 \001(\t\022\035\n\025loopback_ip_addresses\030\005 \003(\t\032\277" + + "\001\n\007BgpPeer\022\014\n\004name\030\001 \001(\t\022\021\n\tinterface\030\002 " + + "\001(\t\022\033\n\023interface_ipv4_cidr\030\003 \001(\t\022\033\n\023inte" + + "rface_ipv6_cidr\030\007 \001(\t\022\026\n\016peer_ipv4_cidr\030" + + "\004 \001(\t\022\026\n\016peer_ipv6_cidr\030\006 \001(\t\022\020\n\010peer_as" + + "n\030\005 \001(\r\022\027\n\tlocal_asn\030\010 \001(\rB\004\342A\001\003\0329\n\003Bgp\022" + + "\013\n\003asn\030\001 \001(\r\022%\n\035keepalive_interval_in_se" + + "conds\030\002 \001(\r\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001:m\352Aj\n!edgenetwork.goo" + + "gleapis.com/Router\022Eprojects/{project}/l" + + "ocations/{location}/zones/{zone}/routers" + + "/{router}\";\n\020LinkLayerAddress\022\023\n\013mac_add" + + "ress\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\"~\n\014Subnet" + + "Status\022\014\n\004name\030\001 \001(\t\022\023\n\013mac_address\030\002 \001(" + + "\t\022K\n\024link_layer_addresses\030\003 \003(\0132-.google" + + ".cloud.edgenetwork.v1.LinkLayerAddress\"\361" + + "\010\n\027InterconnectDiagnostics\022\023\n\013mac_addres" + + "s\030\001 \001(\t\022K\n\024link_layer_addresses\030\002 \003(\0132-." + + "google.cloud.edgenetwork.v1.LinkLayerAdd" + + "ress\022N\n\005links\030\003 \003(\0132?.google.cloud.edgen" + + "etwork.v1.InterconnectDiagnostics.LinkSt" + + "atus\032\260\002\n\nLinkStatus\022\022\n\ncircuit_id\030\001 \001(\t\022" + + "X\n\013lacp_status\030\002 \001(\0132C.google.cloud.edge" + + "network.v1.InterconnectDiagnostics.LinkL" + + "ACPStatus\022Z\n\rlldp_statuses\030\003 \003(\0132C.googl" + + "e.cloud.edgenetwork.v1.InterconnectDiagn" + + "ostics.LinkLLDPStatus\022X\n\rpacket_counts\030\004" + + " \001(\0132A.google.cloud.edgenetwork.v1.Inter" + + "connectDiagnostics.PacketCounts\032\247\001\n\014Pack" + + "etCounts\022\027\n\017inbound_unicast\030\001 \001(\003\022\026\n\016inb" + + "ound_errors\030\002 \001(\003\022\030\n\020inbound_discards\030\003 " + + "\001(\003\022\030\n\020outbound_unicast\030\004 \001(\003\022\027\n\017outboun" + + "d_errors\030\005 \001(\003\022\031\n\021outbound_discards\030\006 \001(" + + "\003\032\220\002\n\016LinkLACPStatus\022X\n\005state\030\001 \001(\0162I.go" + + "ogle.cloud.edgenetwork.v1.InterconnectDi" + + "agnostics.LinkLACPStatus.State\022\030\n\020google" + + "_system_id\030\002 \001(\t\022\032\n\022neighbor_system_id\030\003" + + " \001(\t\022\024\n\014aggregatable\030\004 \001(\010\022\022\n\ncollecting" + + "\030\005 \001(\010\022\024\n\014distributing\030\006 \001(\010\".\n\005State\022\013\n" + + "\007UNKNOWN\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010DETACHED\020\002\032\263\001\n" + + "\016LinkLLDPStatus\022\030\n\020peer_system_name\030\001 \001(" + + "\t\022\037\n\027peer_system_description\030\002 \001(\t\022\027\n\017pe" + + "er_chassis_id\030\003 \001(\t\022\034\n\024peer_chassis_id_t" + + "ype\030\004 \001(\t\022\024\n\014peer_port_id\030\005 \001(\t\022\031\n\021peer_" + + "port_id_type\030\006 \001(\t\"\352\004\n\014RouterStatus\0228\n\007n" + + "etwork\030\001 \001(\tB\'\372A$\n\"edgenetwork.googleapi" + + "s.com/Network\022P\n\017bgp_peer_status\030\002 \003(\01327" + + ".google.cloud.edgenetwork.v1.RouterStatu" + + "s.BgpPeerStatus\032\321\002\n\rBgpPeerStatus\022\014\n\004nam" + + "e\030\001 \001(\t\022\022\n\nip_address\030\002 \001(\t\022\027\n\017peer_ip_a" + + "ddress\030\003 \001(\t\022Q\n\006status\030\004 \001(\0162A.google.cl" + + "oud.edgenetwork.v1.RouterStatus.BgpPeerS" + + "tatus.BgpStatus\022\r\n\005state\030\005 \001(\t\022\016\n\006uptime" + + "\030\006 \001(\t\022\026\n\016uptime_seconds\030\007 \001(\003\022O\n\016prefix" + + "_counter\030\010 \001(\01327.google.cloud.edgenetwor" + + "k.v1.RouterStatus.PrefixCounter\"*\n\tBgpSt" + + "atus\022\013\n\007UNKNOWN\020\000\022\006\n\002UP\020\001\022\010\n\004DOWN\020\002\032z\n\rP" + + "refixCounter\022\022\n\nadvertised\030\001 \001(\003\022\016\n\006deni" + + "ed\030\002 \001(\003\022\020\n\010received\030\003 \001(\003\022\014\n\004sent\030\004 \001(\003" + + "\022\022\n\nsuppressed\030\005 \001(\003\022\021\n\twithdrawn\030\006 \001(\003*" + + "\211\001\n\rResourceState\022\021\n\rSTATE_UNKNOWN\020\000\022\021\n\r" + + "STATE_PENDING\020\001\022\026\n\022STATE_PROVISIONING\020\002\022" + + "\021\n\rSTATE_RUNNING\020\003\022\023\n\017STATE_SUSPENDED\020\004\022" + + "\022\n\016STATE_DELETING\020\005B\323\001\n\037com.google.cloud" + + ".edgenetwork.v1B\016ResourcesProtoP\001ZAcloud" + + ".google.com/go/edgenetwork/apiv1/edgenet" + + "workpb;edgenetworkpb\252\002\033Google.Cloud.Edge" + + "Network.V1\312\002\033Google\\Cloud\\EdgeNetwork\\V1" + + "\352\002\036Google::Cloud::EdgeNetwork::V1b\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_edgenetwork_v1_Zone_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_Zone_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Zone_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "Labels", "LayoutName", + }); + internal_static_google_cloud_edgenetwork_v1_Zone_LabelsEntry_descriptor = + internal_static_google_cloud_edgenetwork_v1_Zone_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_Zone_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Zone_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_edgenetwork_v1_Network_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_edgenetwork_v1_Network_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Network_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "Labels", "Description", "Mtu", + }); + internal_static_google_cloud_edgenetwork_v1_Network_LabelsEntry_descriptor = + internal_static_google_cloud_edgenetwork_v1_Network_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_Network_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Network_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_edgenetwork_v1_Subnet_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_edgenetwork_v1_Subnet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Subnet_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "Network", + "Ipv4Cidr", + "Ipv6Cidr", + "VlanId", + "State", + }); + internal_static_google_cloud_edgenetwork_v1_Subnet_LabelsEntry_descriptor = + internal_static_google_cloud_edgenetwork_v1_Subnet_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_Subnet_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Subnet_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_edgenetwork_v1_Interconnect_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_edgenetwork_v1_Interconnect_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Interconnect_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "InterconnectType", + "Uuid", + "DeviceCloudResourceName", + "PhysicalPorts", + }); + internal_static_google_cloud_edgenetwork_v1_Interconnect_LabelsEntry_descriptor = + internal_static_google_cloud_edgenetwork_v1_Interconnect_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_Interconnect_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Interconnect_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "Interconnect", + "Network", + "VlanId", + "Mtu", + "State", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_LabelsEntry_descriptor = + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectAttachment_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_edgenetwork_v1_Router_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_edgenetwork_v1_Router_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Router_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "Network", + "Interface", + "BgpPeer", + "Bgp", + "State", + "RouteAdvertisements", + }); + internal_static_google_cloud_edgenetwork_v1_Router_Interface_descriptor = + internal_static_google_cloud_edgenetwork_v1_Router_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_Router_Interface_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Router_Interface_descriptor, + new java.lang.String[] { + "Name", + "Ipv4Cidr", + "Ipv6Cidr", + "LinkedInterconnectAttachment", + "Subnetwork", + "LoopbackIpAddresses", + }); + internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_descriptor = + internal_static_google_cloud_edgenetwork_v1_Router_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_descriptor, + new java.lang.String[] { + "Name", + "Interface", + "InterfaceIpv4Cidr", + "InterfaceIpv6Cidr", + "PeerIpv4Cidr", + "PeerIpv6Cidr", + "PeerAsn", + "LocalAsn", + }); + internal_static_google_cloud_edgenetwork_v1_Router_Bgp_descriptor = + internal_static_google_cloud_edgenetwork_v1_Router_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_edgenetwork_v1_Router_Bgp_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Router_Bgp_descriptor, + new java.lang.String[] { + "Asn", "KeepaliveIntervalInSeconds", + }); + internal_static_google_cloud_edgenetwork_v1_Router_LabelsEntry_descriptor = + internal_static_google_cloud_edgenetwork_v1_Router_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_edgenetwork_v1_Router_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_Router_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_LinkLayerAddress_descriptor, + new java.lang.String[] { + "MacAddress", "IpAddress", + }); + internal_static_google_cloud_edgenetwork_v1_SubnetStatus_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_edgenetwork_v1_SubnetStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_SubnetStatus_descriptor, + new java.lang.String[] { + "Name", "MacAddress", "LinkLayerAddresses", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor, + new java.lang.String[] { + "MacAddress", "LinkLayerAddresses", "Links", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_descriptor = + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkStatus_descriptor, + new java.lang.String[] { + "CircuitId", "LacpStatus", "LldpStatuses", "PacketCounts", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_descriptor = + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_PacketCounts_descriptor, + new java.lang.String[] { + "InboundUnicast", + "InboundErrors", + "InboundDiscards", + "OutboundUnicast", + "OutboundErrors", + "OutboundDiscards", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_descriptor = + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLACPStatus_descriptor, + new java.lang.String[] { + "State", + "GoogleSystemId", + "NeighborSystemId", + "Aggregatable", + "Collecting", + "Distributing", + }); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_descriptor = + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_InterconnectDiagnostics_LinkLLDPStatus_descriptor, + new java.lang.String[] { + "PeerSystemName", + "PeerSystemDescription", + "PeerChassisId", + "PeerChassisIdType", + "PeerPortId", + "PeerPortIdType", + }); + internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_edgenetwork_v1_RouterStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor, + new java.lang.String[] { + "Network", "BgpPeerStatus", + }); + internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_descriptor = + internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_descriptor, + new java.lang.String[] { + "Name", + "IpAddress", + "PeerIpAddress", + "Status", + "State", + "Uptime", + "UptimeSeconds", + "PrefixCounter", + }); + internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_descriptor = + internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_descriptor, + new java.lang.String[] { + "Advertised", "Denied", "Received", "Sent", "Suppressed", "Withdrawn", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Router.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Router.java new file mode 100644 index 000000000000..9890f9af4f2b --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Router.java @@ -0,0 +1,8013 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message describing Router object
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router} + */ +public final class Router extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Router) + RouterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Router.newBuilder() to construct. + private Router(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Router() { + name_ = ""; + description_ = ""; + network_ = ""; + interface_ = java.util.Collections.emptyList(); + bgpPeer_ = java.util.Collections.emptyList(); + state_ = 0; + routeAdvertisements_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Router(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.class, + com.google.cloud.edgenetwork.v1.Router.Builder.class); + } + + public interface InterfaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Router.Interface) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of this interface entry. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of this interface entry. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * IP address and range of the interface.
+     * 
+ * + * string ipv4_cidr = 3; + * + * @return The ipv4Cidr. + */ + java.lang.String getIpv4Cidr(); + /** + * + * + *
+     * IP address and range of the interface.
+     * 
+ * + * string ipv4_cidr = 3; + * + * @return The bytes for ipv4Cidr. + */ + com.google.protobuf.ByteString getIpv4CidrBytes(); + + /** + * + * + *
+     * IPv6 address and range of the interface.
+     * 
+ * + * string ipv6_cidr = 6; + * + * @return The ipv6Cidr. + */ + java.lang.String getIpv6Cidr(); + /** + * + * + *
+     * IPv6 address and range of the interface.
+     * 
+ * + * string ipv6_cidr = 6; + * + * @return The bytes for ipv6Cidr. + */ + com.google.protobuf.ByteString getIpv6CidrBytes(); + + /** + * + * + *
+     * The canonical name of the linked Interconnect attachment.
+     * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return The linkedInterconnectAttachment. + */ + java.lang.String getLinkedInterconnectAttachment(); + /** + * + * + *
+     * The canonical name of the linked Interconnect attachment.
+     * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return The bytes for linkedInterconnectAttachment. + */ + com.google.protobuf.ByteString getLinkedInterconnectAttachmentBytes(); + + /** + * + * + *
+     * The canonical name of the subnetwork resource that this interface
+     * belongs to.
+     * 
+ * + * string subnetwork = 4; + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + * + * + *
+     * The canonical name of the subnetwork resource that this interface
+     * belongs to.
+     * 
+ * + * string subnetwork = 4; + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); + + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return A list containing the loopbackIpAddresses. + */ + java.util.List getLoopbackIpAddressesList(); + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return The count of loopbackIpAddresses. + */ + int getLoopbackIpAddressesCount(); + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index of the element to return. + * @return The loopbackIpAddresses at the given index. + */ + java.lang.String getLoopbackIpAddresses(int index); + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index of the value to return. + * @return The bytes of the loopbackIpAddresses at the given index. + */ + com.google.protobuf.ByteString getLoopbackIpAddressesBytes(int index); + } + /** + * + * + *
+   * Router Interface defines the GDCE zone side layer-3 information for
+   * building the BGP session.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router.Interface} + */ + public static final class Interface extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Router.Interface) + InterfaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Interface.newBuilder() to construct. + private Interface(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Interface() { + name_ = ""; + ipv4Cidr_ = ""; + ipv6Cidr_ = ""; + linkedInterconnectAttachment_ = ""; + subnetwork_ = ""; + loopbackIpAddresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Interface(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Interface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Interface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.Interface.class, + com.google.cloud.edgenetwork.v1.Router.Interface.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of this interface entry. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of this interface entry. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @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 IPV4_CIDR_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipv4Cidr_ = ""; + /** + * + * + *
+     * IP address and range of the interface.
+     * 
+ * + * string ipv4_cidr = 3; + * + * @return The ipv4Cidr. + */ + @java.lang.Override + public java.lang.String getIpv4Cidr() { + java.lang.Object ref = ipv4Cidr_; + 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(); + ipv4Cidr_ = s; + return s; + } + } + /** + * + * + *
+     * IP address and range of the interface.
+     * 
+ * + * string ipv4_cidr = 3; + * + * @return The bytes for ipv4Cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv4CidrBytes() { + java.lang.Object ref = ipv4Cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipv4Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IPV6_CIDR_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipv6Cidr_ = ""; + /** + * + * + *
+     * IPv6 address and range of the interface.
+     * 
+ * + * string ipv6_cidr = 6; + * + * @return The ipv6Cidr. + */ + @java.lang.Override + public java.lang.String getIpv6Cidr() { + java.lang.Object ref = ipv6Cidr_; + 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(); + ipv6Cidr_ = s; + return s; + } + } + /** + * + * + *
+     * IPv6 address and range of the interface.
+     * 
+ * + * string ipv6_cidr = 6; + * + * @return The bytes for ipv6Cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv6CidrBytes() { + java.lang.Object ref = ipv6Cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipv6Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINKED_INTERCONNECT_ATTACHMENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object linkedInterconnectAttachment_ = ""; + /** + * + * + *
+     * The canonical name of the linked Interconnect attachment.
+     * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return The linkedInterconnectAttachment. + */ + @java.lang.Override + public java.lang.String getLinkedInterconnectAttachment() { + java.lang.Object ref = linkedInterconnectAttachment_; + 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(); + linkedInterconnectAttachment_ = s; + return s; + } + } + /** + * + * + *
+     * The canonical name of the linked Interconnect attachment.
+     * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return The bytes for linkedInterconnectAttachment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLinkedInterconnectAttachmentBytes() { + java.lang.Object ref = linkedInterconnectAttachment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedInterconnectAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetwork_ = ""; + /** + * + * + *
+     * The canonical name of the subnetwork resource that this interface
+     * belongs to.
+     * 
+ * + * string subnetwork = 4; + * + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + 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(); + subnetwork_ = s; + return s; + } + } + /** + * + * + *
+     * The canonical name of the subnetwork resource that this interface
+     * belongs to.
+     * 
+ * + * string subnetwork = 4; + * + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOOPBACK_IP_ADDRESSES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList loopbackIpAddresses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return A list containing the loopbackIpAddresses. + */ + public com.google.protobuf.ProtocolStringList getLoopbackIpAddressesList() { + return loopbackIpAddresses_; + } + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return The count of loopbackIpAddresses. + */ + public int getLoopbackIpAddressesCount() { + return loopbackIpAddresses_.size(); + } + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index of the element to return. + * @return The loopbackIpAddresses at the given index. + */ + public java.lang.String getLoopbackIpAddresses(int index) { + return loopbackIpAddresses_.get(index); + } + /** + * + * + *
+     * Create loopback interface in the router when specified.
+     * The number of IP addresses must match the number of TOR devices.
+     * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index of the value to return. + * @return The bytes of the loopbackIpAddresses at the given index. + */ + public com.google.protobuf.ByteString getLoopbackIpAddressesBytes(int index) { + return loopbackIpAddresses_.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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(linkedInterconnectAttachment_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, linkedInterconnectAttachment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipv4Cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ipv4Cidr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subnetwork_); + } + for (int i = 0; i < loopbackIpAddresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, loopbackIpAddresses_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipv6Cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ipv6Cidr_); + } + 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(linkedInterconnectAttachment_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 2, linkedInterconnectAttachment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipv4Cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ipv4Cidr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subnetwork_); + } + { + int dataSize = 0; + for (int i = 0; i < loopbackIpAddresses_.size(); i++) { + dataSize += computeStringSizeNoTag(loopbackIpAddresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLoopbackIpAddressesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipv6Cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, ipv6Cidr_); + } + 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.edgenetwork.v1.Router.Interface)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Router.Interface other = + (com.google.cloud.edgenetwork.v1.Router.Interface) obj; + + if (!getName().equals(other.getName())) return false; + if (!getIpv4Cidr().equals(other.getIpv4Cidr())) return false; + if (!getIpv6Cidr().equals(other.getIpv6Cidr())) return false; + if (!getLinkedInterconnectAttachment().equals(other.getLinkedInterconnectAttachment())) + return false; + if (!getSubnetwork().equals(other.getSubnetwork())) return false; + if (!getLoopbackIpAddressesList().equals(other.getLoopbackIpAddressesList())) 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) + IPV4_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getIpv4Cidr().hashCode(); + hash = (37 * hash) + IPV6_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getIpv6Cidr().hashCode(); + hash = (37 * hash) + LINKED_INTERCONNECT_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getLinkedInterconnectAttachment().hashCode(); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + if (getLoopbackIpAddressesCount() > 0) { + hash = (37 * hash) + LOOPBACK_IP_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getLoopbackIpAddressesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface 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.edgenetwork.v1.Router.Interface parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface 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.edgenetwork.v1.Router.Interface parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface 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.edgenetwork.v1.Router.Interface parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface 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.edgenetwork.v1.Router.Interface parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface 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.edgenetwork.v1.Router.Interface 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; + } + /** + * + * + *
+     * Router Interface defines the GDCE zone side layer-3 information for
+     * building the BGP session.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router.Interface} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Router.Interface) + com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Interface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Interface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.Interface.class, + com.google.cloud.edgenetwork.v1.Router.Interface.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Router.Interface.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + ipv4Cidr_ = ""; + ipv6Cidr_ = ""; + linkedInterconnectAttachment_ = ""; + subnetwork_ = ""; + loopbackIpAddresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Interface_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Interface getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Router.Interface.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Interface build() { + com.google.cloud.edgenetwork.v1.Router.Interface result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Interface buildPartial() { + com.google.cloud.edgenetwork.v1.Router.Interface result = + new com.google.cloud.edgenetwork.v1.Router.Interface(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Router.Interface result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipv4Cidr_ = ipv4Cidr_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ipv6Cidr_ = ipv6Cidr_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.linkedInterconnectAttachment_ = linkedInterconnectAttachment_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.subnetwork_ = subnetwork_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + loopbackIpAddresses_.makeImmutable(); + result.loopbackIpAddresses_ = loopbackIpAddresses_; + } + } + + @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.edgenetwork.v1.Router.Interface) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Router.Interface) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Router.Interface other) { + if (other == com.google.cloud.edgenetwork.v1.Router.Interface.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIpv4Cidr().isEmpty()) { + ipv4Cidr_ = other.ipv4Cidr_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getIpv6Cidr().isEmpty()) { + ipv6Cidr_ = other.ipv6Cidr_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLinkedInterconnectAttachment().isEmpty()) { + linkedInterconnectAttachment_ = other.linkedInterconnectAttachment_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.loopbackIpAddresses_.isEmpty()) { + if (loopbackIpAddresses_.isEmpty()) { + loopbackIpAddresses_ = other.loopbackIpAddresses_; + bitField0_ |= 0x00000020; + } else { + ensureLoopbackIpAddressesIsMutable(); + loopbackIpAddresses_.addAll(other.loopbackIpAddresses_); + } + 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: + { + linkedInterconnectAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + ipv4Cidr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLoopbackIpAddressesIsMutable(); + loopbackIpAddresses_.add(s); + break; + } // case 42 + case 50: + { + ipv6Cidr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + 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_ = ""; + /** + * + * + *
+       * Name of this interface entry. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+       * Name of this interface entry. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+       * Name of this interface entry. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+       * Name of this interface entry. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of this interface entry. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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 ipv4Cidr_ = ""; + /** + * + * + *
+       * IP address and range of the interface.
+       * 
+ * + * string ipv4_cidr = 3; + * + * @return The ipv4Cidr. + */ + public java.lang.String getIpv4Cidr() { + java.lang.Object ref = ipv4Cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipv4Cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP address and range of the interface.
+       * 
+ * + * string ipv4_cidr = 3; + * + * @return The bytes for ipv4Cidr. + */ + public com.google.protobuf.ByteString getIpv4CidrBytes() { + java.lang.Object ref = ipv4Cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipv4Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP address and range of the interface.
+       * 
+ * + * string ipv4_cidr = 3; + * + * @param value The ipv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setIpv4Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipv4Cidr_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * IP address and range of the interface.
+       * 
+ * + * string ipv4_cidr = 3; + * + * @return This builder for chaining. + */ + public Builder clearIpv4Cidr() { + ipv4Cidr_ = getDefaultInstance().getIpv4Cidr(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * IP address and range of the interface.
+       * 
+ * + * string ipv4_cidr = 3; + * + * @param value The bytes for ipv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setIpv4CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipv4Cidr_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object ipv6Cidr_ = ""; + /** + * + * + *
+       * IPv6 address and range of the interface.
+       * 
+ * + * string ipv6_cidr = 6; + * + * @return The ipv6Cidr. + */ + public java.lang.String getIpv6Cidr() { + java.lang.Object ref = ipv6Cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipv6Cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IPv6 address and range of the interface.
+       * 
+ * + * string ipv6_cidr = 6; + * + * @return The bytes for ipv6Cidr. + */ + public com.google.protobuf.ByteString getIpv6CidrBytes() { + java.lang.Object ref = ipv6Cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipv6Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IPv6 address and range of the interface.
+       * 
+ * + * string ipv6_cidr = 6; + * + * @param value The ipv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setIpv6Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipv6Cidr_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * IPv6 address and range of the interface.
+       * 
+ * + * string ipv6_cidr = 6; + * + * @return This builder for chaining. + */ + public Builder clearIpv6Cidr() { + ipv6Cidr_ = getDefaultInstance().getIpv6Cidr(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * IPv6 address and range of the interface.
+       * 
+ * + * string ipv6_cidr = 6; + * + * @param value The bytes for ipv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setIpv6CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipv6Cidr_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object linkedInterconnectAttachment_ = ""; + /** + * + * + *
+       * The canonical name of the linked Interconnect attachment.
+       * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return The linkedInterconnectAttachment. + */ + public java.lang.String getLinkedInterconnectAttachment() { + java.lang.Object ref = linkedInterconnectAttachment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + linkedInterconnectAttachment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The canonical name of the linked Interconnect attachment.
+       * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return The bytes for linkedInterconnectAttachment. + */ + public com.google.protobuf.ByteString getLinkedInterconnectAttachmentBytes() { + java.lang.Object ref = linkedInterconnectAttachment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + linkedInterconnectAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The canonical name of the linked Interconnect attachment.
+       * 
+ * + * string linked_interconnect_attachment = 2; + * + * @param value The linkedInterconnectAttachment to set. + * @return This builder for chaining. + */ + public Builder setLinkedInterconnectAttachment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + linkedInterconnectAttachment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The canonical name of the linked Interconnect attachment.
+       * 
+ * + * string linked_interconnect_attachment = 2; + * + * @return This builder for chaining. + */ + public Builder clearLinkedInterconnectAttachment() { + linkedInterconnectAttachment_ = getDefaultInstance().getLinkedInterconnectAttachment(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The canonical name of the linked Interconnect attachment.
+       * 
+ * + * string linked_interconnect_attachment = 2; + * + * @param value The bytes for linkedInterconnectAttachment to set. + * @return This builder for chaining. + */ + public Builder setLinkedInterconnectAttachmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + linkedInterconnectAttachment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + /** + * + * + *
+       * The canonical name of the subnetwork resource that this interface
+       * belongs to.
+       * 
+ * + * string subnetwork = 4; + * + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The canonical name of the subnetwork resource that this interface
+       * belongs to.
+       * 
+ * + * string subnetwork = 4; + * + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The canonical name of the subnetwork resource that this interface
+       * belongs to.
+       * 
+ * + * string subnetwork = 4; + * + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetwork_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The canonical name of the subnetwork resource that this interface
+       * belongs to.
+       * 
+ * + * string subnetwork = 4; + * + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + subnetwork_ = getDefaultInstance().getSubnetwork(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * The canonical name of the subnetwork resource that this interface
+       * belongs to.
+       * 
+ * + * string subnetwork = 4; + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetwork_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList loopbackIpAddresses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLoopbackIpAddressesIsMutable() { + if (!loopbackIpAddresses_.isModifiable()) { + loopbackIpAddresses_ = new com.google.protobuf.LazyStringArrayList(loopbackIpAddresses_); + } + bitField0_ |= 0x00000020; + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return A list containing the loopbackIpAddresses. + */ + public com.google.protobuf.ProtocolStringList getLoopbackIpAddressesList() { + loopbackIpAddresses_.makeImmutable(); + return loopbackIpAddresses_; + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return The count of loopbackIpAddresses. + */ + public int getLoopbackIpAddressesCount() { + return loopbackIpAddresses_.size(); + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index of the element to return. + * @return The loopbackIpAddresses at the given index. + */ + public java.lang.String getLoopbackIpAddresses(int index) { + return loopbackIpAddresses_.get(index); + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index of the value to return. + * @return The bytes of the loopbackIpAddresses at the given index. + */ + public com.google.protobuf.ByteString getLoopbackIpAddressesBytes(int index) { + return loopbackIpAddresses_.getByteString(index); + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param index The index to set the value at. + * @param value The loopbackIpAddresses to set. + * @return This builder for chaining. + */ + public Builder setLoopbackIpAddresses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLoopbackIpAddressesIsMutable(); + loopbackIpAddresses_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param value The loopbackIpAddresses to add. + * @return This builder for chaining. + */ + public Builder addLoopbackIpAddresses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLoopbackIpAddressesIsMutable(); + loopbackIpAddresses_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param values The loopbackIpAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllLoopbackIpAddresses(java.lang.Iterable values) { + ensureLoopbackIpAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, loopbackIpAddresses_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @return This builder for chaining. + */ + public Builder clearLoopbackIpAddresses() { + loopbackIpAddresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Create loopback interface in the router when specified.
+       * The number of IP addresses must match the number of TOR devices.
+       * 
+ * + * repeated string loopback_ip_addresses = 5; + * + * @param value The bytes of the loopbackIpAddresses to add. + * @return This builder for chaining. + */ + public Builder addLoopbackIpAddressesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLoopbackIpAddressesIsMutable(); + loopbackIpAddresses_.add(value); + bitField0_ |= 0x00000020; + 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.edgenetwork.v1.Router.Interface) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Router.Interface) + private static final com.google.cloud.edgenetwork.v1.Router.Interface DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Router.Interface(); + } + + public static com.google.cloud.edgenetwork.v1.Router.Interface getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Interface 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.edgenetwork.v1.Router.Interface getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BgpPeerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Router.BgpPeer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of this BGP peer. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of this BGP peer. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Name of the RouterInterface the BGP peer is associated with.
+     * 
+ * + * string interface = 2; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+     * Name of the RouterInterface the BGP peer is associated with.
+     * 
+ * + * string interface = 2; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+     * IP range of the interface within Google.
+     * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return The interfaceIpv4Cidr. + */ + java.lang.String getInterfaceIpv4Cidr(); + /** + * + * + *
+     * IP range of the interface within Google.
+     * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return The bytes for interfaceIpv4Cidr. + */ + com.google.protobuf.ByteString getInterfaceIpv4CidrBytes(); + + /** + * + * + *
+     * IPv6 range of the interface within Google.
+     * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return The interfaceIpv6Cidr. + */ + java.lang.String getInterfaceIpv6Cidr(); + /** + * + * + *
+     * IPv6 range of the interface within Google.
+     * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return The bytes for interfaceIpv6Cidr. + */ + com.google.protobuf.ByteString getInterfaceIpv6CidrBytes(); + + /** + * + * + *
+     * IP range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return The peerIpv4Cidr. + */ + java.lang.String getPeerIpv4Cidr(); + /** + * + * + *
+     * IP range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return The bytes for peerIpv4Cidr. + */ + com.google.protobuf.ByteString getPeerIpv4CidrBytes(); + + /** + * + * + *
+     * IPv6 range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return The peerIpv6Cidr. + */ + java.lang.String getPeerIpv6Cidr(); + /** + * + * + *
+     * IPv6 range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return The bytes for peerIpv6Cidr. + */ + com.google.protobuf.ByteString getPeerIpv6CidrBytes(); + + /** + * + * + *
+     * Peer BGP Autonomous System Number (ASN). Each BGP interface may use
+     * a different value.
+     * 
+ * + * uint32 peer_asn = 5; + * + * @return The peerAsn. + */ + int getPeerAsn(); + + /** + * + * + *
+     * Output only. Local BGP Autonomous System Number (ASN).
+     * This field is ST_NOT_REQUIRED because it stores private ASNs, which are
+     * meaningless outside the zone in which they are being used.
+     * 
+ * + * uint32 local_asn = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The localAsn. + */ + int getLocalAsn(); + } + /** + * + * + *
+   * BGPPeer defines the peer side layer-3 information for building the BGP
+   * session.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router.BgpPeer} + */ + public static final class BgpPeer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Router.BgpPeer) + BgpPeerOrBuilder { + private static final long serialVersionUID = 0L; + // Use BgpPeer.newBuilder() to construct. + private BgpPeer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BgpPeer() { + name_ = ""; + interface_ = ""; + interfaceIpv4Cidr_ = ""; + interfaceIpv6Cidr_ = ""; + peerIpv4Cidr_ = ""; + peerIpv6Cidr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BgpPeer(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.BgpPeer.class, + com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of this BGP peer. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of this BGP peer. Unique within the Zones resource.
+     * 
+ * + * string name = 1; + * + * @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 INTERFACE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object interface_ = ""; + /** + * + * + *
+     * Name of the RouterInterface the BGP peer is associated with.
+     * 
+ * + * string interface = 2; + * + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + 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(); + interface_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the RouterInterface the BGP peer is associated with.
+     * 
+ * + * string interface = 2; + * + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_IPV4_CIDR_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object interfaceIpv4Cidr_ = ""; + /** + * + * + *
+     * IP range of the interface within Google.
+     * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return The interfaceIpv4Cidr. + */ + @java.lang.Override + public java.lang.String getInterfaceIpv4Cidr() { + java.lang.Object ref = interfaceIpv4Cidr_; + 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(); + interfaceIpv4Cidr_ = s; + return s; + } + } + /** + * + * + *
+     * IP range of the interface within Google.
+     * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return The bytes for interfaceIpv4Cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceIpv4CidrBytes() { + java.lang.Object ref = interfaceIpv4Cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interfaceIpv4Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_IPV6_CIDR_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object interfaceIpv6Cidr_ = ""; + /** + * + * + *
+     * IPv6 range of the interface within Google.
+     * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return The interfaceIpv6Cidr. + */ + @java.lang.Override + public java.lang.String getInterfaceIpv6Cidr() { + java.lang.Object ref = interfaceIpv6Cidr_; + 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(); + interfaceIpv6Cidr_ = s; + return s; + } + } + /** + * + * + *
+     * IPv6 range of the interface within Google.
+     * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return The bytes for interfaceIpv6Cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceIpv6CidrBytes() { + java.lang.Object ref = interfaceIpv6Cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interfaceIpv6Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_IPV4_CIDR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerIpv4Cidr_ = ""; + /** + * + * + *
+     * IP range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return The peerIpv4Cidr. + */ + @java.lang.Override + public java.lang.String getPeerIpv4Cidr() { + java.lang.Object ref = peerIpv4Cidr_; + 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(); + peerIpv4Cidr_ = s; + return s; + } + } + /** + * + * + *
+     * IP range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return The bytes for peerIpv4Cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerIpv4CidrBytes() { + java.lang.Object ref = peerIpv4Cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerIpv4Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_IPV6_CIDR_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerIpv6Cidr_ = ""; + /** + * + * + *
+     * IPv6 range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return The peerIpv6Cidr. + */ + @java.lang.Override + public java.lang.String getPeerIpv6Cidr() { + java.lang.Object ref = peerIpv6Cidr_; + 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(); + peerIpv6Cidr_ = s; + return s; + } + } + /** + * + * + *
+     * IPv6 range of the BGP interface outside Google.
+     * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return The bytes for peerIpv6Cidr. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerIpv6CidrBytes() { + java.lang.Object ref = peerIpv6Cidr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerIpv6Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_ASN_FIELD_NUMBER = 5; + private int peerAsn_ = 0; + /** + * + * + *
+     * Peer BGP Autonomous System Number (ASN). Each BGP interface may use
+     * a different value.
+     * 
+ * + * uint32 peer_asn = 5; + * + * @return The peerAsn. + */ + @java.lang.Override + public int getPeerAsn() { + return peerAsn_; + } + + public static final int LOCAL_ASN_FIELD_NUMBER = 8; + private int localAsn_ = 0; + /** + * + * + *
+     * Output only. Local BGP Autonomous System Number (ASN).
+     * This field is ST_NOT_REQUIRED because it stores private ASNs, which are
+     * meaningless outside the zone in which they are being used.
+     * 
+ * + * uint32 local_asn = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The localAsn. + */ + @java.lang.Override + public int getLocalAsn() { + return localAsn_; + } + + 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(interface_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interfaceIpv4Cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, interfaceIpv4Cidr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerIpv4Cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, peerIpv4Cidr_); + } + if (peerAsn_ != 0) { + output.writeUInt32(5, peerAsn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerIpv6Cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, peerIpv6Cidr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interfaceIpv6Cidr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, interfaceIpv6Cidr_); + } + if (localAsn_ != 0) { + output.writeUInt32(8, localAsn_); + } + 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(interface_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, interface_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interfaceIpv4Cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, interfaceIpv4Cidr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerIpv4Cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, peerIpv4Cidr_); + } + if (peerAsn_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, peerAsn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerIpv6Cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, peerIpv6Cidr_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interfaceIpv6Cidr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, interfaceIpv6Cidr_); + } + if (localAsn_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(8, localAsn_); + } + 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.edgenetwork.v1.Router.BgpPeer)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Router.BgpPeer other = + (com.google.cloud.edgenetwork.v1.Router.BgpPeer) obj; + + if (!getName().equals(other.getName())) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getInterfaceIpv4Cidr().equals(other.getInterfaceIpv4Cidr())) return false; + if (!getInterfaceIpv6Cidr().equals(other.getInterfaceIpv6Cidr())) return false; + if (!getPeerIpv4Cidr().equals(other.getPeerIpv4Cidr())) return false; + if (!getPeerIpv6Cidr().equals(other.getPeerIpv6Cidr())) return false; + if (getPeerAsn() != other.getPeerAsn()) return false; + if (getLocalAsn() != other.getLocalAsn()) 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) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + INTERFACE_IPV4_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getInterfaceIpv4Cidr().hashCode(); + hash = (37 * hash) + INTERFACE_IPV6_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getInterfaceIpv6Cidr().hashCode(); + hash = (37 * hash) + PEER_IPV4_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getPeerIpv4Cidr().hashCode(); + hash = (37 * hash) + PEER_IPV6_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getPeerIpv6Cidr().hashCode(); + hash = (37 * hash) + PEER_ASN_FIELD_NUMBER; + hash = (53 * hash) + getPeerAsn(); + hash = (37 * hash) + LOCAL_ASN_FIELD_NUMBER; + hash = (53 * hash) + getLocalAsn(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer 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.edgenetwork.v1.Router.BgpPeer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer 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.edgenetwork.v1.Router.BgpPeer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer 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.edgenetwork.v1.Router.BgpPeer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer 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.edgenetwork.v1.Router.BgpPeer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer 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.edgenetwork.v1.Router.BgpPeer 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; + } + /** + * + * + *
+     * BGPPeer defines the peer side layer-3 information for building the BGP
+     * session.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router.BgpPeer} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Router.BgpPeer) + com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.BgpPeer.class, + com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Router.BgpPeer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + interface_ = ""; + interfaceIpv4Cidr_ = ""; + interfaceIpv6Cidr_ = ""; + peerIpv4Cidr_ = ""; + peerIpv6Cidr_ = ""; + peerAsn_ = 0; + localAsn_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_BgpPeer_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.BgpPeer getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Router.BgpPeer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.BgpPeer build() { + com.google.cloud.edgenetwork.v1.Router.BgpPeer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.BgpPeer buildPartial() { + com.google.cloud.edgenetwork.v1.Router.BgpPeer result = + new com.google.cloud.edgenetwork.v1.Router.BgpPeer(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Router.BgpPeer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.interface_ = interface_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.interfaceIpv4Cidr_ = interfaceIpv4Cidr_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.interfaceIpv6Cidr_ = interfaceIpv6Cidr_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.peerIpv4Cidr_ = peerIpv4Cidr_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.peerIpv6Cidr_ = peerIpv6Cidr_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.peerAsn_ = peerAsn_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.localAsn_ = localAsn_; + } + } + + @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.edgenetwork.v1.Router.BgpPeer) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Router.BgpPeer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Router.BgpPeer other) { + if (other == com.google.cloud.edgenetwork.v1.Router.BgpPeer.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getInterfaceIpv4Cidr().isEmpty()) { + interfaceIpv4Cidr_ = other.interfaceIpv4Cidr_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getInterfaceIpv6Cidr().isEmpty()) { + interfaceIpv6Cidr_ = other.interfaceIpv6Cidr_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getPeerIpv4Cidr().isEmpty()) { + peerIpv4Cidr_ = other.peerIpv4Cidr_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getPeerIpv6Cidr().isEmpty()) { + peerIpv6Cidr_ = other.peerIpv6Cidr_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getPeerAsn() != 0) { + setPeerAsn(other.getPeerAsn()); + } + if (other.getLocalAsn() != 0) { + setLocalAsn(other.getLocalAsn()); + } + 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: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + interfaceIpv4Cidr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + peerIpv4Cidr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: + { + peerAsn_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 40 + case 50: + { + peerIpv6Cidr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + interfaceIpv6Cidr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 64: + { + localAsn_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + 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_ = ""; + /** + * + * + *
+       * Name of this BGP peer. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Zones resource.
+       * 
+ * + * string name = 1; + * + * @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 interface_ = ""; + /** + * + * + *
+       * Name of the RouterInterface the BGP peer is associated with.
+       * 
+ * + * string interface = 2; + * + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the RouterInterface the BGP peer is associated with.
+       * 
+ * + * string interface = 2; + * + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the RouterInterface the BGP peer is associated with.
+       * 
+ * + * string interface = 2; + * + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interface_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the RouterInterface the BGP peer is associated with.
+       * 
+ * + * string interface = 2; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + interface_ = getDefaultInstance().getInterface(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the RouterInterface the BGP peer is associated with.
+       * 
+ * + * string interface = 2; + * + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interface_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object interfaceIpv4Cidr_ = ""; + /** + * + * + *
+       * IP range of the interface within Google.
+       * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return The interfaceIpv4Cidr. + */ + public java.lang.String getInterfaceIpv4Cidr() { + java.lang.Object ref = interfaceIpv4Cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interfaceIpv4Cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP range of the interface within Google.
+       * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return The bytes for interfaceIpv4Cidr. + */ + public com.google.protobuf.ByteString getInterfaceIpv4CidrBytes() { + java.lang.Object ref = interfaceIpv4Cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interfaceIpv4Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP range of the interface within Google.
+       * 
+ * + * string interface_ipv4_cidr = 3; + * + * @param value The interfaceIpv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setInterfaceIpv4Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interfaceIpv4Cidr_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * IP range of the interface within Google.
+       * 
+ * + * string interface_ipv4_cidr = 3; + * + * @return This builder for chaining. + */ + public Builder clearInterfaceIpv4Cidr() { + interfaceIpv4Cidr_ = getDefaultInstance().getInterfaceIpv4Cidr(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * IP range of the interface within Google.
+       * 
+ * + * string interface_ipv4_cidr = 3; + * + * @param value The bytes for interfaceIpv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setInterfaceIpv4CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interfaceIpv4Cidr_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object interfaceIpv6Cidr_ = ""; + /** + * + * + *
+       * IPv6 range of the interface within Google.
+       * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return The interfaceIpv6Cidr. + */ + public java.lang.String getInterfaceIpv6Cidr() { + java.lang.Object ref = interfaceIpv6Cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interfaceIpv6Cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IPv6 range of the interface within Google.
+       * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return The bytes for interfaceIpv6Cidr. + */ + public com.google.protobuf.ByteString getInterfaceIpv6CidrBytes() { + java.lang.Object ref = interfaceIpv6Cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interfaceIpv6Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IPv6 range of the interface within Google.
+       * 
+ * + * string interface_ipv6_cidr = 7; + * + * @param value The interfaceIpv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setInterfaceIpv6Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + interfaceIpv6Cidr_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * IPv6 range of the interface within Google.
+       * 
+ * + * string interface_ipv6_cidr = 7; + * + * @return This builder for chaining. + */ + public Builder clearInterfaceIpv6Cidr() { + interfaceIpv6Cidr_ = getDefaultInstance().getInterfaceIpv6Cidr(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * IPv6 range of the interface within Google.
+       * 
+ * + * string interface_ipv6_cidr = 7; + * + * @param value The bytes for interfaceIpv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setInterfaceIpv6CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + interfaceIpv6Cidr_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object peerIpv4Cidr_ = ""; + /** + * + * + *
+       * IP range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return The peerIpv4Cidr. + */ + public java.lang.String getPeerIpv4Cidr() { + java.lang.Object ref = peerIpv4Cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerIpv4Cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return The bytes for peerIpv4Cidr. + */ + public com.google.protobuf.ByteString getPeerIpv4CidrBytes() { + java.lang.Object ref = peerIpv4Cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerIpv4Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv4_cidr = 4; + * + * @param value The peerIpv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setPeerIpv4Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerIpv4Cidr_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * IP range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv4_cidr = 4; + * + * @return This builder for chaining. + */ + public Builder clearPeerIpv4Cidr() { + peerIpv4Cidr_ = getDefaultInstance().getPeerIpv4Cidr(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * IP range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv4_cidr = 4; + * + * @param value The bytes for peerIpv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setPeerIpv4CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerIpv4Cidr_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object peerIpv6Cidr_ = ""; + /** + * + * + *
+       * IPv6 range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return The peerIpv6Cidr. + */ + public java.lang.String getPeerIpv6Cidr() { + java.lang.Object ref = peerIpv6Cidr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerIpv6Cidr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IPv6 range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return The bytes for peerIpv6Cidr. + */ + public com.google.protobuf.ByteString getPeerIpv6CidrBytes() { + java.lang.Object ref = peerIpv6Cidr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerIpv6Cidr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IPv6 range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv6_cidr = 6; + * + * @param value The peerIpv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setPeerIpv6Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerIpv6Cidr_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * IPv6 range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv6_cidr = 6; + * + * @return This builder for chaining. + */ + public Builder clearPeerIpv6Cidr() { + peerIpv6Cidr_ = getDefaultInstance().getPeerIpv6Cidr(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+       * IPv6 range of the BGP interface outside Google.
+       * 
+ * + * string peer_ipv6_cidr = 6; + * + * @param value The bytes for peerIpv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setPeerIpv6CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerIpv6Cidr_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int peerAsn_; + /** + * + * + *
+       * Peer BGP Autonomous System Number (ASN). Each BGP interface may use
+       * a different value.
+       * 
+ * + * uint32 peer_asn = 5; + * + * @return The peerAsn. + */ + @java.lang.Override + public int getPeerAsn() { + return peerAsn_; + } + /** + * + * + *
+       * Peer BGP Autonomous System Number (ASN). Each BGP interface may use
+       * a different value.
+       * 
+ * + * uint32 peer_asn = 5; + * + * @param value The peerAsn to set. + * @return This builder for chaining. + */ + public Builder setPeerAsn(int value) { + + peerAsn_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Peer BGP Autonomous System Number (ASN). Each BGP interface may use
+       * a different value.
+       * 
+ * + * uint32 peer_asn = 5; + * + * @return This builder for chaining. + */ + public Builder clearPeerAsn() { + bitField0_ = (bitField0_ & ~0x00000040); + peerAsn_ = 0; + onChanged(); + return this; + } + + private int localAsn_; + /** + * + * + *
+       * Output only. Local BGP Autonomous System Number (ASN).
+       * This field is ST_NOT_REQUIRED because it stores private ASNs, which are
+       * meaningless outside the zone in which they are being used.
+       * 
+ * + * uint32 local_asn = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The localAsn. + */ + @java.lang.Override + public int getLocalAsn() { + return localAsn_; + } + /** + * + * + *
+       * Output only. Local BGP Autonomous System Number (ASN).
+       * This field is ST_NOT_REQUIRED because it stores private ASNs, which are
+       * meaningless outside the zone in which they are being used.
+       * 
+ * + * uint32 local_asn = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The localAsn to set. + * @return This builder for chaining. + */ + public Builder setLocalAsn(int value) { + + localAsn_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Local BGP Autonomous System Number (ASN).
+       * This field is ST_NOT_REQUIRED because it stores private ASNs, which are
+       * meaningless outside the zone in which they are being used.
+       * 
+ * + * uint32 local_asn = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLocalAsn() { + bitField0_ = (bitField0_ & ~0x00000080); + localAsn_ = 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.edgenetwork.v1.Router.BgpPeer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Router.BgpPeer) + private static final com.google.cloud.edgenetwork.v1.Router.BgpPeer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Router.BgpPeer(); + } + + public static com.google.cloud.edgenetwork.v1.Router.BgpPeer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BgpPeer 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.edgenetwork.v1.Router.BgpPeer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BgpOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Router.Bgp) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Locally assigned BGP ASN.
+     * 
+ * + * uint32 asn = 1; + * + * @return The asn. + */ + int getAsn(); + + /** + * + * + *
+     * The interval in seconds between BGP keepalive messages that are
+     * sent to the peer. Default is 20 with value between 20 and 60.
+     * 
+ * + * uint32 keepalive_interval_in_seconds = 2; + * + * @return The keepaliveIntervalInSeconds. + */ + int getKeepaliveIntervalInSeconds(); + } + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router.Bgp} + */ + public static final class Bgp extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Router.Bgp) + BgpOrBuilder { + private static final long serialVersionUID = 0L; + // Use Bgp.newBuilder() to construct. + private Bgp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Bgp() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Bgp(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Bgp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Bgp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.Bgp.class, + com.google.cloud.edgenetwork.v1.Router.Bgp.Builder.class); + } + + public static final int ASN_FIELD_NUMBER = 1; + private int asn_ = 0; + /** + * + * + *
+     * Locally assigned BGP ASN.
+     * 
+ * + * uint32 asn = 1; + * + * @return The asn. + */ + @java.lang.Override + public int getAsn() { + return asn_; + } + + public static final int KEEPALIVE_INTERVAL_IN_SECONDS_FIELD_NUMBER = 2; + private int keepaliveIntervalInSeconds_ = 0; + /** + * + * + *
+     * The interval in seconds between BGP keepalive messages that are
+     * sent to the peer. Default is 20 with value between 20 and 60.
+     * 
+ * + * uint32 keepalive_interval_in_seconds = 2; + * + * @return The keepaliveIntervalInSeconds. + */ + @java.lang.Override + public int getKeepaliveIntervalInSeconds() { + return keepaliveIntervalInSeconds_; + } + + 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 (asn_ != 0) { + output.writeUInt32(1, asn_); + } + if (keepaliveIntervalInSeconds_ != 0) { + output.writeUInt32(2, keepaliveIntervalInSeconds_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (asn_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, asn_); + } + if (keepaliveIntervalInSeconds_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeUInt32Size(2, keepaliveIntervalInSeconds_); + } + 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.edgenetwork.v1.Router.Bgp)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Router.Bgp other = + (com.google.cloud.edgenetwork.v1.Router.Bgp) obj; + + if (getAsn() != other.getAsn()) return false; + if (getKeepaliveIntervalInSeconds() != other.getKeepaliveIntervalInSeconds()) 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) + ASN_FIELD_NUMBER; + hash = (53 * hash) + getAsn(); + hash = (37 * hash) + KEEPALIVE_INTERVAL_IN_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getKeepaliveIntervalInSeconds(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp 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.edgenetwork.v1.Router.Bgp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp 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.edgenetwork.v1.Router.Bgp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp 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.edgenetwork.v1.Router.Bgp parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp 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.edgenetwork.v1.Router.Bgp parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp 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.edgenetwork.v1.Router.Bgp 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; + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router.Bgp} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Router.Bgp) + com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Bgp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Bgp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.Bgp.class, + com.google.cloud.edgenetwork.v1.Router.Bgp.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Router.Bgp.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + asn_ = 0; + keepaliveIntervalInSeconds_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_Bgp_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Bgp getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Bgp build() { + com.google.cloud.edgenetwork.v1.Router.Bgp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Bgp buildPartial() { + com.google.cloud.edgenetwork.v1.Router.Bgp result = + new com.google.cloud.edgenetwork.v1.Router.Bgp(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Router.Bgp result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.asn_ = asn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.keepaliveIntervalInSeconds_ = keepaliveIntervalInSeconds_; + } + } + + @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.edgenetwork.v1.Router.Bgp) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Router.Bgp) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Router.Bgp other) { + if (other == com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance()) return this; + if (other.getAsn() != 0) { + setAsn(other.getAsn()); + } + if (other.getKeepaliveIntervalInSeconds() != 0) { + setKeepaliveIntervalInSeconds(other.getKeepaliveIntervalInSeconds()); + } + 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: + { + asn_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + keepaliveIntervalInSeconds_ = input.readUInt32(); + 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 asn_; + /** + * + * + *
+       * Locally assigned BGP ASN.
+       * 
+ * + * uint32 asn = 1; + * + * @return The asn. + */ + @java.lang.Override + public int getAsn() { + return asn_; + } + /** + * + * + *
+       * Locally assigned BGP ASN.
+       * 
+ * + * uint32 asn = 1; + * + * @param value The asn to set. + * @return This builder for chaining. + */ + public Builder setAsn(int value) { + + asn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Locally assigned BGP ASN.
+       * 
+ * + * uint32 asn = 1; + * + * @return This builder for chaining. + */ + public Builder clearAsn() { + bitField0_ = (bitField0_ & ~0x00000001); + asn_ = 0; + onChanged(); + return this; + } + + private int keepaliveIntervalInSeconds_; + /** + * + * + *
+       * The interval in seconds between BGP keepalive messages that are
+       * sent to the peer. Default is 20 with value between 20 and 60.
+       * 
+ * + * uint32 keepalive_interval_in_seconds = 2; + * + * @return The keepaliveIntervalInSeconds. + */ + @java.lang.Override + public int getKeepaliveIntervalInSeconds() { + return keepaliveIntervalInSeconds_; + } + /** + * + * + *
+       * The interval in seconds between BGP keepalive messages that are
+       * sent to the peer. Default is 20 with value between 20 and 60.
+       * 
+ * + * uint32 keepalive_interval_in_seconds = 2; + * + * @param value The keepaliveIntervalInSeconds to set. + * @return This builder for chaining. + */ + public Builder setKeepaliveIntervalInSeconds(int value) { + + keepaliveIntervalInSeconds_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The interval in seconds between BGP keepalive messages that are
+       * sent to the peer. Default is 20 with value between 20 and 60.
+       * 
+ * + * uint32 keepalive_interval_in_seconds = 2; + * + * @return This builder for chaining. + */ + public Builder clearKeepaliveIntervalInSeconds() { + bitField0_ = (bitField0_ & ~0x00000002); + keepaliveIntervalInSeconds_ = 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.edgenetwork.v1.Router.Bgp) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Router.Bgp) + private static final com.google.cloud.edgenetwork.v1.Router.Bgp DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Router.Bgp(); + } + + public static com.google.cloud.edgenetwork.v1.Router.Bgp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bgp 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.edgenetwork.v1.Router.Bgp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The canonical resource name of the router.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the router.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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; + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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 NETWORK_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Required. The canonical name of the network to which this router belongs.
+   * The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The canonical name of the network to which this router belongs.
+   * The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERFACE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List interface_; + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + @java.lang.Override + public java.util.List getInterfaceList() { + return interface_; + } + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + @java.lang.Override + public java.util.List + getInterfaceOrBuilderList() { + return interface_; + } + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + @java.lang.Override + public int getInterfaceCount() { + return interface_.size(); + } + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Interface getInterface(int index) { + return interface_.get(index); + } + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder getInterfaceOrBuilder( + int index) { + return interface_.get(index); + } + + public static final int BGP_PEER_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List bgpPeer_; + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + @java.lang.Override + public java.util.List getBgpPeerList() { + return bgpPeer_; + } + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + @java.lang.Override + public java.util.List + getBgpPeerOrBuilderList() { + return bgpPeer_; + } + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + @java.lang.Override + public int getBgpPeerCount() { + return bgpPeer_.size(); + } + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.BgpPeer getBgpPeer(int index) { + return bgpPeer_.get(index); + } + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder getBgpPeerOrBuilder(int index) { + return bgpPeer_.get(index); + } + + public static final int BGP_FIELD_NUMBER = 9; + private com.google.cloud.edgenetwork.v1.Router.Bgp bgp_; + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + * + * @return Whether the bgp field is set. + */ + @java.lang.Override + public boolean hasBgp() { + return bgp_ != null; + } + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + * + * @return The bgp. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.Bgp getBgp() { + return bgp_ == null ? com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance() : bgp_; + } + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder getBgpOrBuilder() { + return bgp_ == null ? com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance() : bgp_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ResourceState getState() { + com.google.cloud.edgenetwork.v1.ResourceState result = + com.google.cloud.edgenetwork.v1.ResourceState.forNumber(state_); + return result == null ? com.google.cloud.edgenetwork.v1.ResourceState.UNRECOGNIZED : result; + } + + public static final int ROUTE_ADVERTISEMENTS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList routeAdvertisements_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the routeAdvertisements. + */ + public com.google.protobuf.ProtocolStringList getRouteAdvertisementsList() { + return routeAdvertisements_; + } + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of routeAdvertisements. + */ + public int getRouteAdvertisementsCount() { + return routeAdvertisements_.size(); + } + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The routeAdvertisements at the given index. + */ + public java.lang.String getRouteAdvertisements(int index) { + return routeAdvertisements_.get(index); + } + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the routeAdvertisements at the given index. + */ + public com.google.protobuf.ByteString getRouteAdvertisementsBytes(int index) { + return routeAdvertisements_.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(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(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, network_); + } + for (int i = 0; i < interface_.size(); i++) { + output.writeMessage(7, interface_.get(i)); + } + for (int i = 0; i < bgpPeer_.size(); i++) { + output.writeMessage(8, bgpPeer_.get(i)); + } + if (bgp_ != null) { + output.writeMessage(9, getBgp()); + } + if (state_ != com.google.cloud.edgenetwork.v1.ResourceState.STATE_UNKNOWN.getNumber()) { + output.writeEnum(10, state_); + } + for (int i = 0; i < routeAdvertisements_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 11, routeAdvertisements_.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(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(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, network_); + } + for (int i = 0; i < interface_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, interface_.get(i)); + } + for (int i = 0; i < bgpPeer_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, bgpPeer_.get(i)); + } + if (bgp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getBgp()); + } + if (state_ != com.google.cloud.edgenetwork.v1.ResourceState.STATE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + { + int dataSize = 0; + for (int i = 0; i < routeAdvertisements_.size(); i++) { + dataSize += computeStringSizeNoTag(routeAdvertisements_.getRaw(i)); + } + size += dataSize; + size += 1 * getRouteAdvertisementsList().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.edgenetwork.v1.Router)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Router other = (com.google.cloud.edgenetwork.v1.Router) 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 (!getNetwork().equals(other.getNetwork())) return false; + if (!getInterfaceList().equals(other.getInterfaceList())) return false; + if (!getBgpPeerList().equals(other.getBgpPeerList())) return false; + if (hasBgp() != other.hasBgp()) return false; + if (hasBgp()) { + if (!getBgp().equals(other.getBgp())) return false; + } + if (state_ != other.state_) return false; + if (!getRouteAdvertisementsList().equals(other.getRouteAdvertisementsList())) 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (getInterfaceCount() > 0) { + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterfaceList().hashCode(); + } + if (getBgpPeerCount() > 0) { + hash = (37 * hash) + BGP_PEER_FIELD_NUMBER; + hash = (53 * hash) + getBgpPeerList().hashCode(); + } + if (hasBgp()) { + hash = (37 * hash) + BGP_FIELD_NUMBER; + hash = (53 * hash) + getBgp().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getRouteAdvertisementsCount() > 0) { + hash = (37 * hash) + ROUTE_ADVERTISEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getRouteAdvertisementsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Router parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router 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.edgenetwork.v1.Router parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router 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.edgenetwork.v1.Router parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Router parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Router parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router 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.edgenetwork.v1.Router parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router 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.edgenetwork.v1.Router parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Router 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.edgenetwork.v1.Router 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; + } + /** + * + * + *
+   * Message describing Router object
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Router} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Router) + com.google.cloud.edgenetwork.v1.RouterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Router.class, + com.google.cloud.edgenetwork.v1.Router.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Router.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_ = ""; + network_ = ""; + if (interfaceBuilder_ == null) { + interface_ = java.util.Collections.emptyList(); + } else { + interface_ = null; + interfaceBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (bgpPeerBuilder_ == null) { + bgpPeer_ = java.util.Collections.emptyList(); + } else { + bgpPeer_ = null; + bgpPeerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + bgp_ = null; + if (bgpBuilder_ != null) { + bgpBuilder_.dispose(); + bgpBuilder_ = null; + } + state_ = 0; + routeAdvertisements_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Router_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Router.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router build() { + com.google.cloud.edgenetwork.v1.Router result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router buildPartial() { + com.google.cloud.edgenetwork.v1.Router result = + new com.google.cloud.edgenetwork.v1.Router(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.edgenetwork.v1.Router result) { + if (interfaceBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + interface_ = java.util.Collections.unmodifiableList(interface_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.interface_ = interface_; + } else { + result.interface_ = interfaceBuilder_.build(); + } + if (bgpPeerBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + bgpPeer_ = java.util.Collections.unmodifiableList(bgpPeer_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.bgpPeer_ = bgpPeer_; + } else { + result.bgpPeer_ = bgpPeerBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Router 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.network_ = network_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.bgp_ = bgpBuilder_ == null ? bgp_ : bgpBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + routeAdvertisements_.makeImmutable(); + result.routeAdvertisements_ = routeAdvertisements_; + } + } + + @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.edgenetwork.v1.Router) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Router) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Router other) { + if (other == com.google.cloud.edgenetwork.v1.Router.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.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (interfaceBuilder_ == null) { + if (!other.interface_.isEmpty()) { + if (interface_.isEmpty()) { + interface_ = other.interface_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureInterfaceIsMutable(); + interface_.addAll(other.interface_); + } + onChanged(); + } + } else { + if (!other.interface_.isEmpty()) { + if (interfaceBuilder_.isEmpty()) { + interfaceBuilder_.dispose(); + interfaceBuilder_ = null; + interface_ = other.interface_; + bitField0_ = (bitField0_ & ~0x00000040); + interfaceBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInterfaceFieldBuilder() + : null; + } else { + interfaceBuilder_.addAllMessages(other.interface_); + } + } + } + if (bgpPeerBuilder_ == null) { + if (!other.bgpPeer_.isEmpty()) { + if (bgpPeer_.isEmpty()) { + bgpPeer_ = other.bgpPeer_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureBgpPeerIsMutable(); + bgpPeer_.addAll(other.bgpPeer_); + } + onChanged(); + } + } else { + if (!other.bgpPeer_.isEmpty()) { + if (bgpPeerBuilder_.isEmpty()) { + bgpPeerBuilder_.dispose(); + bgpPeerBuilder_ = null; + bgpPeer_ = other.bgpPeer_; + bitField0_ = (bitField0_ & ~0x00000080); + bgpPeerBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBgpPeerFieldBuilder() + : null; + } else { + bgpPeerBuilder_.addAllMessages(other.bgpPeer_); + } + } + } + if (other.hasBgp()) { + mergeBgp(other.getBgp()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.routeAdvertisements_.isEmpty()) { + if (routeAdvertisements_.isEmpty()) { + routeAdvertisements_ = other.routeAdvertisements_; + bitField0_ |= 0x00000400; + } else { + ensureRouteAdvertisementsIsMutable(); + routeAdvertisements_.addAll(other.routeAdvertisements_); + } + 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: + { + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.cloud.edgenetwork.v1.Router.Interface m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Router.Interface.parser(), + extensionRegistry); + if (interfaceBuilder_ == null) { + ensureInterfaceIsMutable(); + interface_.add(m); + } else { + interfaceBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + com.google.cloud.edgenetwork.v1.Router.BgpPeer m = + input.readMessage( + com.google.cloud.edgenetwork.v1.Router.BgpPeer.parser(), extensionRegistry); + if (bgpPeerBuilder_ == null) { + ensureBgpPeerIsMutable(); + bgpPeer_.add(m); + } else { + bgpPeerBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + input.readMessage(getBgpFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRouteAdvertisementsIsMutable(); + routeAdvertisements_.add(s); + break; + } // case 90 + 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 canonical resource name of the router.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the router.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the router.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the router.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical resource name of the router.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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 when the router 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Optional. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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 network_ = ""; + /** + * + * + *
+     * Required. The canonical name of the network to which this router belongs.
+     * The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The canonical name of the network to which this router belongs.
+     * The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The canonical name of the network to which this router belongs.
+     * The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical name of the network to which this router belongs.
+     * The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical name of the network to which this router belongs.
+     * The name is in the form of
+     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List interface_ = + java.util.Collections.emptyList(); + + private void ensureInterfaceIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + interface_ = + new java.util.ArrayList(interface_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.Interface, + com.google.cloud.edgenetwork.v1.Router.Interface.Builder, + com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder> + interfaceBuilder_; + + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public java.util.List getInterfaceList() { + if (interfaceBuilder_ == null) { + return java.util.Collections.unmodifiableList(interface_); + } else { + return interfaceBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public int getInterfaceCount() { + if (interfaceBuilder_ == null) { + return interface_.size(); + } else { + return interfaceBuilder_.getCount(); + } + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public com.google.cloud.edgenetwork.v1.Router.Interface getInterface(int index) { + if (interfaceBuilder_ == null) { + return interface_.get(index); + } else { + return interfaceBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder setInterface(int index, com.google.cloud.edgenetwork.v1.Router.Interface value) { + if (interfaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfaceIsMutable(); + interface_.set(index, value); + onChanged(); + } else { + interfaceBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder setInterface( + int index, com.google.cloud.edgenetwork.v1.Router.Interface.Builder builderForValue) { + if (interfaceBuilder_ == null) { + ensureInterfaceIsMutable(); + interface_.set(index, builderForValue.build()); + onChanged(); + } else { + interfaceBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder addInterface(com.google.cloud.edgenetwork.v1.Router.Interface value) { + if (interfaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfaceIsMutable(); + interface_.add(value); + onChanged(); + } else { + interfaceBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder addInterface(int index, com.google.cloud.edgenetwork.v1.Router.Interface value) { + if (interfaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInterfaceIsMutable(); + interface_.add(index, value); + onChanged(); + } else { + interfaceBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder addInterface( + com.google.cloud.edgenetwork.v1.Router.Interface.Builder builderForValue) { + if (interfaceBuilder_ == null) { + ensureInterfaceIsMutable(); + interface_.add(builderForValue.build()); + onChanged(); + } else { + interfaceBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder addInterface( + int index, com.google.cloud.edgenetwork.v1.Router.Interface.Builder builderForValue) { + if (interfaceBuilder_ == null) { + ensureInterfaceIsMutable(); + interface_.add(index, builderForValue.build()); + onChanged(); + } else { + interfaceBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder addAllInterface( + java.lang.Iterable values) { + if (interfaceBuilder_ == null) { + ensureInterfaceIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interface_); + onChanged(); + } else { + interfaceBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder clearInterface() { + if (interfaceBuilder_ == null) { + interface_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + interfaceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public Builder removeInterface(int index) { + if (interfaceBuilder_ == null) { + ensureInterfaceIsMutable(); + interface_.remove(index); + onChanged(); + } else { + interfaceBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public com.google.cloud.edgenetwork.v1.Router.Interface.Builder getInterfaceBuilder(int index) { + return getInterfaceFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder getInterfaceOrBuilder( + int index) { + if (interfaceBuilder_ == null) { + return interface_.get(index); + } else { + return interfaceBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public java.util.List + getInterfaceOrBuilderList() { + if (interfaceBuilder_ != null) { + return interfaceBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(interface_); + } + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public com.google.cloud.edgenetwork.v1.Router.Interface.Builder addInterfaceBuilder() { + return getInterfaceFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Router.Interface.getDefaultInstance()); + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public com.google.cloud.edgenetwork.v1.Router.Interface.Builder addInterfaceBuilder(int index) { + return getInterfaceFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Router.Interface.getDefaultInstance()); + } + /** + * + * + *
+     * Router interfaces.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + public java.util.List + getInterfaceBuilderList() { + return getInterfaceFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.Interface, + com.google.cloud.edgenetwork.v1.Router.Interface.Builder, + com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder> + getInterfaceFieldBuilder() { + if (interfaceBuilder_ == null) { + interfaceBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.Interface, + com.google.cloud.edgenetwork.v1.Router.Interface.Builder, + com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder>( + interface_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + interface_ = null; + } + return interfaceBuilder_; + } + + private java.util.List bgpPeer_ = + java.util.Collections.emptyList(); + + private void ensureBgpPeerIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + bgpPeer_ = + new java.util.ArrayList(bgpPeer_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.BgpPeer, + com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder, + com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder> + bgpPeerBuilder_; + + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public java.util.List getBgpPeerList() { + if (bgpPeerBuilder_ == null) { + return java.util.Collections.unmodifiableList(bgpPeer_); + } else { + return bgpPeerBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public int getBgpPeerCount() { + if (bgpPeerBuilder_ == null) { + return bgpPeer_.size(); + } else { + return bgpPeerBuilder_.getCount(); + } + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public com.google.cloud.edgenetwork.v1.Router.BgpPeer getBgpPeer(int index) { + if (bgpPeerBuilder_ == null) { + return bgpPeer_.get(index); + } else { + return bgpPeerBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder setBgpPeer(int index, com.google.cloud.edgenetwork.v1.Router.BgpPeer value) { + if (bgpPeerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBgpPeerIsMutable(); + bgpPeer_.set(index, value); + onChanged(); + } else { + bgpPeerBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder setBgpPeer( + int index, com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder builderForValue) { + if (bgpPeerBuilder_ == null) { + ensureBgpPeerIsMutable(); + bgpPeer_.set(index, builderForValue.build()); + onChanged(); + } else { + bgpPeerBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder addBgpPeer(com.google.cloud.edgenetwork.v1.Router.BgpPeer value) { + if (bgpPeerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBgpPeerIsMutable(); + bgpPeer_.add(value); + onChanged(); + } else { + bgpPeerBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder addBgpPeer(int index, com.google.cloud.edgenetwork.v1.Router.BgpPeer value) { + if (bgpPeerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBgpPeerIsMutable(); + bgpPeer_.add(index, value); + onChanged(); + } else { + bgpPeerBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder addBgpPeer( + com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder builderForValue) { + if (bgpPeerBuilder_ == null) { + ensureBgpPeerIsMutable(); + bgpPeer_.add(builderForValue.build()); + onChanged(); + } else { + bgpPeerBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder addBgpPeer( + int index, com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder builderForValue) { + if (bgpPeerBuilder_ == null) { + ensureBgpPeerIsMutable(); + bgpPeer_.add(index, builderForValue.build()); + onChanged(); + } else { + bgpPeerBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder addAllBgpPeer( + java.lang.Iterable values) { + if (bgpPeerBuilder_ == null) { + ensureBgpPeerIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bgpPeer_); + onChanged(); + } else { + bgpPeerBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder clearBgpPeer() { + if (bgpPeerBuilder_ == null) { + bgpPeer_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + bgpPeerBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public Builder removeBgpPeer(int index) { + if (bgpPeerBuilder_ == null) { + ensureBgpPeerIsMutable(); + bgpPeer_.remove(index); + onChanged(); + } else { + bgpPeerBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder getBgpPeerBuilder(int index) { + return getBgpPeerFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder getBgpPeerOrBuilder(int index) { + if (bgpPeerBuilder_ == null) { + return bgpPeer_.get(index); + } else { + return bgpPeerBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public java.util.List + getBgpPeerOrBuilderList() { + if (bgpPeerBuilder_ != null) { + return bgpPeerBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bgpPeer_); + } + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder addBgpPeerBuilder() { + return getBgpPeerFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.Router.BgpPeer.getDefaultInstance()); + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder addBgpPeerBuilder(int index) { + return getBgpPeerFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.Router.BgpPeer.getDefaultInstance()); + } + /** + * + * + *
+     * BGP peers.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + public java.util.List + getBgpPeerBuilderList() { + return getBgpPeerFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.BgpPeer, + com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder, + com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder> + getBgpPeerFieldBuilder() { + if (bgpPeerBuilder_ == null) { + bgpPeerBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.BgpPeer, + com.google.cloud.edgenetwork.v1.Router.BgpPeer.Builder, + com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder>( + bgpPeer_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + bgpPeer_ = null; + } + return bgpPeerBuilder_; + } + + private com.google.cloud.edgenetwork.v1.Router.Bgp bgp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.Bgp, + com.google.cloud.edgenetwork.v1.Router.Bgp.Builder, + com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder> + bgpBuilder_; + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + * + * @return Whether the bgp field is set. + */ + public boolean hasBgp() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + * + * @return The bgp. + */ + public com.google.cloud.edgenetwork.v1.Router.Bgp getBgp() { + if (bgpBuilder_ == null) { + return bgp_ == null + ? com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance() + : bgp_; + } else { + return bgpBuilder_.getMessage(); + } + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + public Builder setBgp(com.google.cloud.edgenetwork.v1.Router.Bgp value) { + if (bgpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bgp_ = value; + } else { + bgpBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + public Builder setBgp(com.google.cloud.edgenetwork.v1.Router.Bgp.Builder builderForValue) { + if (bgpBuilder_ == null) { + bgp_ = builderForValue.build(); + } else { + bgpBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + public Builder mergeBgp(com.google.cloud.edgenetwork.v1.Router.Bgp value) { + if (bgpBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && bgp_ != null + && bgp_ != com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance()) { + getBgpBuilder().mergeFrom(value); + } else { + bgp_ = value; + } + } else { + bgpBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + public Builder clearBgp() { + bitField0_ = (bitField0_ & ~0x00000100); + bgp_ = null; + if (bgpBuilder_ != null) { + bgpBuilder_.dispose(); + bgpBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + public com.google.cloud.edgenetwork.v1.Router.Bgp.Builder getBgpBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getBgpFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + public com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder getBgpOrBuilder() { + if (bgpBuilder_ != null) { + return bgpBuilder_.getMessageOrBuilder(); + } else { + return bgp_ == null + ? com.google.cloud.edgenetwork.v1.Router.Bgp.getDefaultInstance() + : bgp_; + } + } + /** + * + * + *
+     * BGP information specific to this router.
+     * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.Bgp, + com.google.cloud.edgenetwork.v1.Router.Bgp.Builder, + com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder> + getBgpFieldBuilder() { + if (bgpBuilder_ == null) { + bgpBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router.Bgp, + com.google.cloud.edgenetwork.v1.Router.Bgp.Builder, + com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder>( + getBgp(), getParentForChildren(), isClean()); + bgp_ = null; + } + return bgpBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ResourceState getState() { + com.google.cloud.edgenetwork.v1.ResourceState result = + com.google.cloud.edgenetwork.v1.ResourceState.forNumber(state_); + return result == null ? com.google.cloud.edgenetwork.v1.ResourceState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.edgenetwork.v1.ResourceState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList routeAdvertisements_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRouteAdvertisementsIsMutable() { + if (!routeAdvertisements_.isModifiable()) { + routeAdvertisements_ = new com.google.protobuf.LazyStringArrayList(routeAdvertisements_); + } + bitField0_ |= 0x00000400; + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the routeAdvertisements. + */ + public com.google.protobuf.ProtocolStringList getRouteAdvertisementsList() { + routeAdvertisements_.makeImmutable(); + return routeAdvertisements_; + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of routeAdvertisements. + */ + public int getRouteAdvertisementsCount() { + return routeAdvertisements_.size(); + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The routeAdvertisements at the given index. + */ + public java.lang.String getRouteAdvertisements(int index) { + return routeAdvertisements_.get(index); + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the routeAdvertisements at the given index. + */ + public com.google.protobuf.ByteString getRouteAdvertisementsBytes(int index) { + return routeAdvertisements_.getByteString(index); + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The routeAdvertisements to set. + * @return This builder for chaining. + */ + public Builder setRouteAdvertisements(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteAdvertisementsIsMutable(); + routeAdvertisements_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The routeAdvertisements to add. + * @return This builder for chaining. + */ + public Builder addRouteAdvertisements(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteAdvertisementsIsMutable(); + routeAdvertisements_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The routeAdvertisements to add. + * @return This builder for chaining. + */ + public Builder addAllRouteAdvertisements(java.lang.Iterable values) { + ensureRouteAdvertisementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routeAdvertisements_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRouteAdvertisements() { + routeAdvertisements_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+     * static routes from this router.
+     * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the routeAdvertisements to add. + * @return This builder for chaining. + */ + public Builder addRouteAdvertisementsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRouteAdvertisementsIsMutable(); + routeAdvertisements_.add(value); + bitField0_ |= 0x00000400; + 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.edgenetwork.v1.Router) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Router) + private static final com.google.cloud.edgenetwork.v1.Router DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Router(); + } + + public static com.google.cloud.edgenetwork.v1.Router getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Router 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.edgenetwork.v1.Router getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterName.java new file mode 100644 index 000000000000..5e0b5a092f00 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterName.java @@ -0,0 +1,257 @@ +/* + * 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.edgenetwork.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 RouterName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE_ROUTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/zones/{zone}/routers/{router}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + private final String router; + + @Deprecated + protected RouterName() { + project = null; + location = null; + zone = null; + router = null; + } + + private RouterName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + router = Preconditions.checkNotNull(builder.getRouter()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getRouter() { + return router; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RouterName of(String project, String location, String zone, String router) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setRouter(router) + .build(); + } + + public static String format(String project, String location, String zone, String router) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setRouter(router) + .build() + .toString(); + } + + public static RouterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE_ROUTER.validatedMatch( + formattedString, "RouterName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("zone"), + matchMap.get("router")); + } + + 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 (RouterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE_ROUTER.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (zone != null) { + fieldMapBuilder.put("zone", zone); + } + if (router != null) { + fieldMapBuilder.put("router", router); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE_ROUTER.instantiate( + "project", project, "location", location, "zone", zone, "router", router); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RouterName that = ((RouterName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone) + && Objects.equals(this.router, that.router); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(zone); + h *= 1000003; + h ^= Objects.hashCode(router); + return h; + } + + /** Builder for projects/{project}/locations/{location}/zones/{zone}/routers/{router}. */ + public static class Builder { + private String project; + private String location; + private String zone; + private String router; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getRouter() { + return router; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public Builder setRouter(String router) { + this.router = router; + return this; + } + + private Builder(RouterName routerName) { + this.project = routerName.project; + this.location = routerName.location; + this.zone = routerName.zone; + this.router = routerName.router; + } + + public RouterName build() { + return new RouterName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterOrBuilder.java new file mode 100644 index 000000000000..cf378e9680cc --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterOrBuilder.java @@ -0,0 +1,471 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface RouterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Router) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The canonical resource name of the router.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The canonical resource name of the router.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time when the router 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 when the router 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 when the router was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the router 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 when the router 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 when the router was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The canonical name of the network to which this router belongs.
+   * The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Required. The canonical name of the network to which this router belongs.
+   * The name is in the form of
+   * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + java.util.List getInterfaceList(); + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + com.google.cloud.edgenetwork.v1.Router.Interface getInterface(int index); + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + int getInterfaceCount(); + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + java.util.List + getInterfaceOrBuilderList(); + /** + * + * + *
+   * Router interfaces.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.Interface interface = 7; + */ + com.google.cloud.edgenetwork.v1.Router.InterfaceOrBuilder getInterfaceOrBuilder(int index); + + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + java.util.List getBgpPeerList(); + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + com.google.cloud.edgenetwork.v1.Router.BgpPeer getBgpPeer(int index); + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + int getBgpPeerCount(); + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + java.util.List + getBgpPeerOrBuilderList(); + /** + * + * + *
+   * BGP peers.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.Router.BgpPeer bgp_peer = 8; + */ + com.google.cloud.edgenetwork.v1.Router.BgpPeerOrBuilder getBgpPeerOrBuilder(int index); + + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + * + * @return Whether the bgp field is set. + */ + boolean hasBgp(); + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + * + * @return The bgp. + */ + com.google.cloud.edgenetwork.v1.Router.Bgp getBgp(); + /** + * + * + *
+   * BGP information specific to this router.
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router.Bgp bgp = 9; + */ + com.google.cloud.edgenetwork.v1.Router.BgpOrBuilder getBgpOrBuilder(); + + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.edgenetwork.v1.ResourceState getState(); + + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the routeAdvertisements. + */ + java.util.List getRouteAdvertisementsList(); + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of routeAdvertisements. + */ + int getRouteAdvertisementsCount(); + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The routeAdvertisements at the given index. + */ + java.lang.String getRouteAdvertisements(int index); + /** + * + * + *
+   * Optional. A list of CIDRs in IP/Length format to advertise northbound as
+   * static routes from this router.
+   * 
+ * + * repeated string route_advertisements = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the routeAdvertisements at the given index. + */ + com.google.protobuf.ByteString getRouteAdvertisementsBytes(int index); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatus.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatus.java new file mode 100644 index 000000000000..104a9ccd8d01 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatus.java @@ -0,0 +1,4507 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Describing the current status of a router.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.RouterStatus} + */ +public final class RouterStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.RouterStatus) + RouterStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use RouterStatus.newBuilder() to construct. + private RouterStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RouterStatus() { + network_ = ""; + bgpPeerStatus_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RouterStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.RouterStatus.class, + com.google.cloud.edgenetwork.v1.RouterStatus.Builder.class); + } + + public interface BgpPeerStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of this BGP peer. Unique within the Routers resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of this BGP peer. Unique within the Routers resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * IP address of the local BGP interface.
+     * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + /** + * + * + *
+     * IP address of the local BGP interface.
+     * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+     * IP address of the remote BGP interface.
+     * 
+ * + * string peer_ip_address = 3; + * + * @return The peerIpAddress. + */ + java.lang.String getPeerIpAddress(); + /** + * + * + *
+     * IP address of the remote BGP interface.
+     * 
+ * + * string peer_ip_address = 3; + * + * @return The bytes for peerIpAddress. + */ + com.google.protobuf.ByteString getPeerIpAddressBytes(); + + /** + * + * + *
+     * The current status of BGP.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * + * + *
+     * The current status of BGP.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return The status. + */ + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus getStatus(); + + /** + * + * + *
+     * BGP state as specified in RFC1771.
+     * 
+ * + * string state = 5; + * + * @return The state. + */ + java.lang.String getState(); + /** + * + * + *
+     * BGP state as specified in RFC1771.
+     * 
+ * + * string state = 5; + * + * @return The bytes for state. + */ + com.google.protobuf.ByteString getStateBytes(); + + /** + * + * + *
+     * Time this session has been up.
+     * Format:
+     *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+     * 
+ * + * string uptime = 6; + * + * @return The uptime. + */ + java.lang.String getUptime(); + /** + * + * + *
+     * Time this session has been up.
+     * Format:
+     *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+     * 
+ * + * string uptime = 6; + * + * @return The bytes for uptime. + */ + com.google.protobuf.ByteString getUptimeBytes(); + + /** + * + * + *
+     * Time this session has been up, in seconds.
+     * 
+ * + * int64 uptime_seconds = 7; + * + * @return The uptimeSeconds. + */ + long getUptimeSeconds(); + + /** + * + * + *
+     * A collection of counts for prefixes.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + * + * @return Whether the prefixCounter field is set. + */ + boolean hasPrefixCounter(); + /** + * + * + *
+     * A collection of counts for prefixes.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + * + * @return The prefixCounter. + */ + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter getPrefixCounter(); + /** + * + * + *
+     * A collection of counts for prefixes.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder getPrefixCounterOrBuilder(); + } + /** + * + * + *
+   * Status of a BGP peer.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus} + */ + public static final class BgpPeerStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus) + BgpPeerStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use BgpPeerStatus.newBuilder() to construct. + private BgpPeerStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BgpPeerStatus() { + name_ = ""; + ipAddress_ = ""; + peerIpAddress_ = ""; + status_ = 0; + state_ = ""; + uptime_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BgpPeerStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.class, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder.class); + } + + /** + * + * + *
+     * Status of the BGP peer: {UP, DOWN}
+     * 
+ * + * Protobuf enum {@code google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus} + */ + public enum BgpStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default status indicating BGP session is in unknown state.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + * + * + *
+       * The UP status indicating BGP session is established.
+       * 
+ * + * UP = 1; + */ + UP(1), + /** + * + * + *
+       * The DOWN state indicating BGP session is not established yet.
+       * 
+ * + * DOWN = 2; + */ + DOWN(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default status indicating BGP session is in unknown state.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + * + * + *
+       * The UP status indicating BGP session is established.
+       * 
+ * + * UP = 1; + */ + public static final int UP_VALUE = 1; + /** + * + * + *
+       * The DOWN state indicating BGP session is not established yet.
+       * 
+ * + * DOWN = 2; + */ + public static final int DOWN_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 BgpStatus 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 BgpStatus forNumber(int value) { + switch (value) { + case 0: + return UNKNOWN; + case 1: + return UP; + case 2: + return DOWN; + 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 BgpStatus findValueByNumber(int number) { + return BgpStatus.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.edgenetwork.v1.RouterStatus.BgpPeerStatus.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final BgpStatus[] VALUES = values(); + + public static BgpStatus 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 BgpStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of this BGP peer. Unique within the Routers resource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * Name of this BGP peer. Unique within the Routers resource.
+     * 
+ * + * string name = 1; + * + * @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 IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + /** + * + * + *
+     * IP address of the local BGP interface.
+     * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + 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(); + ipAddress_ = s; + return s; + } + } + /** + * + * + *
+     * IP address of the local BGP interface.
+     * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_IP_ADDRESS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object peerIpAddress_ = ""; + /** + * + * + *
+     * IP address of the remote BGP interface.
+     * 
+ * + * string peer_ip_address = 3; + * + * @return The peerIpAddress. + */ + @java.lang.Override + public java.lang.String getPeerIpAddress() { + java.lang.Object ref = peerIpAddress_; + 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(); + peerIpAddress_ = s; + return s; + } + } + /** + * + * + *
+     * IP address of the remote BGP interface.
+     * 
+ * + * string peer_ip_address = 3; + * + * @return The bytes for peerIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeerIpAddressBytes() { + java.lang.Object ref = peerIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 4; + private int status_ = 0; + /** + * + * + *
+     * The current status of BGP.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+     * The current status of BGP.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus getStatus() { + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus result = + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus.forNumber(status_); + return result == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus.UNRECOGNIZED + : result; + } + + public static final int STATE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object state_ = ""; + /** + * + * + *
+     * BGP state as specified in RFC1771.
+     * 
+ * + * string state = 5; + * + * @return The state. + */ + @java.lang.Override + public java.lang.String getState() { + java.lang.Object ref = state_; + 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(); + state_ = s; + return s; + } + } + /** + * + * + *
+     * BGP state as specified in RFC1771.
+     * 
+ * + * string state = 5; + * + * @return The bytes for state. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPTIME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uptime_ = ""; + /** + * + * + *
+     * Time this session has been up.
+     * Format:
+     *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+     * 
+ * + * string uptime = 6; + * + * @return The uptime. + */ + @java.lang.Override + public java.lang.String getUptime() { + java.lang.Object ref = uptime_; + 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(); + uptime_ = s; + return s; + } + } + /** + * + * + *
+     * Time this session has been up.
+     * Format:
+     *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+     * 
+ * + * string uptime = 6; + * + * @return The bytes for uptime. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUptimeBytes() { + java.lang.Object ref = uptime_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uptime_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPTIME_SECONDS_FIELD_NUMBER = 7; + private long uptimeSeconds_ = 0L; + /** + * + * + *
+     * Time this session has been up, in seconds.
+     * 
+ * + * int64 uptime_seconds = 7; + * + * @return The uptimeSeconds. + */ + @java.lang.Override + public long getUptimeSeconds() { + return uptimeSeconds_; + } + + public static final int PREFIX_COUNTER_FIELD_NUMBER = 8; + private com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefixCounter_; + /** + * + * + *
+     * A collection of counts for prefixes.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + * + * @return Whether the prefixCounter field is set. + */ + @java.lang.Override + public boolean hasPrefixCounter() { + return prefixCounter_ != null; + } + /** + * + * + *
+     * A collection of counts for prefixes.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + * + * @return The prefixCounter. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter getPrefixCounter() { + return prefixCounter_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.getDefaultInstance() + : prefixCounter_; + } + /** + * + * + *
+     * A collection of counts for prefixes.
+     * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder + getPrefixCounterOrBuilder() { + return prefixCounter_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.getDefaultInstance() + : prefixCounter_; + } + + 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(ipAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, peerIpAddress_); + } + if (status_ + != com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus.UNKNOWN + .getNumber()) { + output.writeEnum(4, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uptime_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, uptime_); + } + if (uptimeSeconds_ != 0L) { + output.writeInt64(7, uptimeSeconds_); + } + if (prefixCounter_ != null) { + output.writeMessage(8, getPrefixCounter()); + } + 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(ipAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, peerIpAddress_); + } + if (status_ + != com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus.UNKNOWN + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uptime_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, uptime_); + } + if (uptimeSeconds_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, uptimeSeconds_); + } + if (prefixCounter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPrefixCounter()); + } + 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.edgenetwork.v1.RouterStatus.BgpPeerStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus other = + (com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus) obj; + + if (!getName().equals(other.getName())) return false; + if (!getIpAddress().equals(other.getIpAddress())) return false; + if (!getPeerIpAddress().equals(other.getPeerIpAddress())) return false; + if (status_ != other.status_) return false; + if (!getState().equals(other.getState())) return false; + if (!getUptime().equals(other.getUptime())) return false; + if (getUptimeSeconds() != other.getUptimeSeconds()) return false; + if (hasPrefixCounter() != other.hasPrefixCounter()) return false; + if (hasPrefixCounter()) { + if (!getPrefixCounter().equals(other.getPrefixCounter())) 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) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PEER_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getPeerIpAddress().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + hash = (37 * hash) + UPTIME_FIELD_NUMBER; + hash = (53 * hash) + getUptime().hashCode(); + hash = (37 * hash) + UPTIME_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUptimeSeconds()); + if (hasPrefixCounter()) { + hash = (37 * hash) + PREFIX_COUNTER_FIELD_NUMBER; + hash = (53 * hash) + getPrefixCounter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus 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.edgenetwork.v1.RouterStatus.BgpPeerStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus 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.edgenetwork.v1.RouterStatus.BgpPeerStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus 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.edgenetwork.v1.RouterStatus.BgpPeerStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus 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.edgenetwork.v1.RouterStatus.BgpPeerStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus 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.edgenetwork.v1.RouterStatus.BgpPeerStatus 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; + } + /** + * + * + *
+     * Status of a BGP peer.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus) + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.class, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + ipAddress_ = ""; + peerIpAddress_ = ""; + status_ = 0; + state_ = ""; + uptime_ = ""; + uptimeSeconds_ = 0L; + prefixCounter_ = null; + if (prefixCounterBuilder_ != null) { + prefixCounterBuilder_.dispose(); + prefixCounterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_BgpPeerStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus build() { + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus buildPartial() { + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus result = + new com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.peerIpAddress_ = peerIpAddress_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.status_ = status_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uptime_ = uptime_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.uptimeSeconds_ = uptimeSeconds_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.prefixCounter_ = + prefixCounterBuilder_ == null ? prefixCounter_ : prefixCounterBuilder_.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.edgenetwork.v1.RouterStatus.BgpPeerStatus) { + return mergeFrom((com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus other) { + if (other + == com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPeerIpAddress().isEmpty()) { + peerIpAddress_ = other.peerIpAddress_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.getState().isEmpty()) { + state_ = other.state_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUptime().isEmpty()) { + uptime_ = other.uptime_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getUptimeSeconds() != 0L) { + setUptimeSeconds(other.getUptimeSeconds()); + } + if (other.hasPrefixCounter()) { + mergePrefixCounter(other.getPrefixCounter()); + } + 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: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + peerIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + status_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + uptime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + uptimeSeconds_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage(getPrefixCounterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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_ = ""; + /** + * + * + *
+       * Name of this BGP peer. Unique within the Routers resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Routers resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Routers resource.
+       * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Routers resource.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of this BGP peer. Unique within the Routers resource.
+       * 
+ * + * string name = 1; + * + * @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 ipAddress_ = ""; + /** + * + * + *
+       * IP address of the local BGP interface.
+       * 
+ * + * string ip_address = 2; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP address of the local BGP interface.
+       * 
+ * + * string ip_address = 2; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP address of the local BGP interface.
+       * 
+ * + * string ip_address = 2; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * IP address of the local BGP interface.
+       * 
+ * + * string ip_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * IP address of the local BGP interface.
+       * 
+ * + * string ip_address = 2; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object peerIpAddress_ = ""; + /** + * + * + *
+       * IP address of the remote BGP interface.
+       * 
+ * + * string peer_ip_address = 3; + * + * @return The peerIpAddress. + */ + public java.lang.String getPeerIpAddress() { + java.lang.Object ref = peerIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP address of the remote BGP interface.
+       * 
+ * + * string peer_ip_address = 3; + * + * @return The bytes for peerIpAddress. + */ + public com.google.protobuf.ByteString getPeerIpAddressBytes() { + java.lang.Object ref = peerIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peerIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP address of the remote BGP interface.
+       * 
+ * + * string peer_ip_address = 3; + * + * @param value The peerIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPeerIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peerIpAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * IP address of the remote BGP interface.
+       * 
+ * + * string peer_ip_address = 3; + * + * @return This builder for chaining. + */ + public Builder clearPeerIpAddress() { + peerIpAddress_ = getDefaultInstance().getPeerIpAddress(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * IP address of the remote BGP interface.
+       * 
+ * + * string peer_ip_address = 3; + * + * @param value The bytes for peerIpAddress to set. + * @return This builder for chaining. + */ + public Builder setPeerIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peerIpAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int status_ = 0; + /** + * + * + *
+       * The current status of BGP.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+       * The current status of BGP.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The current status of BGP.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus getStatus() { + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus result = + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus.forNumber(status_); + return result == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The current status of BGP.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The current status of BGP.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus status = 4; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000008); + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object state_ = ""; + /** + * + * + *
+       * BGP state as specified in RFC1771.
+       * 
+ * + * string state = 5; + * + * @return The state. + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * BGP state as specified in RFC1771.
+       * 
+ * + * string state = 5; + * + * @return The bytes for state. + */ + public com.google.protobuf.ByteString getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * BGP state as specified in RFC1771.
+       * 
+ * + * string state = 5; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * BGP state as specified in RFC1771.
+       * 
+ * + * string state = 5; + * + * @return This builder for chaining. + */ + public Builder clearState() { + state_ = getDefaultInstance().getState(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * BGP state as specified in RFC1771.
+       * 
+ * + * string state = 5; + * + * @param value The bytes for state to set. + * @return This builder for chaining. + */ + public Builder setStateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uptime_ = ""; + /** + * + * + *
+       * Time this session has been up.
+       * Format:
+       *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+       * 
+ * + * string uptime = 6; + * + * @return The uptime. + */ + public java.lang.String getUptime() { + java.lang.Object ref = uptime_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uptime_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Time this session has been up.
+       * Format:
+       *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+       * 
+ * + * string uptime = 6; + * + * @return The bytes for uptime. + */ + public com.google.protobuf.ByteString getUptimeBytes() { + java.lang.Object ref = uptime_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uptime_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Time this session has been up.
+       * Format:
+       *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+       * 
+ * + * string uptime = 6; + * + * @param value The uptime to set. + * @return This builder for chaining. + */ + public Builder setUptime(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uptime_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Time this session has been up.
+       * Format:
+       *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+       * 
+ * + * string uptime = 6; + * + * @return This builder for chaining. + */ + public Builder clearUptime() { + uptime_ = getDefaultInstance().getUptime(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+       * Time this session has been up.
+       * Format:
+       *  14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
+       * 
+ * + * string uptime = 6; + * + * @param value The bytes for uptime to set. + * @return This builder for chaining. + */ + public Builder setUptimeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uptime_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long uptimeSeconds_; + /** + * + * + *
+       * Time this session has been up, in seconds.
+       * 
+ * + * int64 uptime_seconds = 7; + * + * @return The uptimeSeconds. + */ + @java.lang.Override + public long getUptimeSeconds() { + return uptimeSeconds_; + } + /** + * + * + *
+       * Time this session has been up, in seconds.
+       * 
+ * + * int64 uptime_seconds = 7; + * + * @param value The uptimeSeconds to set. + * @return This builder for chaining. + */ + public Builder setUptimeSeconds(long value) { + + uptimeSeconds_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Time this session has been up, in seconds.
+       * 
+ * + * int64 uptime_seconds = 7; + * + * @return This builder for chaining. + */ + public Builder clearUptimeSeconds() { + bitField0_ = (bitField0_ & ~0x00000040); + uptimeSeconds_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefixCounter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder> + prefixCounterBuilder_; + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + * + * @return Whether the prefixCounter field is set. + */ + public boolean hasPrefixCounter() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + * + * @return The prefixCounter. + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter getPrefixCounter() { + if (prefixCounterBuilder_ == null) { + return prefixCounter_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.getDefaultInstance() + : prefixCounter_; + } else { + return prefixCounterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + public Builder setPrefixCounter( + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter value) { + if (prefixCounterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + prefixCounter_ = value; + } else { + prefixCounterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + public Builder setPrefixCounter( + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder builderForValue) { + if (prefixCounterBuilder_ == null) { + prefixCounter_ = builderForValue.build(); + } else { + prefixCounterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + public Builder mergePrefixCounter( + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter value) { + if (prefixCounterBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && prefixCounter_ != null + && prefixCounter_ + != com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter + .getDefaultInstance()) { + getPrefixCounterBuilder().mergeFrom(value); + } else { + prefixCounter_ = value; + } + } else { + prefixCounterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + public Builder clearPrefixCounter() { + bitField0_ = (bitField0_ & ~0x00000080); + prefixCounter_ = null; + if (prefixCounterBuilder_ != null) { + prefixCounterBuilder_.dispose(); + prefixCounterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder + getPrefixCounterBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getPrefixCounterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder + getPrefixCounterOrBuilder() { + if (prefixCounterBuilder_ != null) { + return prefixCounterBuilder_.getMessageOrBuilder(); + } else { + return prefixCounter_ == null + ? com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.getDefaultInstance() + : prefixCounter_; + } + } + /** + * + * + *
+       * A collection of counts for prefixes.
+       * 
+ * + * .google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter prefix_counter = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder> + getPrefixCounterFieldBuilder() { + if (prefixCounterBuilder_ == null) { + prefixCounterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder>( + getPrefixCounter(), getParentForChildren(), isClean()); + prefixCounter_ = null; + } + return prefixCounterBuilder_; + } + + @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.edgenetwork.v1.RouterStatus.BgpPeerStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus) + private static final com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus(); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BgpPeerStatus 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.edgenetwork.v1.RouterStatus.BgpPeerStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PrefixCounterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Number of prefixes advertised.
+     * 
+ * + * int64 advertised = 1; + * + * @return The advertised. + */ + long getAdvertised(); + + /** + * + * + *
+     * Number of prefixes denied.
+     * 
+ * + * int64 denied = 2; + * + * @return The denied. + */ + long getDenied(); + + /** + * + * + *
+     * Number of prefixes received.
+     * 
+ * + * int64 received = 3; + * + * @return The received. + */ + long getReceived(); + + /** + * + * + *
+     * Number of prefixes sent.
+     * 
+ * + * int64 sent = 4; + * + * @return The sent. + */ + long getSent(); + + /** + * + * + *
+     * Number of prefixes suppressed.
+     * 
+ * + * int64 suppressed = 5; + * + * @return The suppressed. + */ + long getSuppressed(); + + /** + * + * + *
+     * Number of prefixes withdrawn.
+     * 
+ * + * int64 withdrawn = 6; + * + * @return The withdrawn. + */ + long getWithdrawn(); + } + /** + * + * + *
+   * PrefixCounter contains a collection of prefixes related counts.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter} + */ + public static final class PrefixCounter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter) + PrefixCounterOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrefixCounter.newBuilder() to construct. + private PrefixCounter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrefixCounter() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrefixCounter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.class, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder.class); + } + + public static final int ADVERTISED_FIELD_NUMBER = 1; + private long advertised_ = 0L; + /** + * + * + *
+     * Number of prefixes advertised.
+     * 
+ * + * int64 advertised = 1; + * + * @return The advertised. + */ + @java.lang.Override + public long getAdvertised() { + return advertised_; + } + + public static final int DENIED_FIELD_NUMBER = 2; + private long denied_ = 0L; + /** + * + * + *
+     * Number of prefixes denied.
+     * 
+ * + * int64 denied = 2; + * + * @return The denied. + */ + @java.lang.Override + public long getDenied() { + return denied_; + } + + public static final int RECEIVED_FIELD_NUMBER = 3; + private long received_ = 0L; + /** + * + * + *
+     * Number of prefixes received.
+     * 
+ * + * int64 received = 3; + * + * @return The received. + */ + @java.lang.Override + public long getReceived() { + return received_; + } + + public static final int SENT_FIELD_NUMBER = 4; + private long sent_ = 0L; + /** + * + * + *
+     * Number of prefixes sent.
+     * 
+ * + * int64 sent = 4; + * + * @return The sent. + */ + @java.lang.Override + public long getSent() { + return sent_; + } + + public static final int SUPPRESSED_FIELD_NUMBER = 5; + private long suppressed_ = 0L; + /** + * + * + *
+     * Number of prefixes suppressed.
+     * 
+ * + * int64 suppressed = 5; + * + * @return The suppressed. + */ + @java.lang.Override + public long getSuppressed() { + return suppressed_; + } + + public static final int WITHDRAWN_FIELD_NUMBER = 6; + private long withdrawn_ = 0L; + /** + * + * + *
+     * Number of prefixes withdrawn.
+     * 
+ * + * int64 withdrawn = 6; + * + * @return The withdrawn. + */ + @java.lang.Override + public long getWithdrawn() { + return withdrawn_; + } + + 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 (advertised_ != 0L) { + output.writeInt64(1, advertised_); + } + if (denied_ != 0L) { + output.writeInt64(2, denied_); + } + if (received_ != 0L) { + output.writeInt64(3, received_); + } + if (sent_ != 0L) { + output.writeInt64(4, sent_); + } + if (suppressed_ != 0L) { + output.writeInt64(5, suppressed_); + } + if (withdrawn_ != 0L) { + output.writeInt64(6, withdrawn_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (advertised_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, advertised_); + } + if (denied_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, denied_); + } + if (received_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, received_); + } + if (sent_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, sent_); + } + if (suppressed_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, suppressed_); + } + if (withdrawn_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, withdrawn_); + } + 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.edgenetwork.v1.RouterStatus.PrefixCounter)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter other = + (com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter) obj; + + if (getAdvertised() != other.getAdvertised()) return false; + if (getDenied() != other.getDenied()) return false; + if (getReceived() != other.getReceived()) return false; + if (getSent() != other.getSent()) return false; + if (getSuppressed() != other.getSuppressed()) return false; + if (getWithdrawn() != other.getWithdrawn()) 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) + ADVERTISED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAdvertised()); + hash = (37 * hash) + DENIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDenied()); + hash = (37 * hash) + RECEIVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getReceived()); + hash = (37 * hash) + SENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSent()); + hash = (37 * hash) + SUPPRESSED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuppressed()); + hash = (37 * hash) + WITHDRAWN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getWithdrawn()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter 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.edgenetwork.v1.RouterStatus.PrefixCounter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter 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.edgenetwork.v1.RouterStatus.PrefixCounter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter 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.edgenetwork.v1.RouterStatus.PrefixCounter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter 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.edgenetwork.v1.RouterStatus.PrefixCounter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter 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.edgenetwork.v1.RouterStatus.PrefixCounter 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; + } + /** + * + * + *
+     * PrefixCounter contains a collection of prefixes related counts.
+     * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter) + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.class, + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + advertised_ = 0L; + denied_ = 0L; + received_ = 0L; + sent_ = 0L; + suppressed_ = 0L; + withdrawn_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_PrefixCounter_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter + getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter build() { + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter buildPartial() { + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter result = + new com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.advertised_ = advertised_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.denied_ = denied_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.received_ = received_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sent_ = sent_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.suppressed_ = suppressed_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.withdrawn_ = withdrawn_; + } + } + + @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.edgenetwork.v1.RouterStatus.PrefixCounter) { + return mergeFrom((com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter other) { + if (other + == com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter.getDefaultInstance()) + return this; + if (other.getAdvertised() != 0L) { + setAdvertised(other.getAdvertised()); + } + if (other.getDenied() != 0L) { + setDenied(other.getDenied()); + } + if (other.getReceived() != 0L) { + setReceived(other.getReceived()); + } + if (other.getSent() != 0L) { + setSent(other.getSent()); + } + if (other.getSuppressed() != 0L) { + setSuppressed(other.getSuppressed()); + } + if (other.getWithdrawn() != 0L) { + setWithdrawn(other.getWithdrawn()); + } + 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: + { + advertised_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + denied_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + received_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + sent_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + suppressed_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + withdrawn_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 long advertised_; + /** + * + * + *
+       * Number of prefixes advertised.
+       * 
+ * + * int64 advertised = 1; + * + * @return The advertised. + */ + @java.lang.Override + public long getAdvertised() { + return advertised_; + } + /** + * + * + *
+       * Number of prefixes advertised.
+       * 
+ * + * int64 advertised = 1; + * + * @param value The advertised to set. + * @return This builder for chaining. + */ + public Builder setAdvertised(long value) { + + advertised_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of prefixes advertised.
+       * 
+ * + * int64 advertised = 1; + * + * @return This builder for chaining. + */ + public Builder clearAdvertised() { + bitField0_ = (bitField0_ & ~0x00000001); + advertised_ = 0L; + onChanged(); + return this; + } + + private long denied_; + /** + * + * + *
+       * Number of prefixes denied.
+       * 
+ * + * int64 denied = 2; + * + * @return The denied. + */ + @java.lang.Override + public long getDenied() { + return denied_; + } + /** + * + * + *
+       * Number of prefixes denied.
+       * 
+ * + * int64 denied = 2; + * + * @param value The denied to set. + * @return This builder for chaining. + */ + public Builder setDenied(long value) { + + denied_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of prefixes denied.
+       * 
+ * + * int64 denied = 2; + * + * @return This builder for chaining. + */ + public Builder clearDenied() { + bitField0_ = (bitField0_ & ~0x00000002); + denied_ = 0L; + onChanged(); + return this; + } + + private long received_; + /** + * + * + *
+       * Number of prefixes received.
+       * 
+ * + * int64 received = 3; + * + * @return The received. + */ + @java.lang.Override + public long getReceived() { + return received_; + } + /** + * + * + *
+       * Number of prefixes received.
+       * 
+ * + * int64 received = 3; + * + * @param value The received to set. + * @return This builder for chaining. + */ + public Builder setReceived(long value) { + + received_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of prefixes received.
+       * 
+ * + * int64 received = 3; + * + * @return This builder for chaining. + */ + public Builder clearReceived() { + bitField0_ = (bitField0_ & ~0x00000004); + received_ = 0L; + onChanged(); + return this; + } + + private long sent_; + /** + * + * + *
+       * Number of prefixes sent.
+       * 
+ * + * int64 sent = 4; + * + * @return The sent. + */ + @java.lang.Override + public long getSent() { + return sent_; + } + /** + * + * + *
+       * Number of prefixes sent.
+       * 
+ * + * int64 sent = 4; + * + * @param value The sent to set. + * @return This builder for chaining. + */ + public Builder setSent(long value) { + + sent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of prefixes sent.
+       * 
+ * + * int64 sent = 4; + * + * @return This builder for chaining. + */ + public Builder clearSent() { + bitField0_ = (bitField0_ & ~0x00000008); + sent_ = 0L; + onChanged(); + return this; + } + + private long suppressed_; + /** + * + * + *
+       * Number of prefixes suppressed.
+       * 
+ * + * int64 suppressed = 5; + * + * @return The suppressed. + */ + @java.lang.Override + public long getSuppressed() { + return suppressed_; + } + /** + * + * + *
+       * Number of prefixes suppressed.
+       * 
+ * + * int64 suppressed = 5; + * + * @param value The suppressed to set. + * @return This builder for chaining. + */ + public Builder setSuppressed(long value) { + + suppressed_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of prefixes suppressed.
+       * 
+ * + * int64 suppressed = 5; + * + * @return This builder for chaining. + */ + public Builder clearSuppressed() { + bitField0_ = (bitField0_ & ~0x00000010); + suppressed_ = 0L; + onChanged(); + return this; + } + + private long withdrawn_; + /** + * + * + *
+       * Number of prefixes withdrawn.
+       * 
+ * + * int64 withdrawn = 6; + * + * @return The withdrawn. + */ + @java.lang.Override + public long getWithdrawn() { + return withdrawn_; + } + /** + * + * + *
+       * Number of prefixes withdrawn.
+       * 
+ * + * int64 withdrawn = 6; + * + * @param value The withdrawn to set. + * @return This builder for chaining. + */ + public Builder setWithdrawn(long value) { + + withdrawn_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of prefixes withdrawn.
+       * 
+ * + * int64 withdrawn = 6; + * + * @return This builder for chaining. + */ + public Builder clearWithdrawn() { + bitField0_ = (bitField0_ & ~0x00000020); + withdrawn_ = 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.edgenetwork.v1.RouterStatus.PrefixCounter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter) + private static final com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter(); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrefixCounter 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.edgenetwork.v1.RouterStatus.PrefixCounter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NETWORK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * The canonical name of the network to which this router belongs.
+   * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The canonical name of the network to which this router belongs.
+   * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BGP_PEER_STATUS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List bgpPeerStatus_; + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + @java.lang.Override + public java.util.List + getBgpPeerStatusList() { + return bgpPeerStatus_; + } + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder> + getBgpPeerStatusOrBuilderList() { + return bgpPeerStatus_; + } + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + @java.lang.Override + public int getBgpPeerStatusCount() { + return bgpPeerStatus_.size(); + } + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus getBgpPeerStatus(int index) { + return bgpPeerStatus_.get(index); + } + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder + getBgpPeerStatusOrBuilder(int index) { + return bgpPeerStatus_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + for (int i = 0; i < bgpPeerStatus_.size(); i++) { + output.writeMessage(2, bgpPeerStatus_.get(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(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + for (int i = 0; i < bgpPeerStatus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, bgpPeerStatus_.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.edgenetwork.v1.RouterStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.RouterStatus other = + (com.google.cloud.edgenetwork.v1.RouterStatus) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getBgpPeerStatusList().equals(other.getBgpPeerStatusList())) 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (getBgpPeerStatusCount() > 0) { + hash = (37 * hash) + BGP_PEER_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getBgpPeerStatusList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus 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.edgenetwork.v1.RouterStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus 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.edgenetwork.v1.RouterStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus 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.edgenetwork.v1.RouterStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus 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.edgenetwork.v1.RouterStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus 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.edgenetwork.v1.RouterStatus 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; + } + /** + * + * + *
+   * Describing the current status of a router.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.RouterStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.RouterStatus) + com.google.cloud.edgenetwork.v1.RouterStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.RouterStatus.class, + com.google.cloud.edgenetwork.v1.RouterStatus.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.RouterStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + if (bgpPeerStatusBuilder_ == null) { + bgpPeerStatus_ = java.util.Collections.emptyList(); + } else { + bgpPeerStatus_ = null; + bgpPeerStatusBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_RouterStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus build() { + com.google.cloud.edgenetwork.v1.RouterStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterStatus buildPartial() { + com.google.cloud.edgenetwork.v1.RouterStatus result = + new com.google.cloud.edgenetwork.v1.RouterStatus(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.edgenetwork.v1.RouterStatus result) { + if (bgpPeerStatusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + bgpPeerStatus_ = java.util.Collections.unmodifiableList(bgpPeerStatus_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bgpPeerStatus_ = bgpPeerStatus_; + } else { + result.bgpPeerStatus_ = bgpPeerStatusBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.RouterStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + } + } + + @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.edgenetwork.v1.RouterStatus) { + return mergeFrom((com.google.cloud.edgenetwork.v1.RouterStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.RouterStatus other) { + if (other == com.google.cloud.edgenetwork.v1.RouterStatus.getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (bgpPeerStatusBuilder_ == null) { + if (!other.bgpPeerStatus_.isEmpty()) { + if (bgpPeerStatus_.isEmpty()) { + bgpPeerStatus_ = other.bgpPeerStatus_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.addAll(other.bgpPeerStatus_); + } + onChanged(); + } + } else { + if (!other.bgpPeerStatus_.isEmpty()) { + if (bgpPeerStatusBuilder_.isEmpty()) { + bgpPeerStatusBuilder_.dispose(); + bgpPeerStatusBuilder_ = null; + bgpPeerStatus_ = other.bgpPeerStatus_; + bitField0_ = (bitField0_ & ~0x00000002); + bgpPeerStatusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBgpPeerStatusFieldBuilder() + : null; + } else { + bgpPeerStatusBuilder_.addAllMessages(other.bgpPeerStatus_); + } + } + } + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus m = + input.readMessage( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.parser(), + extensionRegistry); + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.add(m); + } else { + bgpPeerStatusBuilder_.addMessage(m); + } + 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 network_ = ""; + /** + * + * + *
+     * The canonical name of the network to which this router belongs.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The canonical name of the network to which this router belongs.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The canonical name of the network to which this router belongs.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The canonical name of the network to which this router belongs.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The canonical name of the network to which this router belongs.
+     * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + bgpPeerStatus_ = java.util.Collections.emptyList(); + + private void ensureBgpPeerStatusIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bgpPeerStatus_ = + new java.util.ArrayList( + bgpPeerStatus_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder> + bgpPeerStatusBuilder_; + + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public java.util.List + getBgpPeerStatusList() { + if (bgpPeerStatusBuilder_ == null) { + return java.util.Collections.unmodifiableList(bgpPeerStatus_); + } else { + return bgpPeerStatusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public int getBgpPeerStatusCount() { + if (bgpPeerStatusBuilder_ == null) { + return bgpPeerStatus_.size(); + } else { + return bgpPeerStatusBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus getBgpPeerStatus(int index) { + if (bgpPeerStatusBuilder_ == null) { + return bgpPeerStatus_.get(index); + } else { + return bgpPeerStatusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder setBgpPeerStatus( + int index, com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus value) { + if (bgpPeerStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.set(index, value); + onChanged(); + } else { + bgpPeerStatusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder setBgpPeerStatus( + int index, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder builderForValue) { + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.set(index, builderForValue.build()); + onChanged(); + } else { + bgpPeerStatusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder addBgpPeerStatus( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus value) { + if (bgpPeerStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.add(value); + onChanged(); + } else { + bgpPeerStatusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder addBgpPeerStatus( + int index, com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus value) { + if (bgpPeerStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.add(index, value); + onChanged(); + } else { + bgpPeerStatusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder addBgpPeerStatus( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder builderForValue) { + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.add(builderForValue.build()); + onChanged(); + } else { + bgpPeerStatusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder addBgpPeerStatus( + int index, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder builderForValue) { + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.add(index, builderForValue.build()); + onChanged(); + } else { + bgpPeerStatusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder addAllBgpPeerStatus( + java.lang.Iterable + values) { + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bgpPeerStatus_); + onChanged(); + } else { + bgpPeerStatusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder clearBgpPeerStatus() { + if (bgpPeerStatusBuilder_ == null) { + bgpPeerStatus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + bgpPeerStatusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public Builder removeBgpPeerStatus(int index) { + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.remove(index); + onChanged(); + } else { + bgpPeerStatusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder + getBgpPeerStatusBuilder(int index) { + return getBgpPeerStatusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder + getBgpPeerStatusOrBuilder(int index) { + if (bgpPeerStatusBuilder_ == null) { + return bgpPeerStatus_.get(index); + } else { + return bgpPeerStatusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder> + getBgpPeerStatusOrBuilderList() { + if (bgpPeerStatusBuilder_ != null) { + return bgpPeerStatusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bgpPeerStatus_); + } + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder + addBgpPeerStatusBuilder() { + return getBgpPeerStatusFieldBuilder() + .addBuilder( + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.getDefaultInstance()); + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder + addBgpPeerStatusBuilder(int index) { + return getBgpPeerStatusFieldBuilder() + .addBuilder( + index, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.getDefaultInstance()); + } + /** + * + * + *
+     * A list of BgpPeerStatus objects, describing all BGP peers related to this
+     * router.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + public java.util.List + getBgpPeerStatusBuilderList() { + return getBgpPeerStatusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder> + getBgpPeerStatusFieldBuilder() { + if (bgpPeerStatusBuilder_ == null) { + bgpPeerStatusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.Builder, + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder>( + bgpPeerStatus_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + bgpPeerStatus_ = null; + } + return bgpPeerStatusBuilder_; + } + + @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.edgenetwork.v1.RouterStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.RouterStatus) + private static final com.google.cloud.edgenetwork.v1.RouterStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.RouterStatus(); + } + + public static com.google.cloud.edgenetwork.v1.RouterStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouterStatus 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.edgenetwork.v1.RouterStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatusOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatusOrBuilder.java new file mode 100644 index 000000000000..95292cb08dbe --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/RouterStatusOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface RouterStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.RouterStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The canonical name of the network to which this router belongs.
+   * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The canonical name of the network to which this router belongs.
+   * 
+ * + * string network = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + java.util.List getBgpPeerStatusList(); + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus getBgpPeerStatus(int index); + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + int getBgpPeerStatusCount(); + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + java.util.List + getBgpPeerStatusOrBuilderList(); + /** + * + * + *
+   * A list of BgpPeerStatus objects, describing all BGP peers related to this
+   * router.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus bgp_peer_status = 2; + * + */ + com.google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatusOrBuilder getBgpPeerStatusOrBuilder( + int index); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ServiceProto.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ServiceProto.java new file mode 100644 index 000000000000..7854444f276f --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ServiceProto.java @@ -0,0 +1,820 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public final class ServiceProto { + private ServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListZonesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListZonesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_GetZoneRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListNetworksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListNetworksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_GetNetworkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_CreateNetworkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DeleteNetworkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListSubnetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListSubnetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_GetSubnetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_CreateSubnetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DeleteSubnetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListInterconnectsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListInterconnectsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_GetInterconnectRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListInterconnectAttachmentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_GetInterconnectAttachmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_CreateInterconnectAttachmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DeleteInterconnectAttachmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListRoutersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_ListRoutersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_GetRouterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_CreateRouterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DeleteRouterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseNetworkResponse_NetworkStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseInterconnectResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_DiagnoseRouterResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InitializeZoneRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_edgenetwork_v1_InitializeZoneResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/edgenetwork/v1/service.pr" + + "oto\022\033google.cloud.edgenetwork.v1\032\034google" + + "/api/annotations.proto\032\027google/api/clien" + + "t.proto\032\037google/api/field_behavior.proto" + + "\032\031google/api/resource.proto\032+google/clou" + + "d/edgenetwork/v1/resources.proto\032#google" + + "/longrunning/operations.proto\032\033google/pr" + + "otobuf/empty.proto\032 google/protobuf/fiel" + + "d_mask.proto\032\037google/protobuf/timestamp." + + "proto\"\225\001\n\020ListZonesRequest\0228\n\006parent\030\001 \001" + + "(\tB(\342A\001\002\372A!\022\037edgenetwork.googleapis.com/" + + "Zone\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\"s\n" + + "\021ListZonesResponse\0220\n\005zones\030\001 \003(\0132!.goog" + + "le.cloud.edgenetwork.v1.Zone\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"H\n\016Ge" + + "tZoneRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037edg" + + "enetwork.googleapis.com/Zone\"\233\001\n\023ListNet" + + "worksRequest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\022\"e" + + "dgenetwork.googleapis.com/Network\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"|\n\024ListNetwor" + + "ksResponse\0226\n\010networks\030\001 \003(\0132$.google.cl" + + "oud.edgenetwork.v1.Network\022\027\n\017next_page_" + + "token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"N\n\021GetN" + + "etworkRequest\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"ed" + + "genetwork.googleapis.com/Network\"\304\001\n\024Cre" + + "ateNetworkRequest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372" + + "A$\022\"edgenetwork.googleapis.com/Network\022\030" + + "\n\nnetwork_id\030\002 \001(\tB\004\342A\001\002\022;\n\007network\030\003 \001(" + + "\0132$.google.cloud.edgenetwork.v1.NetworkB" + + "\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"k\n\024Delet" + + "eNetworkRequest\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"" + + "edgenetwork.googleapis.com/Network\022\030\n\nre" + + "quest_id\030\002 \001(\tB\004\342A\001\001\"\231\001\n\022ListSubnetsRequ" + + "est\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!edgenetwor" + + "k.googleapis.com/Subnet\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\"y\n\023ListSubnetsResponse\022" + + "4\n\007subnets\030\001 \003(\0132#.google.cloud.edgenetw" + + "ork.v1.Subnet\022\027\n\017next_page_token\030\002 \001(\t\022\023" + + "\n\013unreachable\030\003 \003(\t\"L\n\020GetSubnetRequest\022" + + "8\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!edgenetwork.goog" + + "leapis.com/Subnet\"\277\001\n\023CreateSubnetReques" + + "t\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!edgenetwork." + + "googleapis.com/Subnet\022\027\n\tsubnet_id\030\002 \001(\t" + + "B\004\342A\001\002\0229\n\006subnet\030\003 \001(\0132#.google.cloud.ed" + + "genetwork.v1.SubnetB\004\342A\001\002\022\030\n\nrequest_id\030" + + "\004 \001(\tB\004\342A\001\001\"\241\001\n\023UpdateSubnetRequest\0225\n\013u" + + "pdate_mask\030\001 \001(\0132\032.google.protobuf.Field" + + "MaskB\004\342A\001\002\0229\n\006subnet\030\002 \001(\0132#.google.clou" + + "d.edgenetwork.v1.SubnetB\004\342A\001\002\022\030\n\nrequest" + + "_id\030\003 \001(\tB\004\342A\001\001\"i\n\023DeleteSubnetRequest\0228" + + "\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!edgenetwork.googl" + + "eapis.com/Subnet\022\030\n\nrequest_id\030\002 \001(\tB\004\342A" + + "\001\001\"\245\001\n\030ListInterconnectsRequest\022@\n\006paren" + + "t\030\001 \001(\tB0\342A\001\002\372A)\022\'edgenetwork.googleapis" + + ".com/Interconnect\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010orde" + + "r_by\030\005 \001(\t\"\213\001\n\031ListInterconnectsResponse" + + "\022@\n\rinterconnects\030\001 \003(\0132).google.cloud.e" + + "dgenetwork.v1.Interconnect\022\027\n\017next_page_" + + "token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"X\n\026GetI" + + "nterconnectRequest\022>\n\004name\030\001 \001(\tB0\342A\001\002\372A" + + ")\n\'edgenetwork.googleapis.com/Interconne" + + "ct\"\271\001\n\"ListInterconnectAttachmentsReques" + + "t\022J\n\006parent\030\001 \001(\tB:\342A\001\002\372A3\0221edgenetwork." + + "googleapis.com/InterconnectAttachment\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006" + + "filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\252\001\n#ListI" + + "nterconnectAttachmentsResponse\022U\n\030interc" + + "onnect_attachments\030\001 \003(\01323.google.cloud." + + "edgenetwork.v1.InterconnectAttachment\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 " + + "\003(\t\"l\n GetInterconnectAttachmentRequest\022" + + "H\n\004name\030\001 \001(\tB:\342A\001\002\372A3\n1edgenetwork.goog" + + "leapis.com/InterconnectAttachment\"\221\002\n#Cr" + + "eateInterconnectAttachmentRequest\022J\n\006par" + + "ent\030\001 \001(\tB:\342A\001\002\372A3\0221edgenetwork.googleap" + + "is.com/InterconnectAttachment\022(\n\032interco" + + "nnect_attachment_id\030\002 \001(\tB\004\342A\001\002\022Z\n\027inter" + + "connect_attachment\030\003 \001(\01323.google.cloud." + + "edgenetwork.v1.InterconnectAttachmentB\004\342" + + "A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\211\001\n#Delete" + + "InterconnectAttachmentRequest\022H\n\004name\030\001 " + + "\001(\tB:\342A\001\002\372A3\n1edgenetwork.googleapis.com" + + "/InterconnectAttachment\022\030\n\nrequest_id\030\002 " + + "\001(\tB\004\342A\001\001\"\231\001\n\022ListRoutersRequest\022:\n\006pare" + + "nt\030\001 \001(\tB*\342A\001\002\372A#\022!edgenetwork.googleapi" + + "s.com/Router\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\"y\n\023ListRoutersResponse\0224\n\007routers\030" + + "\001 \003(\0132#.google.cloud.edgenetwork.v1.Rout" + + "er\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachab" + + "le\030\003 \003(\t\"L\n\020GetRouterRequest\0228\n\004name\030\001 \001" + + "(\tB*\342A\001\002\372A#\n!edgenetwork.googleapis.com/" + + "Router\"\277\001\n\023CreateRouterRequest\022:\n\006parent" + + "\030\001 \001(\tB*\342A\001\002\372A#\022!edgenetwork.googleapis." + + "com/Router\022\027\n\trouter_id\030\002 \001(\tB\004\342A\001\002\0229\n\006r" + + "outer\030\003 \001(\0132#.google.cloud.edgenetwork.v" + + "1.RouterB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001" + + "\"\241\001\n\023UpdateRouterRequest\0225\n\013update_mask\030" + + "\001 \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\022" + + "9\n\006router\030\002 \001(\0132#.google.cloud.edgenetwo" + + "rk.v1.RouterB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004" + + "\342A\001\001\"i\n\023DeleteRouterRequest\0228\n\004name\030\001 \001(" + + "\tB*\342A\001\002\372A#\n!edgenetwork.googleapis.com/R" + + "outer\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\207\002\n\021Oper" + + "ationMetadata\0225\n\013create_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\0222\n\010end_time" + + "\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003" + + "\022\024\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A" + + "\001\003\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026requ" + + "ested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_ve" + + "rsion\030\007 \001(\tB\004\342A\001\003\"S\n\026DiagnoseNetworkRequ" + + "est\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"edgenetwork." + + "googleapis.com/Network\"\361\001\n\027DiagnoseNetwo" + + "rkResponse\022/\n\013update_time\030\001 \001(\0132\032.google" + + ".protobuf.Timestamp\022R\n\006result\030\002 \001(\0132B.go" + + "ogle.cloud.edgenetwork.v1.DiagnoseNetwor" + + "kResponse.NetworkStatus\032Q\n\rNetworkStatus" + + "\022@\n\rsubnet_status\030\001 \003(\0132).google.cloud.e" + + "dgenetwork.v1.SubnetStatus\"]\n\033DiagnoseIn" + + "terconnectRequest\022>\n\004name\030\001 \001(\tB0\342A\001\002\372A)" + + "\n\'edgenetwork.googleapis.com/Interconnec" + + "t\"\225\001\n\034DiagnoseInterconnectResponse\022/\n\013up" + + "date_time\030\001 \001(\0132\032.google.protobuf.Timest" + + "amp\022D\n\006result\030\002 \001(\01324.google.cloud.edgen" + + "etwork.v1.InterconnectDiagnostics\"Q\n\025Dia" + + "gnoseRouterRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A" + + "#\n!edgenetwork.googleapis.com/Router\"\204\001\n" + + "\026DiagnoseRouterResponse\022/\n\013update_time\030\001" + + " \001(\0132\032.google.protobuf.Timestamp\0229\n\006resu" + + "lt\030\002 \001(\0132).google.cloud.edgenetwork.v1.R" + + "outerStatus\"O\n\025InitializeZoneRequest\0226\n\004" + + "name\030\001 \001(\tB(\342A\001\002\372A!\n\037edgenetwork.googlea" + + "pis.com/Zone\"\030\n\026InitializeZoneResponse2\243" + + "+\n\013EdgeNetwork\022\301\001\n\016InitializeZone\0222.goog" + + "le.cloud.edgenetwork.v1.InitializeZoneRe" + + "quest\0323.google.cloud.edgenetwork.v1.Init" + + "ializeZoneResponse\"F\332A\004name\202\323\344\223\0029\"4/v1/{" + + "name=projects/*/locations/*/zones/*}:ini" + + "tialize:\001*\022\246\001\n\tListZones\022-.google.cloud." + + "edgenetwork.v1.ListZonesRequest\032..google" + + ".cloud.edgenetwork.v1.ListZonesResponse\"" + + ":\332A\006parent\202\323\344\223\002+\022)/v1/{parent=projects/*" + + "/locations/*}/zones\022\223\001\n\007GetZone\022+.google" + + ".cloud.edgenetwork.v1.GetZoneRequest\032!.g" + + "oogle.cloud.edgenetwork.v1.Zone\"8\332A\004name" + + "\202\323\344\223\002+\022)/v1/{name=projects/*/locations/*" + + "/zones/*}\022\272\001\n\014ListNetworks\0220.google.clou" + + "d.edgenetwork.v1.ListNetworksRequest\0321.g" + + "oogle.cloud.edgenetwork.v1.ListNetworksR" + + "esponse\"E\332A\006parent\202\323\344\223\0026\0224/v1/{parent=pr" + + "ojects/*/locations/*/zones/*}/networks\022\247" + + "\001\n\nGetNetwork\022..google.cloud.edgenetwork" + + ".v1.GetNetworkRequest\032$.google.cloud.edg" + + "enetwork.v1.Network\"C\332A\004name\202\323\344\223\0026\0224/v1/" + + "{name=projects/*/locations/*/zones/*/net" + + "works/*}\022\312\001\n\017DiagnoseNetwork\0223.google.cl" + + "oud.edgenetwork.v1.DiagnoseNetworkReques" + + "t\0324.google.cloud.edgenetwork.v1.Diagnose" + + "NetworkResponse\"L\332A\004name\202\323\344\223\002?\022=/v1/{nam" + + "e=projects/*/locations/*/zones/*/network" + + "s/*}:diagnose\022\344\001\n\rCreateNetwork\0221.google" + + ".cloud.edgenetwork.v1.CreateNetworkReque" + + "st\032\035.google.longrunning.Operation\"\200\001\312A\034\n" + + "\007Network\022\021OperationMetadata\332A\031parent,net" + + "work,network_id\202\323\344\223\002?\"4/v1/{parent=proje" + + "cts/*/locations/*/zones/*}/networks:\007net" + + "work\022\323\001\n\rDeleteNetwork\0221.google.cloud.ed" + + "genetwork.v1.DeleteNetworkRequest\032\035.goog" + + "le.longrunning.Operation\"p\312A*\n\025google.pr" + + "otobuf.Empty\022\021OperationMetadata\332A\004name\202\323" + + "\344\223\0026*4/v1/{name=projects/*/locations/*/z" + + "ones/*/networks/*}\022\266\001\n\013ListSubnets\022/.goo" + + "gle.cloud.edgenetwork.v1.ListSubnetsRequ" + + "est\0320.google.cloud.edgenetwork.v1.ListSu" + + "bnetsResponse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{par" + + "ent=projects/*/locations/*/zones/*}/subn" + + "ets\022\243\001\n\tGetSubnet\022-.google.cloud.edgenet" + + "work.v1.GetSubnetRequest\032#.google.cloud." + + "edgenetwork.v1.Subnet\"B\332A\004name\202\323\344\223\0025\0223/v" + + "1/{name=projects/*/locations/*/zones/*/s" + + "ubnets/*}\022\334\001\n\014CreateSubnet\0220.google.clou" + + "d.edgenetwork.v1.CreateSubnetRequest\032\035.g" + + "oogle.longrunning.Operation\"{\312A\033\n\006Subnet" + + "\022\021OperationMetadata\332A\027parent,subnet,subn" + + "et_id\202\323\344\223\002=\"3/v1/{parent=projects/*/loca" + + "tions/*/zones/*}/subnets:\006subnet\022\336\001\n\014Upd" + + "ateSubnet\0220.google.cloud.edgenetwork.v1." + + "UpdateSubnetRequest\032\035.google.longrunning" + + ".Operation\"}\312A\033\n\006Subnet\022\021OperationMetada" + + "ta\332A\022subnet,update_mask\202\323\344\223\002D2:/v1/{subn" + + "et.name=projects/*/locations/*/zones/*/s" + + "ubnets/*}:\006subnet\022\320\001\n\014DeleteSubnet\0220.goo" + + "gle.cloud.edgenetwork.v1.DeleteSubnetReq" + + "uest\032\035.google.longrunning.Operation\"o\312A*" + + "\n\025google.protobuf.Empty\022\021OperationMetada" + + "ta\332A\004name\202\323\344\223\0025*3/v1/{name=projects/*/lo" + + "cations/*/zones/*/subnets/*}\022\316\001\n\021ListInt" + + "erconnects\0225.google.cloud.edgenetwork.v1" + + ".ListInterconnectsRequest\0326.google.cloud" + + ".edgenetwork.v1.ListInterconnectsRespons" + + "e\"J\332A\006parent\202\323\344\223\002;\0229/v1/{parent=projects" + + "/*/locations/*/zones/*}/interconnects\022\273\001" + + "\n\017GetInterconnect\0223.google.cloud.edgenet" + + "work.v1.GetInterconnectRequest\032).google." + + "cloud.edgenetwork.v1.Interconnect\"H\332A\004na" + + "me\202\323\344\223\002;\0229/v1/{name=projects/*/locations" + + "/*/zones/*/interconnects/*}\022\336\001\n\024Diagnose" + + "Interconnect\0228.google.cloud.edgenetwork." + + "v1.DiagnoseInterconnectRequest\0329.google." + + "cloud.edgenetwork.v1.DiagnoseInterconnec" + + "tResponse\"Q\332A\004name\202\323\344\223\002D\022B/v1/{name=proj" + + "ects/*/locations/*/zones/*/interconnects" + + "/*}:diagnose\022\366\001\n\033ListInterconnectAttachm" + + "ents\022?.google.cloud.edgenetwork.v1.ListI" + + "nterconnectAttachmentsRequest\032@.google.c" + + "loud.edgenetwork.v1.ListInterconnectAtta" + + "chmentsResponse\"T\332A\006parent\202\323\344\223\002E\022C/v1/{p" + + "arent=projects/*/locations/*/zones/*}/in" + + "terconnectAttachments\022\343\001\n\031GetInterconnec" + + "tAttachment\022=.google.cloud.edgenetwork.v" + + "1.GetInterconnectAttachmentRequest\0323.goo" + + "gle.cloud.edgenetwork.v1.InterconnectAtt" + + "achment\"R\332A\004name\202\323\344\223\002E\022C/v1/{name=projec" + + "ts/*/locations/*/zones/*/interconnectAtt" + + "achments/*}\022\320\002\n\034CreateInterconnectAttach" + + "ment\022@.google.cloud.edgenetwork.v1.Creat" + + "eInterconnectAttachmentRequest\032\035.google." + + "longrunning.Operation\"\316\001\312A+\n\026Interconnec" + + "tAttachment\022\021OperationMetadata\332A9parent," + + "interconnect_attachment,interconnect_att" + + "achment_id\202\323\344\223\002^\"C/v1/{parent=projects/*" + + "/locations/*/zones/*}/interconnectAttach" + + "ments:\027interconnect_attachment\022\200\002\n\034Delet" + + "eInterconnectAttachment\022@.google.cloud.e" + + "dgenetwork.v1.DeleteInterconnectAttachme" + + "ntRequest\032\035.google.longrunning.Operation" + + "\"\177\312A*\n\025google.protobuf.Empty\022\021OperationM" + + "etadata\332A\004name\202\323\344\223\002E*C/v1/{name=projects" + + "/*/locations/*/zones/*/interconnectAttac" + + "hments/*}\022\266\001\n\013ListRouters\022/.google.cloud" + + ".edgenetwork.v1.ListRoutersRequest\0320.goo" + + "gle.cloud.edgenetwork.v1.ListRoutersResp" + + "onse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=proje" + + "cts/*/locations/*/zones/*}/routers\022\243\001\n\tG" + + "etRouter\022-.google.cloud.edgenetwork.v1.G" + + "etRouterRequest\032#.google.cloud.edgenetwo" + + "rk.v1.Router\"B\332A\004name\202\323\344\223\0025\0223/v1/{name=p" + + "rojects/*/locations/*/zones/*/routers/*}" + + "\022\306\001\n\016DiagnoseRouter\0222.google.cloud.edgen" + + "etwork.v1.DiagnoseRouterRequest\0323.google" + + ".cloud.edgenetwork.v1.DiagnoseRouterResp" + + "onse\"K\332A\004name\202\323\344\223\002>\022 + * Message describing Subnet object + * + * + * Protobuf type {@code google.cloud.edgenetwork.v1.Subnet} + */ +public final class Subnet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Subnet) + SubnetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Subnet.newBuilder() to construct. + private Subnet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Subnet() { + name_ = ""; + description_ = ""; + network_ = ""; + ipv4Cidr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + ipv6Cidr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Subnet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Subnet_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Subnet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Subnet.class, + com.google.cloud.edgenetwork.v1.Subnet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The canonical resource name of the subnet.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the subnet.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Subnet_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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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; + } + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * 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_ = ""; + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * 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 NETWORK_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + /** + * + * + *
+   * Required. The network that this subnetwork belongs to.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The network that this subnetwork belongs to.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IPV4_CIDR_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ipv4Cidr_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return A list containing the ipv4Cidr. + */ + public com.google.protobuf.ProtocolStringList getIpv4CidrList() { + return ipv4Cidr_; + } + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return The count of ipv4Cidr. + */ + public int getIpv4CidrCount() { + return ipv4Cidr_.size(); + } + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index of the element to return. + * @return The ipv4Cidr at the given index. + */ + public java.lang.String getIpv4Cidr(int index) { + return ipv4Cidr_.get(index); + } + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index of the value to return. + * @return The bytes of the ipv4Cidr at the given index. + */ + public com.google.protobuf.ByteString getIpv4CidrBytes(int index) { + return ipv4Cidr_.getByteString(index); + } + + public static final int IPV6_CIDR_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ipv6Cidr_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return A list containing the ipv6Cidr. + */ + public com.google.protobuf.ProtocolStringList getIpv6CidrList() { + return ipv6Cidr_; + } + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return The count of ipv6Cidr. + */ + public int getIpv6CidrCount() { + return ipv6Cidr_.size(); + } + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index of the element to return. + * @return The ipv6Cidr at the given index. + */ + public java.lang.String getIpv6Cidr(int index) { + return ipv6Cidr_.get(index); + } + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index of the value to return. + * @return The bytes of the ipv6Cidr at the given index. + */ + public com.google.protobuf.ByteString getIpv6CidrBytes(int index) { + return ipv6Cidr_.getByteString(index); + } + + public static final int VLAN_ID_FIELD_NUMBER = 9; + private int vlanId_ = 0; + /** + * + * + *
+   * Optional. VLAN id provided by user. If not specified we assign one
+   * automatically.
+   * 
+ * + * int32 vlan_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ResourceState getState() { + com.google.cloud.edgenetwork.v1.ResourceState result = + com.google.cloud.edgenetwork.v1.ResourceState.forNumber(state_); + return result == null ? com.google.cloud.edgenetwork.v1.ResourceState.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(network_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, network_); + } + for (int i = 0; i < ipv4Cidr_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, ipv4Cidr_.getRaw(i)); + } + for (int i = 0; i < ipv6Cidr_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, ipv6Cidr_.getRaw(i)); + } + if (vlanId_ != 0) { + output.writeInt32(9, vlanId_); + } + if (state_ != com.google.cloud.edgenetwork.v1.ResourceState.STATE_UNKNOWN.getNumber()) { + output.writeEnum(10, 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(network_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, network_); + } + { + int dataSize = 0; + for (int i = 0; i < ipv4Cidr_.size(); i++) { + dataSize += computeStringSizeNoTag(ipv4Cidr_.getRaw(i)); + } + size += dataSize; + size += 1 * getIpv4CidrList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < ipv6Cidr_.size(); i++) { + dataSize += computeStringSizeNoTag(ipv6Cidr_.getRaw(i)); + } + size += dataSize; + size += 1 * getIpv6CidrList().size(); + } + if (vlanId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, vlanId_); + } + if (state_ != com.google.cloud.edgenetwork.v1.ResourceState.STATE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, 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.edgenetwork.v1.Subnet)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Subnet other = (com.google.cloud.edgenetwork.v1.Subnet) 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 (!getNetwork().equals(other.getNetwork())) return false; + if (!getIpv4CidrList().equals(other.getIpv4CidrList())) return false; + if (!getIpv6CidrList().equals(other.getIpv6CidrList())) return false; + if (getVlanId() != other.getVlanId()) 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (getIpv4CidrCount() > 0) { + hash = (37 * hash) + IPV4_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getIpv4CidrList().hashCode(); + } + if (getIpv6CidrCount() > 0) { + hash = (37 * hash) + IPV6_CIDR_FIELD_NUMBER; + hash = (53 * hash) + getIpv6CidrList().hashCode(); + } + hash = (37 * hash) + VLAN_ID_FIELD_NUMBER; + hash = (53 * hash) + getVlanId(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Subnet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Subnet 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.edgenetwork.v1.Subnet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Subnet 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.edgenetwork.v1.Subnet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Subnet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Subnet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Subnet 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.edgenetwork.v1.Subnet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Subnet 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.edgenetwork.v1.Subnet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Subnet 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.edgenetwork.v1.Subnet 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; + } + /** + * + * + *
+   * Message describing Subnet object
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Subnet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Subnet) + com.google.cloud.edgenetwork.v1.SubnetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Subnet_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Subnet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Subnet.class, + com.google.cloud.edgenetwork.v1.Subnet.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Subnet.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_ = ""; + network_ = ""; + ipv4Cidr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + ipv6Cidr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + vlanId_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Subnet_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Subnet getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Subnet build() { + com.google.cloud.edgenetwork.v1.Subnet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Subnet buildPartial() { + com.google.cloud.edgenetwork.v1.Subnet result = + new com.google.cloud.edgenetwork.v1.Subnet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Subnet 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.network_ = network_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + ipv4Cidr_.makeImmutable(); + result.ipv4Cidr_ = ipv4Cidr_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + ipv6Cidr_.makeImmutable(); + result.ipv6Cidr_ = ipv6Cidr_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.vlanId_ = vlanId_; + } + if (((from_bitField0_ & 0x00000200) != 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.edgenetwork.v1.Subnet) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Subnet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Subnet other) { + if (other == com.google.cloud.edgenetwork.v1.Subnet.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.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.ipv4Cidr_.isEmpty()) { + if (ipv4Cidr_.isEmpty()) { + ipv4Cidr_ = other.ipv4Cidr_; + bitField0_ |= 0x00000040; + } else { + ensureIpv4CidrIsMutable(); + ipv4Cidr_.addAll(other.ipv4Cidr_); + } + onChanged(); + } + if (!other.ipv6Cidr_.isEmpty()) { + if (ipv6Cidr_.isEmpty()) { + ipv6Cidr_ = other.ipv6Cidr_; + bitField0_ |= 0x00000080; + } else { + ensureIpv6CidrIsMutable(); + ipv6Cidr_.addAll(other.ipv6Cidr_); + } + onChanged(); + } + if (other.getVlanId() != 0) { + setVlanId(other.getVlanId()); + } + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIpv4CidrIsMutable(); + ipv4Cidr_.add(s); + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIpv6CidrIsMutable(); + ipv6Cidr_.add(s); + break; + } // case 66 + case 72: + { + vlanId_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + 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 canonical resource name of the subnet.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the subnet.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the subnet.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 canonical resource name of the subnet.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical resource name of the subnet.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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 when the subnet 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels associated with this resource.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Optional. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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. A free-text description of the resource. Max length 1024
+     * characters.
+     * 
+ * + * 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 network_ = ""; + /** + * + * + *
+     * Required. The network that this subnetwork belongs to.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The network that this subnetwork belongs to.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The network that this subnetwork belongs to.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network that this subnetwork belongs to.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The network that this subnetwork belongs to.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList ipv4Cidr_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIpv4CidrIsMutable() { + if (!ipv4Cidr_.isModifiable()) { + ipv4Cidr_ = new com.google.protobuf.LazyStringArrayList(ipv4Cidr_); + } + bitField0_ |= 0x00000040; + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return A list containing the ipv4Cidr. + */ + public com.google.protobuf.ProtocolStringList getIpv4CidrList() { + ipv4Cidr_.makeImmutable(); + return ipv4Cidr_; + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return The count of ipv4Cidr. + */ + public int getIpv4CidrCount() { + return ipv4Cidr_.size(); + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index of the element to return. + * @return The ipv4Cidr at the given index. + */ + public java.lang.String getIpv4Cidr(int index) { + return ipv4Cidr_.get(index); + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index of the value to return. + * @return The bytes of the ipv4Cidr at the given index. + */ + public com.google.protobuf.ByteString getIpv4CidrBytes(int index) { + return ipv4Cidr_.getByteString(index); + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index to set the value at. + * @param value The ipv4Cidr to set. + * @return This builder for chaining. + */ + public Builder setIpv4Cidr(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv4CidrIsMutable(); + ipv4Cidr_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param value The ipv4Cidr to add. + * @return This builder for chaining. + */ + public Builder addIpv4Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv4CidrIsMutable(); + ipv4Cidr_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param values The ipv4Cidr to add. + * @return This builder for chaining. + */ + public Builder addAllIpv4Cidr(java.lang.Iterable values) { + ensureIpv4CidrIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipv4Cidr_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return This builder for chaining. + */ + public Builder clearIpv4Cidr() { + ipv4Cidr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv4 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param value The bytes of the ipv4Cidr to add. + * @return This builder for chaining. + */ + public Builder addIpv4CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIpv4CidrIsMutable(); + ipv4Cidr_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList ipv6Cidr_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIpv6CidrIsMutable() { + if (!ipv6Cidr_.isModifiable()) { + ipv6Cidr_ = new com.google.protobuf.LazyStringArrayList(ipv6Cidr_); + } + bitField0_ |= 0x00000080; + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return A list containing the ipv6Cidr. + */ + public com.google.protobuf.ProtocolStringList getIpv6CidrList() { + ipv6Cidr_.makeImmutable(); + return ipv6Cidr_; + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return The count of ipv6Cidr. + */ + public int getIpv6CidrCount() { + return ipv6Cidr_.size(); + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index of the element to return. + * @return The ipv6Cidr at the given index. + */ + public java.lang.String getIpv6Cidr(int index) { + return ipv6Cidr_.get(index); + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index of the value to return. + * @return The bytes of the ipv6Cidr at the given index. + */ + public com.google.protobuf.ByteString getIpv6CidrBytes(int index) { + return ipv6Cidr_.getByteString(index); + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index to set the value at. + * @param value The ipv6Cidr to set. + * @return This builder for chaining. + */ + public Builder setIpv6Cidr(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv6CidrIsMutable(); + ipv6Cidr_.set(index, value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param value The ipv6Cidr to add. + * @return This builder for chaining. + */ + public Builder addIpv6Cidr(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv6CidrIsMutable(); + ipv6Cidr_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param values The ipv6Cidr to add. + * @return This builder for chaining. + */ + public Builder addAllIpv6Cidr(java.lang.Iterable values) { + ensureIpv6CidrIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipv6Cidr_); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return This builder for chaining. + */ + public Builder clearIpv6Cidr() { + ipv6Cidr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The ranges of ipv6 addresses that are owned by this subnetwork.
+     * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param value The bytes of the ipv6Cidr to add. + * @return This builder for chaining. + */ + public Builder addIpv6CidrBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIpv6CidrIsMutable(); + ipv6Cidr_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int vlanId_; + /** + * + * + *
+     * Optional. VLAN id provided by user. If not specified we assign one
+     * automatically.
+     * 
+ * + * int32 vlan_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + /** + * + * + *
+     * Optional. VLAN id provided by user. If not specified we assign one
+     * automatically.
+     * 
+ * + * int32 vlan_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The vlanId to set. + * @return This builder for chaining. + */ + public Builder setVlanId(int value) { + + vlanId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. VLAN id provided by user. If not specified we assign one
+     * automatically.
+     * 
+ * + * int32 vlan_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVlanId() { + bitField0_ = (bitField0_ & ~0x00000100); + vlanId_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.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. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.ResourceState getState() { + com.google.cloud.edgenetwork.v1.ResourceState result = + com.google.cloud.edgenetwork.v1.ResourceState.forNumber(state_); + return result == null ? com.google.cloud.edgenetwork.v1.ResourceState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.edgenetwork.v1.ResourceState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current stage of the resource to the device by config push.
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + 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.edgenetwork.v1.Subnet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Subnet) + private static final com.google.cloud.edgenetwork.v1.Subnet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Subnet(); + } + + public static com.google.cloud.edgenetwork.v1.Subnet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subnet 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.edgenetwork.v1.Subnet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetName.java new file mode 100644 index 000000000000..2d722eb9657e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetName.java @@ -0,0 +1,257 @@ +/* + * 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.edgenetwork.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 SubnetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE_SUBNET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/zones/{zone}/subnets/{subnet}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + private final String subnet; + + @Deprecated + protected SubnetName() { + project = null; + location = null; + zone = null; + subnet = null; + } + + private SubnetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + subnet = Preconditions.checkNotNull(builder.getSubnet()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getSubnet() { + return subnet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SubnetName of(String project, String location, String zone, String subnet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setSubnet(subnet) + .build(); + } + + public static String format(String project, String location, String zone, String subnet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setZone(zone) + .setSubnet(subnet) + .build() + .toString(); + } + + public static SubnetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE_SUBNET.validatedMatch( + formattedString, "SubnetName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("zone"), + matchMap.get("subnet")); + } + + 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 (SubnetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE_SUBNET.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (zone != null) { + fieldMapBuilder.put("zone", zone); + } + if (subnet != null) { + fieldMapBuilder.put("subnet", subnet); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE_SUBNET.instantiate( + "project", project, "location", location, "zone", zone, "subnet", subnet); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SubnetName that = ((SubnetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone) + && Objects.equals(this.subnet, that.subnet); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(zone); + h *= 1000003; + h ^= Objects.hashCode(subnet); + return h; + } + + /** Builder for projects/{project}/locations/{location}/zones/{zone}/subnets/{subnet}. */ + public static class Builder { + private String project; + private String location; + private String zone; + private String subnet; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public String getSubnet() { + return subnet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public Builder setSubnet(String subnet) { + this.subnet = subnet; + return this; + } + + private Builder(SubnetName subnetName) { + this.project = subnetName.project; + this.location = subnetName.location; + this.zone = subnetName.zone; + this.subnet = subnetName.subnet; + } + + public SubnetName build() { + return new SubnetName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetOrBuilder.java new file mode 100644 index 000000000000..b87d6163fc88 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetOrBuilder.java @@ -0,0 +1,385 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface SubnetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Subnet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The canonical resource name of the subnet.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The canonical resource name of the subnet.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time when the subnet 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 when the subnet 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 when the subnet was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the subnet 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 when the subnet 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 when the subnet was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels associated with this resource.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A free-text description of the resource. Max length 1024
+   * characters.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The network that this subnetwork belongs to.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Required. The network that this subnetwork belongs to.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return A list containing the ipv4Cidr. + */ + java.util.List getIpv4CidrList(); + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @return The count of ipv4Cidr. + */ + int getIpv4CidrCount(); + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index of the element to return. + * @return The ipv4Cidr at the given index. + */ + java.lang.String getIpv4Cidr(int index); + /** + * + * + *
+   * The ranges of ipv4 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv4_cidr = 7; + * + * @param index The index of the value to return. + * @return The bytes of the ipv4Cidr at the given index. + */ + com.google.protobuf.ByteString getIpv4CidrBytes(int index); + + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return A list containing the ipv6Cidr. + */ + java.util.List getIpv6CidrList(); + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @return The count of ipv6Cidr. + */ + int getIpv6CidrCount(); + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index of the element to return. + * @return The ipv6Cidr at the given index. + */ + java.lang.String getIpv6Cidr(int index); + /** + * + * + *
+   * The ranges of ipv6 addresses that are owned by this subnetwork.
+   * 
+ * + * repeated string ipv6_cidr = 8; + * + * @param index The index of the value to return. + * @return The bytes of the ipv6Cidr at the given index. + */ + com.google.protobuf.ByteString getIpv6CidrBytes(int index); + + /** + * + * + *
+   * Optional. VLAN id provided by user. If not specified we assign one
+   * automatically.
+   * 
+ * + * int32 vlan_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vlanId. + */ + int getVlanId(); + + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current stage of the resource to the device by config push.
+   * 
+ * + * + * .google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.edgenetwork.v1.ResourceState getState(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatus.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatus.java new file mode 100644 index 000000000000..78016c22f362 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatus.java @@ -0,0 +1,1338 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * SubnetStatus contains detailed and current technical information about this
+ * subnet resource.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.SubnetStatus} + */ +public final class SubnetStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.SubnetStatus) + SubnetStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubnetStatus.newBuilder() to construct. + private SubnetStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubnetStatus() { + name_ = ""; + macAddress_ = ""; + linkLayerAddresses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubnetStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_SubnetStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_SubnetStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.SubnetStatus.class, + com.google.cloud.edgenetwork.v1.SubnetStatus.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of CCFE subnet resource.
+   * 
+ * + * string name = 1; + * + * @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 name of CCFE subnet resource.
+   * 
+ * + * string name = 1; + * + * @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 MAC_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object macAddress_ = ""; + /** + * + * + *
+   * BVI MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The macAddress. + */ + @java.lang.Override + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + 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(); + macAddress_ = s; + return s; + } + } + /** + * + * + *
+   * BVI MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The bytes for macAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINK_LAYER_ADDRESSES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List linkLayerAddresses_; + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + @java.lang.Override + public java.util.List + getLinkLayerAddressesList() { + return linkLayerAddresses_; + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + @java.lang.Override + public java.util.List + getLinkLayerAddressesOrBuilderList() { + return linkLayerAddresses_; + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + @java.lang.Override + public int getLinkLayerAddressesCount() { + return linkLayerAddresses_.size(); + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddress getLinkLayerAddresses(int index) { + return linkLayerAddresses_.get(index); + } + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder getLinkLayerAddressesOrBuilder( + int index) { + return linkLayerAddresses_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(macAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, macAddress_); + } + for (int i = 0; i < linkLayerAddresses_.size(); i++) { + output.writeMessage(3, linkLayerAddresses_.get(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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(macAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, macAddress_); + } + for (int i = 0; i < linkLayerAddresses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkLayerAddresses_.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.edgenetwork.v1.SubnetStatus)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.SubnetStatus other = + (com.google.cloud.edgenetwork.v1.SubnetStatus) obj; + + if (!getName().equals(other.getName())) return false; + if (!getMacAddress().equals(other.getMacAddress())) return false; + if (!getLinkLayerAddressesList().equals(other.getLinkLayerAddressesList())) 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) + MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMacAddress().hashCode(); + if (getLinkLayerAddressesCount() > 0) { + hash = (37 * hash) + LINK_LAYER_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getLinkLayerAddressesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus 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.edgenetwork.v1.SubnetStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus 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.edgenetwork.v1.SubnetStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus 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.edgenetwork.v1.SubnetStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus 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.edgenetwork.v1.SubnetStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus 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.edgenetwork.v1.SubnetStatus 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; + } + /** + * + * + *
+   * SubnetStatus contains detailed and current technical information about this
+   * subnet resource.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.SubnetStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.SubnetStatus) + com.google.cloud.edgenetwork.v1.SubnetStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_SubnetStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_SubnetStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.SubnetStatus.class, + com.google.cloud.edgenetwork.v1.SubnetStatus.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.SubnetStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + macAddress_ = ""; + if (linkLayerAddressesBuilder_ == null) { + linkLayerAddresses_ = java.util.Collections.emptyList(); + } else { + linkLayerAddresses_ = null; + linkLayerAddressesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_SubnetStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetStatus getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.SubnetStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetStatus build() { + com.google.cloud.edgenetwork.v1.SubnetStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetStatus buildPartial() { + com.google.cloud.edgenetwork.v1.SubnetStatus result = + new com.google.cloud.edgenetwork.v1.SubnetStatus(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.edgenetwork.v1.SubnetStatus result) { + if (linkLayerAddressesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + linkLayerAddresses_ = java.util.Collections.unmodifiableList(linkLayerAddresses_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.linkLayerAddresses_ = linkLayerAddresses_; + } else { + result.linkLayerAddresses_ = linkLayerAddressesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.SubnetStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.macAddress_ = macAddress_; + } + } + + @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.edgenetwork.v1.SubnetStatus) { + return mergeFrom((com.google.cloud.edgenetwork.v1.SubnetStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.SubnetStatus other) { + if (other == com.google.cloud.edgenetwork.v1.SubnetStatus.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMacAddress().isEmpty()) { + macAddress_ = other.macAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (linkLayerAddressesBuilder_ == null) { + if (!other.linkLayerAddresses_.isEmpty()) { + if (linkLayerAddresses_.isEmpty()) { + linkLayerAddresses_ = other.linkLayerAddresses_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.addAll(other.linkLayerAddresses_); + } + onChanged(); + } + } else { + if (!other.linkLayerAddresses_.isEmpty()) { + if (linkLayerAddressesBuilder_.isEmpty()) { + linkLayerAddressesBuilder_.dispose(); + linkLayerAddressesBuilder_ = null; + linkLayerAddresses_ = other.linkLayerAddresses_; + bitField0_ = (bitField0_ & ~0x00000004); + linkLayerAddressesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLinkLayerAddressesFieldBuilder() + : null; + } else { + linkLayerAddressesBuilder_.addAllMessages(other.linkLayerAddresses_); + } + } + } + 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: + { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.edgenetwork.v1.LinkLayerAddress m = + input.readMessage( + com.google.cloud.edgenetwork.v1.LinkLayerAddress.parser(), + extensionRegistry); + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(m); + } else { + linkLayerAddressesBuilder_.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.lang.Object name_ = ""; + /** + * + * + *
+     * The name of CCFE subnet resource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of CCFE subnet resource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of CCFE subnet resource.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The name of CCFE subnet resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of CCFE subnet resource.
+     * 
+ * + * string name = 1; + * + * @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 macAddress_ = ""; + /** + * + * + *
+     * BVI MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @return The macAddress. + */ + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * BVI MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @return The bytes for macAddress. + */ + public com.google.protobuf.ByteString getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * BVI MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @param value The macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + macAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * BVI MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearMacAddress() { + macAddress_ = getDefaultInstance().getMacAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * BVI MAC address.
+     * 
+ * + * string mac_address = 2; + * + * @param value The bytes for macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + macAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List linkLayerAddresses_ = + java.util.Collections.emptyList(); + + private void ensureLinkLayerAddressesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + linkLayerAddresses_ = + new java.util.ArrayList( + linkLayerAddresses_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.LinkLayerAddress, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder, + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder> + linkLayerAddressesBuilder_; + + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public java.util.List + getLinkLayerAddressesList() { + if (linkLayerAddressesBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkLayerAddresses_); + } else { + return linkLayerAddressesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public int getLinkLayerAddressesCount() { + if (linkLayerAddressesBuilder_ == null) { + return linkLayerAddresses_.size(); + } else { + return linkLayerAddressesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress getLinkLayerAddresses(int index) { + if (linkLayerAddressesBuilder_ == null) { + return linkLayerAddresses_.get(index); + } else { + return linkLayerAddressesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder setLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress value) { + if (linkLayerAddressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.set(index, value); + onChanged(); + } else { + linkLayerAddressesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder setLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder builderForValue) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.set(index, builderForValue.build()); + onChanged(); + } else { + linkLayerAddressesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder addLinkLayerAddresses(com.google.cloud.edgenetwork.v1.LinkLayerAddress value) { + if (linkLayerAddressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(value); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder addLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress value) { + if (linkLayerAddressesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(index, value); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder addLinkLayerAddresses( + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder builderForValue) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(builderForValue.build()); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder addLinkLayerAddresses( + int index, com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder builderForValue) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.add(index, builderForValue.build()); + onChanged(); + } else { + linkLayerAddressesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder addAllLinkLayerAddresses( + java.lang.Iterable values) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkLayerAddresses_); + onChanged(); + } else { + linkLayerAddressesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder clearLinkLayerAddresses() { + if (linkLayerAddressesBuilder_ == null) { + linkLayerAddresses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + linkLayerAddressesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public Builder removeLinkLayerAddresses(int index) { + if (linkLayerAddressesBuilder_ == null) { + ensureLinkLayerAddressesIsMutable(); + linkLayerAddresses_.remove(index); + onChanged(); + } else { + linkLayerAddressesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder getLinkLayerAddressesBuilder( + int index) { + return getLinkLayerAddressesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder getLinkLayerAddressesOrBuilder( + int index) { + if (linkLayerAddressesBuilder_ == null) { + return linkLayerAddresses_.get(index); + } else { + return linkLayerAddressesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public java.util.List + getLinkLayerAddressesOrBuilderList() { + if (linkLayerAddressesBuilder_ != null) { + return linkLayerAddressesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkLayerAddresses_); + } + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder addLinkLayerAddressesBuilder() { + return getLinkLayerAddressesFieldBuilder() + .addBuilder(com.google.cloud.edgenetwork.v1.LinkLayerAddress.getDefaultInstance()); + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder addLinkLayerAddressesBuilder( + int index) { + return getLinkLayerAddressesFieldBuilder() + .addBuilder(index, com.google.cloud.edgenetwork.v1.LinkLayerAddress.getDefaultInstance()); + } + /** + * + * + *
+     * A list of LinkLayerAddress, describing the ip address and corresponding
+     * link-layer address of the neighbors for this subnet.
+     * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + public java.util.List + getLinkLayerAddressesBuilderList() { + return getLinkLayerAddressesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.LinkLayerAddress, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder, + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder> + getLinkLayerAddressesFieldBuilder() { + if (linkLayerAddressesBuilder_ == null) { + linkLayerAddressesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.edgenetwork.v1.LinkLayerAddress, + com.google.cloud.edgenetwork.v1.LinkLayerAddress.Builder, + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder>( + linkLayerAddresses_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + linkLayerAddresses_ = null; + } + return linkLayerAddressesBuilder_; + } + + @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.edgenetwork.v1.SubnetStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.SubnetStatus) + private static final com.google.cloud.edgenetwork.v1.SubnetStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.SubnetStatus(); + } + + public static com.google.cloud.edgenetwork.v1.SubnetStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubnetStatus 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.edgenetwork.v1.SubnetStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatusOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatusOrBuilder.java new file mode 100644 index 000000000000..6a3436dc3b56 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/SubnetStatusOrBuilder.java @@ -0,0 +1,133 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface SubnetStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.SubnetStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of CCFE subnet resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of CCFE subnet resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * BVI MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The macAddress. + */ + java.lang.String getMacAddress(); + /** + * + * + *
+   * BVI MAC address.
+   * 
+ * + * string mac_address = 2; + * + * @return The bytes for macAddress. + */ + com.google.protobuf.ByteString getMacAddressBytes(); + + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + java.util.List getLinkLayerAddressesList(); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + com.google.cloud.edgenetwork.v1.LinkLayerAddress getLinkLayerAddresses(int index); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + int getLinkLayerAddressesCount(); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + java.util.List + getLinkLayerAddressesOrBuilderList(); + /** + * + * + *
+   * A list of LinkLayerAddress, describing the ip address and corresponding
+   * link-layer address of the neighbors for this subnet.
+   * 
+ * + * repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 3; + */ + com.google.cloud.edgenetwork.v1.LinkLayerAddressOrBuilder getLinkLayerAddressesOrBuilder( + int index); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequest.java new file mode 100644 index 000000000000..8c33c4b9a9be --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequest.java @@ -0,0 +1,1309 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for updating a Router
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.UpdateRouterRequest} + */ +public final class UpdateRouterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.UpdateRouterRequest) + UpdateRouterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateRouterRequest.newBuilder() to construct. + private UpdateRouterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateRouterRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateRouterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.UpdateRouterRequest.class, + com.google.cloud.edgenetwork.v1.UpdateRouterRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Router resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Router resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Router resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int ROUTER_FIELD_NUMBER = 2; + private com.google.cloud.edgenetwork.v1.Router router_; + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the router field is set. + */ + @java.lang.Override + public boolean hasRouter() { + return router_ != null; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The router. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Router getRouter() { + return router_ == null ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() : router_; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.RouterOrBuilder getRouterOrBuilder() { + return router_ == null ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() : router_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (router_ != null) { + output.writeMessage(2, getRouter()); + } + 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 (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (router_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRouter()); + } + 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.edgenetwork.v1.UpdateRouterRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.UpdateRouterRequest other = + (com.google.cloud.edgenetwork.v1.UpdateRouterRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasRouter() != other.hasRouter()) return false; + if (hasRouter()) { + if (!getRouter().equals(other.getRouter())) 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(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasRouter()) { + hash = (37 * hash) + ROUTER_FIELD_NUMBER; + hash = (53 * hash) + getRouter().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.edgenetwork.v1.UpdateRouterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest 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.edgenetwork.v1.UpdateRouterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest 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.edgenetwork.v1.UpdateRouterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest 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.edgenetwork.v1.UpdateRouterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest 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.edgenetwork.v1.UpdateRouterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest 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.edgenetwork.v1.UpdateRouterRequest 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; + } + /** + * + * + *
+   * Message for updating a Router
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.UpdateRouterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.UpdateRouterRequest) + com.google.cloud.edgenetwork.v1.UpdateRouterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.UpdateRouterRequest.class, + com.google.cloud.edgenetwork.v1.UpdateRouterRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.UpdateRouterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + router_ = null; + if (routerBuilder_ != null) { + routerBuilder_.dispose(); + routerBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateRouterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.UpdateRouterRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.UpdateRouterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.UpdateRouterRequest build() { + com.google.cloud.edgenetwork.v1.UpdateRouterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.UpdateRouterRequest buildPartial() { + com.google.cloud.edgenetwork.v1.UpdateRouterRequest result = + new com.google.cloud.edgenetwork.v1.UpdateRouterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.UpdateRouterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.router_ = routerBuilder_ == null ? router_ : routerBuilder_.build(); + } + 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.edgenetwork.v1.UpdateRouterRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.UpdateRouterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.UpdateRouterRequest other) { + if (other == com.google.cloud.edgenetwork.v1.UpdateRouterRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasRouter()) { + mergeRouter(other.getRouter()); + } + 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: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getRouterFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Router resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.edgenetwork.v1.Router router_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder> + routerBuilder_; + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the router field is set. + */ + public boolean hasRouter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The router. + */ + public com.google.cloud.edgenetwork.v1.Router getRouter() { + if (routerBuilder_ == null) { + return router_ == null + ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() + : router_; + } else { + return routerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRouter(com.google.cloud.edgenetwork.v1.Router value) { + if (routerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + router_ = value; + } else { + routerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRouter(com.google.cloud.edgenetwork.v1.Router.Builder builderForValue) { + if (routerBuilder_ == null) { + router_ = builderForValue.build(); + } else { + routerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRouter(com.google.cloud.edgenetwork.v1.Router value) { + if (routerBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && router_ != null + && router_ != com.google.cloud.edgenetwork.v1.Router.getDefaultInstance()) { + getRouterBuilder().mergeFrom(value); + } else { + router_ = value; + } + } else { + routerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRouter() { + bitField0_ = (bitField0_ & ~0x00000002); + router_ = null; + if (routerBuilder_ != null) { + routerBuilder_.dispose(); + routerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.Router.Builder getRouterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRouterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.RouterOrBuilder getRouterOrBuilder() { + if (routerBuilder_ != null) { + return routerBuilder_.getMessageOrBuilder(); + } else { + return router_ == null + ? com.google.cloud.edgenetwork.v1.Router.getDefaultInstance() + : router_; + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder> + getRouterFieldBuilder() { + if (routerBuilder_ == null) { + routerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Router, + com.google.cloud.edgenetwork.v1.Router.Builder, + com.google.cloud.edgenetwork.v1.RouterOrBuilder>( + getRouter(), getParentForChildren(), isClean()); + router_ = null; + } + return routerBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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.edgenetwork.v1.UpdateRouterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.UpdateRouterRequest) + private static final com.google.cloud.edgenetwork.v1.UpdateRouterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.UpdateRouterRequest(); + } + + public static com.google.cloud.edgenetwork.v1.UpdateRouterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateRouterRequest 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.edgenetwork.v1.UpdateRouterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequestOrBuilder.java new file mode 100644 index 000000000000..89c9d3c1b76b --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateRouterRequestOrBuilder.java @@ -0,0 +1,162 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface UpdateRouterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.UpdateRouterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Router resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Router resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Router resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the router field is set. + */ + boolean hasRouter(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The router. + */ + com.google.cloud.edgenetwork.v1.Router getRouter(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Router router = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.edgenetwork.v1.RouterOrBuilder getRouterOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequest.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequest.java new file mode 100644 index 000000000000..7efedb5deaf7 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequest.java @@ -0,0 +1,1309 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * Message for updating a Subnet
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.UpdateSubnetRequest} + */ +public final class UpdateSubnetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.UpdateSubnetRequest) + UpdateSubnetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSubnetRequest.newBuilder() to construct. + private UpdateSubnetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSubnetRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSubnetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.class, + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Subnet resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Subnet resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Subnet resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SUBNET_FIELD_NUMBER = 2; + private com.google.cloud.edgenetwork.v1.Subnet subnet_; + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subnet field is set. + */ + @java.lang.Override + public boolean hasSubnet() { + return subnet_ != null; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subnet. + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Subnet getSubnet() { + return subnet_ == null ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() : subnet_; + } + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetOrBuilder() { + return subnet_ == null ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() : subnet_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (subnet_ != null) { + output.writeMessage(2, getSubnet()); + } + 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 (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (subnet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubnet()); + } + 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.edgenetwork.v1.UpdateSubnetRequest)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest other = + (com.google.cloud.edgenetwork.v1.UpdateSubnetRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasSubnet() != other.hasSubnet()) return false; + if (hasSubnet()) { + if (!getSubnet().equals(other.getSubnet())) 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(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasSubnet()) { + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().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.edgenetwork.v1.UpdateSubnetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest 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.edgenetwork.v1.UpdateSubnetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest 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.edgenetwork.v1.UpdateSubnetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest 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.edgenetwork.v1.UpdateSubnetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest 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.edgenetwork.v1.UpdateSubnetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest 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.edgenetwork.v1.UpdateSubnetRequest 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; + } + /** + * + * + *
+   * Message for updating a Subnet
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.UpdateSubnetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.UpdateSubnetRequest) + com.google.cloud.edgenetwork.v1.UpdateSubnetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.class, + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + subnet_ = null; + if (subnetBuilder_ != null) { + subnetBuilder_.dispose(); + subnetBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ServiceProto + .internal_static_google_cloud_edgenetwork_v1_UpdateSubnetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.UpdateSubnetRequest getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.UpdateSubnetRequest build() { + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.UpdateSubnetRequest buildPartial() { + com.google.cloud.edgenetwork.v1.UpdateSubnetRequest result = + new com.google.cloud.edgenetwork.v1.UpdateSubnetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.UpdateSubnetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subnet_ = subnetBuilder_ == null ? subnet_ : subnetBuilder_.build(); + } + 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.edgenetwork.v1.UpdateSubnetRequest) { + return mergeFrom((com.google.cloud.edgenetwork.v1.UpdateSubnetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.UpdateSubnetRequest other) { + if (other == com.google.cloud.edgenetwork.v1.UpdateSubnetRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasSubnet()) { + mergeSubnet(other.getSubnet()); + } + 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: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSubnetFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Subnet resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.edgenetwork.v1.Subnet subnet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder> + subnetBuilder_; + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subnet field is set. + */ + public boolean hasSubnet() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subnet. + */ + public com.google.cloud.edgenetwork.v1.Subnet getSubnet() { + if (subnetBuilder_ == null) { + return subnet_ == null + ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() + : subnet_; + } else { + return subnetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubnet(com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subnet_ = value; + } else { + subnetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSubnet(com.google.cloud.edgenetwork.v1.Subnet.Builder builderForValue) { + if (subnetBuilder_ == null) { + subnet_ = builderForValue.build(); + } else { + subnetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSubnet(com.google.cloud.edgenetwork.v1.Subnet value) { + if (subnetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && subnet_ != null + && subnet_ != com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance()) { + getSubnetBuilder().mergeFrom(value); + } else { + subnet_ = value; + } + } else { + subnetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSubnet() { + bitField0_ = (bitField0_ & ~0x00000002); + subnet_ = null; + if (subnetBuilder_ != null) { + subnetBuilder_.dispose(); + subnetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.Subnet.Builder getSubnetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSubnetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetOrBuilder() { + if (subnetBuilder_ != null) { + return subnetBuilder_.getMessageOrBuilder(); + } else { + return subnet_ == null + ? com.google.cloud.edgenetwork.v1.Subnet.getDefaultInstance() + : subnet_; + } + } + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder> + getSubnetFieldBuilder() { + if (subnetBuilder_ == null) { + subnetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.edgenetwork.v1.Subnet, + com.google.cloud.edgenetwork.v1.Subnet.Builder, + com.google.cloud.edgenetwork.v1.SubnetOrBuilder>( + getSubnet(), getParentForChildren(), isClean()); + subnet_ = null; + } + return subnetBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * 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 if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally 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.edgenetwork.v1.UpdateSubnetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.UpdateSubnetRequest) + private static final com.google.cloud.edgenetwork.v1.UpdateSubnetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.UpdateSubnetRequest(); + } + + public static com.google.cloud.edgenetwork.v1.UpdateSubnetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubnetRequest 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.edgenetwork.v1.UpdateSubnetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequestOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequestOrBuilder.java new file mode 100644 index 000000000000..c93561aa4410 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/UpdateSubnetRequestOrBuilder.java @@ -0,0 +1,162 @@ +/* + * 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/edgenetwork/v1/service.proto + +package com.google.cloud.edgenetwork.v1; + +public interface UpdateSubnetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.UpdateSubnetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Subnet resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Subnet resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Subnet resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the subnet field is set. + */ + boolean hasSubnet(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subnet. + */ + com.google.cloud.edgenetwork.v1.Subnet getSubnet(); + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * .google.cloud.edgenetwork.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.edgenetwork.v1.SubnetOrBuilder getSubnetOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * 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 if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally 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-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Zone.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Zone.java new file mode 100644 index 000000000000..6bc3475770df --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/Zone.java @@ -0,0 +1,1696 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +/** + * + * + *
+ * A Google Edge Cloud zone.
+ * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Zone} + */ +public final class Zone extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.edgenetwork.v1.Zone) + ZoneOrBuilder { + private static final long serialVersionUID = 0L; + // Use Zone.newBuilder() to construct. + private Zone(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Zone() { + name_ = ""; + layoutName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Zone(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Zone_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Zone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Zone.class, + com.google.cloud.edgenetwork.v1.Zone.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the zone.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the zone.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Zone_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(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * 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(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * 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; + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * 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 LAYOUT_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object layoutName_ = ""; + /** + * + * + *
+   * The deployment layout type.
+   * 
+ * + * string layout_name = 5; + * + * @return The layoutName. + */ + @java.lang.Override + public java.lang.String getLayoutName() { + java.lang.Object ref = layoutName_; + 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(); + layoutName_ = s; + return s; + } + } + /** + * + * + *
+   * The deployment layout type.
+   * 
+ * + * string layout_name = 5; + * + * @return The bytes for layoutName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLayoutNameBytes() { + java.lang.Object ref = layoutName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + layoutName_ = 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 (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(layoutName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, layoutName_); + } + 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(layoutName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, layoutName_); + } + 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.edgenetwork.v1.Zone)) { + return super.equals(obj); + } + com.google.cloud.edgenetwork.v1.Zone other = (com.google.cloud.edgenetwork.v1.Zone) 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 (!getLayoutName().equals(other.getLayoutName())) 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) + LAYOUT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getLayoutName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.edgenetwork.v1.Zone parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Zone 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.edgenetwork.v1.Zone parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Zone 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.edgenetwork.v1.Zone parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.edgenetwork.v1.Zone parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.edgenetwork.v1.Zone parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Zone 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.edgenetwork.v1.Zone parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Zone 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.edgenetwork.v1.Zone parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.edgenetwork.v1.Zone 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.edgenetwork.v1.Zone 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 Google Edge Cloud zone.
+   * 
+ * + * Protobuf type {@code google.cloud.edgenetwork.v1.Zone} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.edgenetwork.v1.Zone) + com.google.cloud.edgenetwork.v1.ZoneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Zone_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.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Zone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.edgenetwork.v1.Zone.class, + com.google.cloud.edgenetwork.v1.Zone.Builder.class); + } + + // Construct using com.google.cloud.edgenetwork.v1.Zone.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(); + layoutName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.edgenetwork.v1.ResourcesProto + .internal_static_google_cloud_edgenetwork_v1_Zone_descriptor; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Zone getDefaultInstanceForType() { + return com.google.cloud.edgenetwork.v1.Zone.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Zone build() { + com.google.cloud.edgenetwork.v1.Zone result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.edgenetwork.v1.Zone buildPartial() { + com.google.cloud.edgenetwork.v1.Zone result = new com.google.cloud.edgenetwork.v1.Zone(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.edgenetwork.v1.Zone 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.layoutName_ = layoutName_; + } + } + + @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.edgenetwork.v1.Zone) { + return mergeFrom((com.google.cloud.edgenetwork.v1.Zone) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.edgenetwork.v1.Zone other) { + if (other == com.google.cloud.edgenetwork.v1.Zone.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.getLayoutName().isEmpty()) { + layoutName_ = other.layoutName_; + 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: + { + 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: + { + layoutName_ = 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 name_ = ""; + /** + * + * + *
+     * Required. The resource name of the zone.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the zone.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the zone.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the zone.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the zone.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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 when the zone 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(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * 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(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object layoutName_ = ""; + /** + * + * + *
+     * The deployment layout type.
+     * 
+ * + * string layout_name = 5; + * + * @return The layoutName. + */ + public java.lang.String getLayoutName() { + java.lang.Object ref = layoutName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + layoutName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The deployment layout type.
+     * 
+ * + * string layout_name = 5; + * + * @return The bytes for layoutName. + */ + public com.google.protobuf.ByteString getLayoutNameBytes() { + java.lang.Object ref = layoutName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + layoutName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The deployment layout type.
+     * 
+ * + * string layout_name = 5; + * + * @param value The layoutName to set. + * @return This builder for chaining. + */ + public Builder setLayoutName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + layoutName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The deployment layout type.
+     * 
+ * + * string layout_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearLayoutName() { + layoutName_ = getDefaultInstance().getLayoutName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The deployment layout type.
+     * 
+ * + * string layout_name = 5; + * + * @param value The bytes for layoutName to set. + * @return This builder for chaining. + */ + public Builder setLayoutNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + layoutName_ = 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.edgenetwork.v1.Zone) + } + + // @@protoc_insertion_point(class_scope:google.cloud.edgenetwork.v1.Zone) + private static final com.google.cloud.edgenetwork.v1.Zone DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.edgenetwork.v1.Zone(); + } + + public static com.google.cloud.edgenetwork.v1.Zone getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Zone 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.edgenetwork.v1.Zone getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneName.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneName.java new file mode 100644 index 000000000000..ff898416640e --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneName.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.edgenetwork.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 ZoneName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/zones/{zone}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + + @Deprecated + protected ZoneName() { + project = null; + location = null; + zone = null; + } + + private ZoneName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ZoneName of(String project, String location, String zone) { + return newBuilder().setProject(project).setLocation(location).setZone(zone).build(); + } + + public static String format(String project, String location, String zone) { + return newBuilder().setProject(project).setLocation(location).setZone(zone).build().toString(); + } + + public static ZoneName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE.validatedMatch( + formattedString, "ZoneName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("zone")); + } + + 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 (ZoneName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE.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 (location != null) { + fieldMapBuilder.put("location", location); + } + if (zone != null) { + fieldMapBuilder.put("zone", zone); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE.instantiate( + "project", project, "location", location, "zone", zone); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ZoneName that = ((ZoneName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(zone); + return h; + } + + /** Builder for projects/{project}/locations/{location}/zones/{zone}. */ + public static class Builder { + private String project; + private String location; + private String zone; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + private Builder(ZoneName zoneName) { + this.project = zoneName.project; + this.location = zoneName.location; + this.zone = zoneName.zone; + } + + public ZoneName build() { + return new ZoneName(this); + } + } +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneOrBuilder.java b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneOrBuilder.java new file mode 100644 index 000000000000..6f9368f6e0dc --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/java/com/google/cloud/edgenetwork/v1/ZoneOrBuilder.java @@ -0,0 +1,209 @@ +/* + * 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/edgenetwork/v1/resources.proto + +package com.google.cloud.edgenetwork.v1; + +public interface ZoneOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.edgenetwork.v1.Zone) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the zone.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the zone.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time when the zone 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 when the zone 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 when the zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the zone 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 when the zone 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 when the zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The deployment layout type.
+   * 
+ * + * string layout_name = 5; + * + * @return The layoutName. + */ + java.lang.String getLayoutName(); + /** + * + * + *
+   * The deployment layout type.
+   * 
+ * + * string layout_name = 5; + * + * @return The bytes for layoutName. + */ + com.google.protobuf.ByteString getLayoutNameBytes(); +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/resources.proto b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/resources.proto new file mode 100644 index 000000000000..063ba5a9e0e4 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/resources.proto @@ -0,0 +1,597 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.edgenetwork.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.EdgeNetwork.V1"; +option go_package = "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb;edgenetworkpb"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.edgenetwork.v1"; +option php_namespace = "Google\\Cloud\\EdgeNetwork\\V1"; +option ruby_package = "Google::Cloud::EdgeNetwork::V1"; + +// ResourceState describes the state the resource. +// A normal lifecycle of a new resource being created would be: PENDING -> +// PROVISIONING -> RUNNING. A normal lifecycle of an existing resource being +// deleted would be: RUNNING -> DELETING. Any failures during processing will +// result the resource to be in a SUSPENDED state. +enum ResourceState { + // Unspecified state. + STATE_UNKNOWN = 0; + + // The resource is being prepared to be applied to the rack. + STATE_PENDING = 1; + + // The resource has started being applied to the rack. + STATE_PROVISIONING = 2; + + // The resource has been pushed to the rack. + STATE_RUNNING = 3; + + // The resource failed to push to the rack. + STATE_SUSPENDED = 4; + + // The resource is under deletion. + STATE_DELETING = 5; +} + +// A Google Edge Cloud zone. +message Zone { + option (google.api.resource) = { + type: "edgenetwork.googleapis.com/Zone" + pattern: "projects/{project}/locations/{location}/zones/{zone}" + }; + + // Required. The resource name of the zone. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time when the zone was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the zone was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels as key value pairs + map labels = 4; + + // The deployment layout type. + string layout_name = 5; +} + +// Message describing Network object +message Network { + option (google.api.resource) = { + type: "edgenetwork.googleapis.com/Network" + pattern: "projects/{project}/locations/{location}/zones/{zone}/networks/{network}" + }; + + // Required. The canonical resource name of the network. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time when the network was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the network was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Optional. A free-text description of the resource. Max length 1024 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // IP (L3) MTU value of the network. + // Valid values are: 1500 and 9000. + // Default to 1500 if not set. + int32 mtu = 6; +} + +// Message describing Subnet object +message Subnet { + option (google.api.resource) = { + type: "edgenetwork.googleapis.com/Subnet" + pattern: "projects/{project}/locations/{location}/zones/{zone}/subnets/{subnet}" + }; + + // Required. The canonical resource name of the subnet. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time when the subnet was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the subnet was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Optional. A free-text description of the resource. Max length 1024 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The network that this subnetwork belongs to. + string network = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + } + ]; + + // The ranges of ipv4 addresses that are owned by this subnetwork. + repeated string ipv4_cidr = 7; + + // The ranges of ipv6 addresses that are owned by this subnetwork. + repeated string ipv6_cidr = 8; + + // Optional. VLAN id provided by user. If not specified we assign one + // automatically. + int32 vlan_id = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current stage of the resource to the device by config push. + ResourceState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message describing Interconnect object +message Interconnect { + option (google.api.resource) = { + type: "edgenetwork.googleapis.com/Interconnect" + pattern: "projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}" + }; + + // Type of interconnect. + enum InterconnectType { + // Unspecified. + INTERCONNECT_TYPE_UNSPECIFIED = 0; + + // Dedicated Interconnect. + DEDICATED = 1; + } + + // Required. The canonical resource name of the interconnect. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time when the subnet was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the subnet was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Optional. A free-text description of the resource. Max length 1024 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of interconnect, which takes only the value 'DEDICATED' for + // now. + InterconnectType interconnect_type = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier for the link. + string uuid = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud resource name of the switch device. + string device_cloud_resource_name = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the + // interconnect. + repeated string physical_ports = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message describing InterconnectAttachment object +message InterconnectAttachment { + option (google.api.resource) = { + type: "edgenetwork.googleapis.com/InterconnectAttachment" + pattern: "projects/{project}/locations/{location}/zones/{zone}/interconnectAttachments/{interconnect_attachment}" + }; + + // Required. The canonical resource name of the interconnect attachment. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time when the interconnect attachment was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the interconnect attachment was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Optional. A free-text description of the resource. Max length 1024 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The canonical name of underlying Interconnect object that this + // attachment's traffic will traverse through. The name is in the form of + // `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`. + string interconnect = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Interconnect" + } + ]; + + // Optional. The canonical Network name in the form of + // `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. + string network = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + } + ]; + + // Required. VLAN id provided by user. Must be site-wise unique. + int32 vlan_id = 8 [(google.api.field_behavior) = REQUIRED]; + + // IP (L3) MTU value of the virtual edge cloud. + // Valid values are: 1500 and 9000. + // Default to 1500 if not set. + int32 mtu = 9; + + // Output only. Current stage of the resource to the device by config push. + ResourceState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message describing Router object +message Router { + option (google.api.resource) = { + type: "edgenetwork.googleapis.com/Router" + pattern: "projects/{project}/locations/{location}/zones/{zone}/routers/{router}" + }; + + // Router Interface defines the GDCE zone side layer-3 information for + // building the BGP session. + message Interface { + // Name of this interface entry. Unique within the Zones resource. + string name = 1; + + // IP address and range of the interface. + string ipv4_cidr = 3; + + // IPv6 address and range of the interface. + string ipv6_cidr = 6; + + // The canonical name of the linked Interconnect attachment. + string linked_interconnect_attachment = 2; + + // The canonical name of the subnetwork resource that this interface + // belongs to. + string subnetwork = 4; + + // Create loopback interface in the router when specified. + // The number of IP addresses must match the number of TOR devices. + repeated string loopback_ip_addresses = 5; + } + + // BGPPeer defines the peer side layer-3 information for building the BGP + // session. + message BgpPeer { + // Name of this BGP peer. Unique within the Zones resource. + string name = 1; + + // Name of the RouterInterface the BGP peer is associated with. + string interface = 2; + + // IP range of the interface within Google. + string interface_ipv4_cidr = 3; + + // IPv6 range of the interface within Google. + string interface_ipv6_cidr = 7; + + // IP range of the BGP interface outside Google. + string peer_ipv4_cidr = 4; + + // IPv6 range of the BGP interface outside Google. + string peer_ipv6_cidr = 6; + + // Peer BGP Autonomous System Number (ASN). Each BGP interface may use + // a different value. + uint32 peer_asn = 5; + + // Output only. Local BGP Autonomous System Number (ASN). + // This field is ST_NOT_REQUIRED because it stores private ASNs, which are + // meaningless outside the zone in which they are being used. + uint32 local_asn = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // BGP information specific to this router. + message Bgp { + // Locally assigned BGP ASN. + uint32 asn = 1; + + // The interval in seconds between BGP keepalive messages that are + // sent to the peer. Default is 20 with value between 20 and 60. + uint32 keepalive_interval_in_seconds = 2; + } + + // Required. The canonical resource name of the router. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time when the router was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the router was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with this resource. + map labels = 4; + + // Optional. A free-text description of the resource. Max length 1024 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The canonical name of the network to which this router belongs. + // The name is in the form of + // `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. + string network = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + } + ]; + + // Router interfaces. + repeated Interface interface = 7; + + // BGP peers. + repeated BgpPeer bgp_peer = 8; + + // BGP information specific to this router. + Bgp bgp = 9; + + // Output only. Current stage of the resource to the device by config push. + ResourceState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A list of CIDRs in IP/Length format to advertise northbound as + // static routes from this router. + repeated string route_advertisements = 11 + [(google.api.field_behavior) = OPTIONAL]; +} + +// LinkLayerAddress contains an IP address and corresponding link-layer address. +message LinkLayerAddress { + // The MAC address of this neighbor. + string mac_address = 1; + + // The IP address of this neighbor. + string ip_address = 2; +} + +// SubnetStatus contains detailed and current technical information about this +// subnet resource. +message SubnetStatus { + // The name of CCFE subnet resource. + string name = 1; + + // BVI MAC address. + string mac_address = 2; + + // A list of LinkLayerAddress, describing the ip address and corresponding + // link-layer address of the neighbors for this subnet. + repeated LinkLayerAddress link_layer_addresses = 3; +} + +// Diagnostics information about interconnect, contains detailed and current +// technical information about Google's side of the connection. +message InterconnectDiagnostics { + // Describing the status for each link on the Interconnect. + message LinkStatus { + // The unique ID for this link assigned during turn up by Google. + string circuit_id = 1; + + // Describing the state of a LACP link. + LinkLACPStatus lacp_status = 2; + + // A list of LinkLLDPStatus objects, used to describe LLDP status of each + // peer for each link on the Interconnect. + repeated LinkLLDPStatus lldp_statuses = 3; + + // Packet counts specific statistics for this link. + PacketCounts packet_counts = 4; + } + + // Containing a collection of interface-related statistics objects. + message PacketCounts { + // The number of packets that are delivered. + int64 inbound_unicast = 1; + + // The number of inbound packets that contained errors. + int64 inbound_errors = 2; + + // The number of inbound packets that were chosen to be discarded even + // though no errors had been detected to prevent their being deliverable. + int64 inbound_discards = 3; + + // The total number of packets that are requested be transmitted. + int64 outbound_unicast = 4; + + // The number of outbound packets that could not be transmitted because of + // errors. + int64 outbound_errors = 5; + + // The number of outbound packets that were chosen to be discarded even + // though no errors had been detected to prevent their being transmitted. + int64 outbound_discards = 6; + } + + // Describing the status of a LACP link. + message LinkLACPStatus { + // State enum for LACP link. + enum State { + // The default state indicating state is in unknown state. + UNKNOWN = 0; + + // The link is configured and active within the bundle. + ACTIVE = 1; + + // The link is not configured within the bundle, this means the rest of + // the object should be empty. + DETACHED = 2; + } + + // The state of a LACP link. + State state = 1; + + // System ID of the port on Google's side of the LACP exchange. + string google_system_id = 2; + + // System ID of the port on the neighbor's side of the LACP exchange. + string neighbor_system_id = 3; + + // A true value indicates that the participant will allow the link to be + // used as part of the aggregate. + // A false value indicates the link should be used as an individual link. + bool aggregatable = 4; + + // If true, the participant is collecting incoming frames on the link, + // otherwise false + bool collecting = 5; + + // When true, the participant is distributing outgoing frames; when false, + // distribution is disabled + bool distributing = 6; + } + + // Describing a LLDP link. + message LinkLLDPStatus { + // The peer system's administratively assigned name. + string peer_system_name = 1; + + // The textual description of the network entity of LLDP peer. + string peer_system_description = 2; + + // The peer chassis component of the endpoint identifier associated with the + // transmitting LLDP agent. + string peer_chassis_id = 3; + + // The format and source of the peer chassis identifier string. + string peer_chassis_id_type = 4; + + // The port component of the endpoint identifier associated with the + // transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater + // port, then this TLV is optional. + string peer_port_id = 5; + + // The format and source of the peer port identifier string. + string peer_port_id_type = 6; + } + + // The MAC address of the Interconnect's bundle interface. + string mac_address = 1; + + // A list of LinkLayerAddress, describing the ip address and corresponding + // link-layer address of the neighbors for this interconnect. + repeated LinkLayerAddress link_layer_addresses = 2; + + // A list of LinkStatus objects, used to describe the status for each link on + // the Interconnect. + repeated LinkStatus links = 3; +} + +// Describing the current status of a router. +message RouterStatus { + // Status of a BGP peer. + message BgpPeerStatus { + // Status of the BGP peer: {UP, DOWN} + enum BgpStatus { + // The default status indicating BGP session is in unknown state. + UNKNOWN = 0; + + // The UP status indicating BGP session is established. + UP = 1; + + // The DOWN state indicating BGP session is not established yet. + DOWN = 2; + } + + // Name of this BGP peer. Unique within the Routers resource. + string name = 1; + + // IP address of the local BGP interface. + string ip_address = 2; + + // IP address of the remote BGP interface. + string peer_ip_address = 3; + + // The current status of BGP. + BgpStatus status = 4; + + // BGP state as specified in RFC1771. + string state = 5; + + // Time this session has been up. + // Format: + // 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds + string uptime = 6; + + // Time this session has been up, in seconds. + int64 uptime_seconds = 7; + + // A collection of counts for prefixes. + PrefixCounter prefix_counter = 8; + } + + // PrefixCounter contains a collection of prefixes related counts. + message PrefixCounter { + // Number of prefixes advertised. + int64 advertised = 1; + + // Number of prefixes denied. + int64 denied = 2; + + // Number of prefixes received. + int64 received = 3; + + // Number of prefixes sent. + int64 sent = 4; + + // Number of prefixes suppressed. + int64 suppressed = 5; + + // Number of prefixes withdrawn. + int64 withdrawn = 6; + } + + // The canonical name of the network to which this router belongs. + string network = 1 [(google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + }]; + + // A list of BgpPeerStatus objects, describing all BGP peers related to this + // router. + repeated BgpPeerStatus bgp_peer_status = 2; +} diff --git a/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/service.proto b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/service.proto new file mode 100644 index 000000000000..26d0e0361395 --- /dev/null +++ b/java-edgenetwork/proto-google-cloud-edgenetwork-v1/src/main/proto/google/cloud/edgenetwork/v1/service.proto @@ -0,0 +1,1005 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.edgenetwork.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/edgenetwork/v1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.EdgeNetwork.V1"; +option go_package = "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb;edgenetworkpb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.edgenetwork.v1"; +option php_namespace = "Google\\Cloud\\EdgeNetwork\\V1"; +option ruby_package = "Google::Cloud::EdgeNetwork::V1"; + +// EdgeNetwork API provides managed, highly available cloud dynamic network +// configuration service to the GEC customer to enable edge application and +// network function solutions. This allows the customers to easily define and +// configure the network setup and property to meet the workload requirement. +service EdgeNetwork { + option (google.api.default_host) = "edgenetwork.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // InitializeZone will initialize resources for a zone in a project. + rpc InitializeZone(InitializeZoneRequest) returns (InitializeZoneResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/zones/*}:initialize" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Zones in a given project and location. + rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/zones" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Zone. + rpc GetZone(GetZoneRequest) returns (Zone) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Networks in a given project and location. + rpc ListNetworks(ListNetworksRequest) returns (ListNetworksResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/zones/*}/networks" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Network. + rpc GetNetwork(GetNetworkRequest) returns (Network) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/networks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the diagnostics of a single network resource. + rpc DiagnoseNetwork(DiagnoseNetworkRequest) + returns (DiagnoseNetworkResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/networks/*}:diagnose" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Network in a given project and location. + rpc CreateNetwork(CreateNetworkRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/zones/*}/networks" + body: "network" + }; + option (google.api.method_signature) = "parent,network,network_id"; + option (google.longrunning.operation_info) = { + response_type: "Network" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Network. + rpc DeleteNetwork(DeleteNetworkRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/zones/*/networks/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Subnets in a given project and location. + rpc ListSubnets(ListSubnetsRequest) returns (ListSubnetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/zones/*}/subnets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Subnet. + rpc GetSubnet(GetSubnetRequest) returns (Subnet) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/subnets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Subnet in a given project and location. + rpc CreateSubnet(CreateSubnetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/zones/*}/subnets" + body: "subnet" + }; + option (google.api.method_signature) = "parent,subnet,subnet_id"; + option (google.longrunning.operation_info) = { + response_type: "Subnet" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Subnet. + rpc UpdateSubnet(UpdateSubnetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{subnet.name=projects/*/locations/*/zones/*/subnets/*}" + body: "subnet" + }; + option (google.api.method_signature) = "subnet,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Subnet" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Subnet. + rpc DeleteSubnet(DeleteSubnetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/zones/*/subnets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Interconnects in a given project and location. + rpc ListInterconnects(ListInterconnectsRequest) + returns (ListInterconnectsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/zones/*}/interconnects" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Interconnect. + rpc GetInterconnect(GetInterconnectRequest) returns (Interconnect) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/interconnects/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the diagnostics of a single interconnect resource. + rpc DiagnoseInterconnect(DiagnoseInterconnectRequest) + returns (DiagnoseInterconnectResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/interconnects/*}:diagnose" + }; + option (google.api.method_signature) = "name"; + } + + // Lists InterconnectAttachments in a given project and location. + rpc ListInterconnectAttachments(ListInterconnectAttachmentsRequest) + returns (ListInterconnectAttachmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/zones/*}/interconnectAttachments" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single InterconnectAttachment. + rpc GetInterconnectAttachment(GetInterconnectAttachmentRequest) + returns (InterconnectAttachment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/interconnectAttachments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new InterconnectAttachment in a given project and location. + rpc CreateInterconnectAttachment(CreateInterconnectAttachmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/zones/*}/interconnectAttachments" + body: "interconnect_attachment" + }; + option (google.api.method_signature) = + "parent,interconnect_attachment,interconnect_attachment_id"; + option (google.longrunning.operation_info) = { + response_type: "InterconnectAttachment" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single InterconnectAttachment. + rpc DeleteInterconnectAttachment(DeleteInterconnectAttachmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/zones/*/interconnectAttachments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Routers in a given project and location. + rpc ListRouters(ListRoutersRequest) returns (ListRoutersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/zones/*}/routers" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Router. + rpc GetRouter(GetRouterRequest) returns (Router) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/routers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the diagnostics of a single router resource. + rpc DiagnoseRouter(DiagnoseRouterRequest) returns (DiagnoseRouterResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/zones/*/routers/*}:diagnose" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Router in a given project and location. + rpc CreateRouter(CreateRouterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/zones/*}/routers" + body: "router" + }; + option (google.api.method_signature) = "parent,router,router_id"; + option (google.longrunning.operation_info) = { + response_type: "Router" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Router. + rpc UpdateRouter(UpdateRouterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{router.name=projects/*/locations/*/zones/*/routers/*}" + body: "router" + }; + option (google.api.method_signature) = "router,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Router" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Router. + rpc DeleteRouter(DeleteRouterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/zones/*/routers/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Message for requesting list of Zones +message ListZonesRequest { + // Required. Parent value for ListZonesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Zone" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Zones +message ListZonesResponse { + // The list of Zone + repeated Zone zones = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Zone +message GetZoneRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Zone" + } + ]; +} + +// Message for requesting list of Networks +message ListNetworksRequest { + // Required. Parent value for ListNetworksRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Network" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Networks +message ListNetworksResponse { + // The list of Network + repeated Network networks = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Network +message GetNetworkRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + } + ]; +} + +// Message for creating a Network +message CreateNetworkRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Network" + } + ]; + + // Required. Id of the requesting object + // If auto-generating Id server-side, remove this field and + // network_id from the method_signature of Create RPC + string network_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Network network = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a Network +message DeleteNetworkRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for requesting list of Subnets +message ListSubnetsRequest { + // Required. Parent value for ListSubnetsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Subnet" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Subnets +message ListSubnetsResponse { + // The list of Subnet + repeated Subnet subnets = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Subnet +message GetSubnetRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Subnet" + } + ]; +} + +// Message for creating a Subnet +message CreateSubnetRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Subnet" + } + ]; + + // Required. Id of the requesting object + // If auto-generating Id server-side, remove this field and + // subnet_id from the method_signature of Create RPC + string subnet_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Subnet subnet = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for updating a Subnet +message UpdateSubnetRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Subnet resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Subnet subnet = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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]; +} + +// Message for deleting a Subnet +message DeleteSubnetRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Subnet" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for requesting list of Interconnects +message ListInterconnectsRequest { + // Required. Parent value for ListInterconnectsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Interconnect" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Interconnects +message ListInterconnectsResponse { + // The list of Interconnect + repeated Interconnect interconnects = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Interconnect +message GetInterconnectRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Interconnect" + } + ]; +} + +// Message for requesting list of InterconnectAttachments +message ListInterconnectAttachmentsRequest { + // Required. Parent value for ListInterconnectAttachmentsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/InterconnectAttachment" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing InterconnectAttachments +message ListInterconnectAttachmentsResponse { + // The list of InterconnectAttachment + repeated InterconnectAttachment interconnect_attachments = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a InterconnectAttachment +message GetInterconnectAttachmentRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/InterconnectAttachment" + } + ]; +} + +// Message for creating a InterconnectAttachment +message CreateInterconnectAttachmentRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/InterconnectAttachment" + } + ]; + + // Required. Id of the requesting object + // If auto-generating Id server-side, remove this field and + // interconnect_attachment_id from the method_signature of Create RPC + string interconnect_attachment_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + InterconnectAttachment interconnect_attachment = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a InterconnectAttachment +message DeleteInterconnectAttachmentRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/InterconnectAttachment" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for requesting list of Routers +message ListRoutersRequest { + // Required. Parent value for ListRoutersRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Router" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing Routers +message ListRoutersResponse { + // The list of Router + repeated Router routers = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Router +message GetRouterRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Router" + } + ]; +} + +// Message for creating a Router +message CreateRouterRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "edgenetwork.googleapis.com/Router" + } + ]; + + // Required. Id of the requesting object + // If auto-generating Id server-side, remove this field and + // router_id from the method_signature of Create RPC + string router_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Router router = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for updating a Router +message UpdateRouterRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Router resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Router router = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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]; +} + +// Message for deleting a Router +message DeleteRouterRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Router" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // 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 if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally 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 = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// 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]; + + // Output only. The time the operation finished running. + 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]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // 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`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting the diagnostics of a network within a specific zone. +message DiagnoseNetworkRequest { + // Required. The name of the network resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Network" + } + ]; +} + +// DiagnoseNetworkResponse contains the current status for a specific network. +message DiagnoseNetworkResponse { + // NetworkStatus has a list of status for the subnets under the current + // network. + message NetworkStatus { + // A list of status for the subnets under the current network. + repeated SubnetStatus subnet_status = 1; + } + + // The time when the network status was last updated. + google.protobuf.Timestamp update_time = 1; + + // The network status of a specific network. + NetworkStatus result = 2; +} + +// Message for requesting the diagnostics of an interconnect within a specific +// zone. +message DiagnoseInterconnectRequest { + // Required. The name of the interconnect resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Interconnect" + } + ]; +} + +// DiagnoseInterconnectResponse contains the current diagnostics for a +// specific interconnect. +message DiagnoseInterconnectResponse { + // The time when the interconnect diagnostics was last updated. + google.protobuf.Timestamp update_time = 1; + + // The network status of a specific interconnect. + InterconnectDiagnostics result = 2; +} + +// Message for requesting diagnositcs of a router within a specific zone. +message DiagnoseRouterRequest { + // Required. The name of the router resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Router" + } + ]; +} + +// DiagnoseRouterResponse contains the current status for a specific router. +message DiagnoseRouterResponse { + // The time when the router status was last updated. + google.protobuf.Timestamp update_time = 1; + + // The network status of a specific router. + RouterStatus result = 2; +} + +// Message for initializing a specified zone +message InitializeZoneRequest { + // Required. The name of the zone resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "edgenetwork.googleapis.com/Zone" + } + ]; +} + +// The response of initializing a zone +message InitializeZoneResponse {} diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..dfb318789ee7 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.EdgeNetworkSettings; +import com.google.cloud.edgenetwork.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated 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 + EdgeNetworkSettings edgeNetworkSettings = + EdgeNetworkSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings); + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_Create_SetCredentialsProvider_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider1.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..1d5fc0746a06 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * 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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_Create_SetCredentialsProvider1_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.EdgeNetworkSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() 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 + EdgeNetworkSettings edgeNetworkSettings = EdgeNetworkSettings.newHttpJsonBuilder().build(); + EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings); + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_Create_SetCredentialsProvider1_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetEndpoint.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..2d25a0c4a192 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * 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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_Create_SetEndpoint_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.EdgeNetworkSettings; +import com.google.cloud.edgenetwork.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated 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 + EdgeNetworkSettings edgeNetworkSettings = + EdgeNetworkSettings.newBuilder().setEndpoint(myEndpoint).build(); + EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings); + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_Create_SetEndpoint_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachment.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachment.java new file mode 100644 index 000000000000..53bbff71b913 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachment.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.longrunning.Operation; + +public class AsyncCreateInterconnectAttachment { + + public static void main(String[] args) throws Exception { + asyncCreateInterconnectAttachment(); + } + + public static void asyncCreateInterconnectAttachment() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateInterconnectAttachmentRequest request = + CreateInterconnectAttachmentRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setInterconnectAttachmentId("interconnectAttachmentId1053538636") + .setInterconnectAttachment(InterconnectAttachment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + edgeNetworkClient.createInterconnectAttachmentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachmentLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachmentLRO.java new file mode 100644 index 000000000000..f6768829176f --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/AsyncCreateInterconnectAttachmentLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncCreateInterconnectAttachmentLRO { + + public static void main(String[] args) throws Exception { + asyncCreateInterconnectAttachmentLRO(); + } + + public static void asyncCreateInterconnectAttachmentLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateInterconnectAttachmentRequest request = + CreateInterconnectAttachmentRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setInterconnectAttachmentId("interconnectAttachmentId1053538636") + .setInterconnectAttachment(InterconnectAttachment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.createInterconnectAttachmentOperationCallable().futureCall(request); + // Do something. + InterconnectAttachment response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachment.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachment.java new file mode 100644 index 000000000000..e0f3eef82de9 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachment.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_sync] +import com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateInterconnectAttachment { + + public static void main(String[] args) throws Exception { + syncCreateInterconnectAttachment(); + } + + public static void syncCreateInterconnectAttachment() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateInterconnectAttachmentRequest request = + CreateInterconnectAttachmentRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setInterconnectAttachmentId("interconnectAttachmentId1053538636") + .setInterconnectAttachment(InterconnectAttachment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + InterconnectAttachment response = + edgeNetworkClient.createInterconnectAttachmentAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentStringInterconnectattachmentString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentStringInterconnectattachmentString.java new file mode 100644 index 000000000000..6a4b6a68d858 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentStringInterconnectattachmentString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_StringInterconnectattachmentString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateInterconnectAttachmentStringInterconnectattachmentString { + + public static void main(String[] args) throws Exception { + syncCreateInterconnectAttachmentStringInterconnectattachmentString(); + } + + public static void syncCreateInterconnectAttachmentStringInterconnectattachmentString() + 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + InterconnectAttachment response = + edgeNetworkClient + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_StringInterconnectattachmentString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentZonenameInterconnectattachmentString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentZonenameInterconnectattachmentString.java new file mode 100644 index 000000000000..3b2e7e1f150c --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createinterconnectattachment/SyncCreateInterconnectAttachmentZonenameInterconnectattachmentString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_ZonenameInterconnectattachmentString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateInterconnectAttachmentZonenameInterconnectattachmentString { + + public static void main(String[] args) throws Exception { + syncCreateInterconnectAttachmentZonenameInterconnectattachmentString(); + } + + public static void syncCreateInterconnectAttachmentZonenameInterconnectattachmentString() + 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); + String interconnectAttachmentId = "interconnectAttachmentId1053538636"; + InterconnectAttachment response = + edgeNetworkClient + .createInterconnectAttachmentAsync( + parent, interconnectAttachment, interconnectAttachmentId) + .get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateInterconnectAttachment_ZonenameInterconnectattachmentString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetwork.java new file mode 100644 index 000000000000..8da9b442893b --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.longrunning.Operation; + +public class AsyncCreateNetwork { + + public static void main(String[] args) throws Exception { + asyncCreateNetwork(); + } + + public static void asyncCreateNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateNetworkRequest request = + CreateNetworkRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setNetworkId("networkId2062782441") + .setNetwork(Network.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.createNetworkCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetworkLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetworkLRO.java new file mode 100644 index 000000000000..bca337c52ba2 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/AsyncCreateNetworkLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncCreateNetworkLRO { + + public static void main(String[] args) throws Exception { + asyncCreateNetworkLRO(); + } + + public static void asyncCreateNetworkLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateNetworkRequest request = + CreateNetworkRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setNetworkId("networkId2062782441") + .setNetwork(Network.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.createNetworkOperationCallable().futureCall(request); + // Do something. + Network response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetwork.java new file mode 100644 index 000000000000..201c13027f0c --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_sync] +import com.google.cloud.edgenetwork.v1.CreateNetworkRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateNetwork { + + public static void main(String[] args) throws Exception { + syncCreateNetwork(); + } + + public static void syncCreateNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateNetworkRequest request = + CreateNetworkRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setNetworkId("networkId2062782441") + .setNetwork(Network.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Network response = edgeNetworkClient.createNetworkAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkStringNetworkString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkStringNetworkString.java new file mode 100644 index 000000000000..b7949dcc6079 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkStringNetworkString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_StringNetworkString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateNetworkStringNetworkString { + + public static void main(String[] args) throws Exception { + syncCreateNetworkStringNetworkString(); + } + + public static void syncCreateNetworkStringNetworkString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + Network response = edgeNetworkClient.createNetworkAsync(parent, network, networkId).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_StringNetworkString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkZonenameNetworkString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkZonenameNetworkString.java new file mode 100644 index 000000000000..5b91527679d6 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createnetwork/SyncCreateNetworkZonenameNetworkString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_ZonenameNetworkString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateNetworkZonenameNetworkString { + + public static void main(String[] args) throws Exception { + syncCreateNetworkZonenameNetworkString(); + } + + public static void syncCreateNetworkZonenameNetworkString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Network network = Network.newBuilder().build(); + String networkId = "networkId2062782441"; + Network response = edgeNetworkClient.createNetworkAsync(parent, network, networkId).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateNetwork_ZonenameNetworkString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouter.java new file mode 100644 index 000000000000..174b2f4bcca8 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateRouter_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.longrunning.Operation; + +public class AsyncCreateRouter { + + public static void main(String[] args) throws Exception { + asyncCreateRouter(); + } + + public static void asyncCreateRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateRouterRequest request = + CreateRouterRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRouterId("routerId5435972") + .setRouter(Router.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.createRouterCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateRouter_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouterLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouterLRO.java new file mode 100644 index 000000000000..a78947cf2984 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/AsyncCreateRouterLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateRouter_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncCreateRouterLRO { + + public static void main(String[] args) throws Exception { + asyncCreateRouterLRO(); + } + + public static void asyncCreateRouterLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateRouterRequest request = + CreateRouterRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRouterId("routerId5435972") + .setRouter(Router.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.createRouterOperationCallable().futureCall(request); + // Do something. + Router response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateRouter_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouter.java new file mode 100644 index 000000000000..fc19d53a60d0 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateRouter_sync] +import com.google.cloud.edgenetwork.v1.CreateRouterRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateRouter { + + public static void main(String[] args) throws Exception { + syncCreateRouter(); + } + + public static void syncCreateRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateRouterRequest request = + CreateRouterRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRouterId("routerId5435972") + .setRouter(Router.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Router response = edgeNetworkClient.createRouterAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateRouter_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterStringRouterString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterStringRouterString.java new file mode 100644 index 000000000000..a87e203d21c5 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterStringRouterString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateRouter_StringRouterString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateRouterStringRouterString { + + public static void main(String[] args) throws Exception { + syncCreateRouterStringRouterString(); + } + + public static void syncCreateRouterStringRouterString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + Router response = edgeNetworkClient.createRouterAsync(parent, router, routerId).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateRouter_StringRouterString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterZonenameRouterString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterZonenameRouterString.java new file mode 100644 index 000000000000..7f03e86b193a --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createrouter/SyncCreateRouterZonenameRouterString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateRouter_ZonenameRouterString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateRouterZonenameRouterString { + + public static void main(String[] args) throws Exception { + syncCreateRouterZonenameRouterString(); + } + + public static void syncCreateRouterZonenameRouterString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Router router = Router.newBuilder().build(); + String routerId = "routerId5435972"; + Router response = edgeNetworkClient.createRouterAsync(parent, router, routerId).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateRouter_ZonenameRouterString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnet.java new file mode 100644 index 000000000000..86e85a32fff9 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.longrunning.Operation; + +public class AsyncCreateSubnet { + + public static void main(String[] args) throws Exception { + asyncCreateSubnet(); + } + + public static void asyncCreateSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateSubnetRequest request = + CreateSubnetRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setSubnetId("subnetId-2066159272") + .setSubnet(Subnet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.createSubnetCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnetLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnetLRO.java new file mode 100644 index 000000000000..6ba42610d859 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/AsyncCreateSubnetLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncCreateSubnetLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSubnetLRO(); + } + + public static void asyncCreateSubnetLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateSubnetRequest request = + CreateSubnetRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setSubnetId("subnetId-2066159272") + .setSubnet(Subnet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.createSubnetOperationCallable().futureCall(request); + // Do something. + Subnet response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnet.java new file mode 100644 index 000000000000..a90f55ca5498 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_sync] +import com.google.cloud.edgenetwork.v1.CreateSubnetRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateSubnet { + + public static void main(String[] args) throws Exception { + syncCreateSubnet(); + } + + public static void syncCreateSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + CreateSubnetRequest request = + CreateSubnetRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setSubnetId("subnetId-2066159272") + .setSubnet(Subnet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Subnet response = edgeNetworkClient.createSubnetAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetStringSubnetString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetStringSubnetString.java new file mode 100644 index 000000000000..c67bf2177907 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetStringSubnetString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_StringSubnetString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateSubnetStringSubnetString { + + public static void main(String[] args) throws Exception { + syncCreateSubnetStringSubnetString(); + } + + public static void syncCreateSubnetStringSubnetString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + Subnet response = edgeNetworkClient.createSubnetAsync(parent, subnet, subnetId).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_StringSubnetString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetZonenameSubnetString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetZonenameSubnetString.java new file mode 100644 index 000000000000..6c869461d32f --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/createsubnet/SyncCreateSubnetZonenameSubnetString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_ZonenameSubnetString_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncCreateSubnetZonenameSubnetString { + + public static void main(String[] args) throws Exception { + syncCreateSubnetZonenameSubnetString(); + } + + public static void syncCreateSubnetZonenameSubnetString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Subnet subnet = Subnet.newBuilder().build(); + String subnetId = "subnetId-2066159272"; + Subnet response = edgeNetworkClient.createSubnetAsync(parent, subnet, subnetId).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_CreateSubnet_ZonenameSubnetString_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachment.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachment.java new file mode 100644 index 000000000000..ab1510840f6b --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachment.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; +import com.google.longrunning.Operation; + +public class AsyncDeleteInterconnectAttachment { + + public static void main(String[] args) throws Exception { + asyncDeleteInterconnectAttachment(); + } + + public static void asyncDeleteInterconnectAttachment() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + edgeNetworkClient.deleteInterconnectAttachmentCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachmentLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachmentLRO.java new file mode 100644 index 000000000000..d9d973b0a36d --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/AsyncDeleteInterconnectAttachmentLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteInterconnectAttachmentLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteInterconnectAttachmentLRO(); + } + + public static void asyncDeleteInterconnectAttachmentLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.deleteInterconnectAttachmentOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachment.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachment.java new file mode 100644 index 000000000000..5495fcd4eaf5 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachment.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_sync] +import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; +import com.google.protobuf.Empty; + +public class SyncDeleteInterconnectAttachment { + + public static void main(String[] args) throws Exception { + syncDeleteInterconnectAttachment(); + } + + public static void syncDeleteInterconnectAttachment() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteInterconnectAttachmentRequest request = + DeleteInterconnectAttachmentRequest.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .setRequestId("requestId693933066") + .build(); + edgeNetworkClient.deleteInterconnectAttachmentAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentInterconnectattachmentname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentInterconnectattachmentname.java new file mode 100644 index 000000000000..a10fef1f06ef --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentInterconnectattachmentname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_Interconnectattachmentname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; +import com.google.protobuf.Empty; + +public class SyncDeleteInterconnectAttachmentInterconnectattachmentname { + + public static void main(String[] args) throws Exception { + syncDeleteInterconnectAttachmentInterconnectattachmentname(); + } + + public static void syncDeleteInterconnectAttachmentInterconnectattachmentname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + edgeNetworkClient.deleteInterconnectAttachmentAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_Interconnectattachmentname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentString.java new file mode 100644 index 000000000000..5865eec0e24a --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleteinterconnectattachment/SyncDeleteInterconnectAttachmentString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; +import com.google.protobuf.Empty; + +public class SyncDeleteInterconnectAttachmentString { + + public static void main(String[] args) throws Exception { + syncDeleteInterconnectAttachmentString(); + } + + public static void syncDeleteInterconnectAttachmentString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString(); + edgeNetworkClient.deleteInterconnectAttachmentAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteInterconnectAttachment_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetwork.java new file mode 100644 index 000000000000..033167eaba97 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; +import com.google.longrunning.Operation; + +public class AsyncDeleteNetwork { + + public static void main(String[] args) throws Exception { + asyncDeleteNetwork(); + } + + public static void asyncDeleteNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.deleteNetworkCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetworkLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetworkLRO.java new file mode 100644 index 000000000000..2dcf7032fe5a --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/AsyncDeleteNetworkLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteNetworkLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteNetworkLRO(); + } + + public static void asyncDeleteNetworkLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.deleteNetworkOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetwork.java new file mode 100644 index 000000000000..1d092dfa4e50 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_sync] +import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; +import com.google.protobuf.Empty; + +public class SyncDeleteNetwork { + + public static void main(String[] args) throws Exception { + syncDeleteNetwork(); + } + + public static void syncDeleteNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteNetworkRequest request = + DeleteNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .setRequestId("requestId693933066") + .build(); + edgeNetworkClient.deleteNetworkAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkNetworkname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkNetworkname.java new file mode 100644 index 000000000000..8190d690f90f --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkNetworkname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_Networkname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; +import com.google.protobuf.Empty; + +public class SyncDeleteNetworkNetworkname { + + public static void main(String[] args) throws Exception { + syncDeleteNetworkNetworkname(); + } + + public static void syncDeleteNetworkNetworkname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + edgeNetworkClient.deleteNetworkAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_Networkname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkString.java new file mode 100644 index 000000000000..3fd7662cd6df --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletenetwork/SyncDeleteNetworkString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; +import com.google.protobuf.Empty; + +public class SyncDeleteNetworkString { + + public static void main(String[] args) throws Exception { + syncDeleteNetworkString(); + } + + public static void syncDeleteNetworkString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString(); + edgeNetworkClient.deleteNetworkAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteNetwork_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouter.java new file mode 100644 index 000000000000..79b4deac9e1e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; +import com.google.longrunning.Operation; + +public class AsyncDeleteRouter { + + public static void main(String[] args) throws Exception { + asyncDeleteRouter(); + } + + public static void asyncDeleteRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.deleteRouterCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouterLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouterLRO.java new file mode 100644 index 000000000000..6dd9762bf037 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/AsyncDeleteRouterLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.RouterName; +import com.google.protobuf.Empty; + +public class AsyncDeleteRouterLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteRouterLRO(); + } + + public static void asyncDeleteRouterLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.deleteRouterOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouter.java new file mode 100644 index 000000000000..bd62411b4a70 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_sync] +import com.google.cloud.edgenetwork.v1.DeleteRouterRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; +import com.google.protobuf.Empty; + +public class SyncDeleteRouter { + + public static void main(String[] args) throws Exception { + syncDeleteRouter(); + } + + public static void syncDeleteRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteRouterRequest request = + DeleteRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .setRequestId("requestId693933066") + .build(); + edgeNetworkClient.deleteRouterAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterRoutername.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterRoutername.java new file mode 100644 index 000000000000..93b94d6647d3 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterRoutername.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_Routername_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; +import com.google.protobuf.Empty; + +public class SyncDeleteRouterRoutername { + + public static void main(String[] args) throws Exception { + syncDeleteRouterRoutername(); + } + + public static void syncDeleteRouterRoutername() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + edgeNetworkClient.deleteRouterAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_Routername_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterString.java new file mode 100644 index 000000000000..c245b250223d --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deleterouter/SyncDeleteRouterString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; +import com.google.protobuf.Empty; + +public class SyncDeleteRouterString { + + public static void main(String[] args) throws Exception { + syncDeleteRouterString(); + } + + public static void syncDeleteRouterString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString(); + edgeNetworkClient.deleteRouterAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteRouter_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnet.java new file mode 100644 index 000000000000..7f5086edc629 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.SubnetName; +import com.google.longrunning.Operation; + +public class AsyncDeleteSubnet { + + public static void main(String[] args) throws Exception { + asyncDeleteSubnet(); + } + + public static void asyncDeleteSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteSubnetRequest request = + DeleteSubnetRequest.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.deleteSubnetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnetLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnetLRO.java new file mode 100644 index 000000000000..ce374ad9616e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/AsyncDeleteSubnetLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.SubnetName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSubnetLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSubnetLRO(); + } + + public static void asyncDeleteSubnetLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteSubnetRequest request = + DeleteSubnetRequest.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.deleteSubnetOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnet.java new file mode 100644 index 000000000000..1dd5e4a9edb9 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_sync] +import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.SubnetName; +import com.google.protobuf.Empty; + +public class SyncDeleteSubnet { + + public static void main(String[] args) throws Exception { + syncDeleteSubnet(); + } + + public static void syncDeleteSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DeleteSubnetRequest request = + DeleteSubnetRequest.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .setRequestId("requestId693933066") + .build(); + edgeNetworkClient.deleteSubnetAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetString.java new file mode 100644 index 000000000000..40994379a28e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.SubnetName; +import com.google.protobuf.Empty; + +public class SyncDeleteSubnetString { + + public static void main(String[] args) throws Exception { + syncDeleteSubnetString(); + } + + public static void syncDeleteSubnetString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString(); + edgeNetworkClient.deleteSubnetAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetSubnetname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetSubnetname.java new file mode 100644 index 000000000000..76b2588313a8 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/deletesubnet/SyncDeleteSubnetSubnetname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_Subnetname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.SubnetName; +import com.google.protobuf.Empty; + +public class SyncDeleteSubnetSubnetname { + + public static void main(String[] args) throws Exception { + syncDeleteSubnetSubnetname(); + } + + public static void syncDeleteSubnetSubnetname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + edgeNetworkClient.deleteSubnetAsync(name).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DeleteSubnet_Subnetname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/AsyncDiagnoseInterconnect.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/AsyncDiagnoseInterconnect.java new file mode 100644 index 000000000000..e9f165bdfab4 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/AsyncDiagnoseInterconnect.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class AsyncDiagnoseInterconnect { + + public static void main(String[] args) throws Exception { + asyncDiagnoseInterconnect(); + } + + public static void asyncDiagnoseInterconnect() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DiagnoseInterconnectRequest request = + DiagnoseInterconnectRequest.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .build(); + ApiFuture future = + edgeNetworkClient.diagnoseInterconnectCallable().futureCall(request); + // Do something. + DiagnoseInterconnectResponse response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnect.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnect.java new file mode 100644 index 000000000000..99d219165a71 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnect.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class SyncDiagnoseInterconnect { + + public static void main(String[] args) throws Exception { + syncDiagnoseInterconnect(); + } + + public static void syncDiagnoseInterconnect() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DiagnoseInterconnectRequest request = + DiagnoseInterconnectRequest.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .build(); + DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectInterconnectname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectInterconnectname.java new file mode 100644 index 000000000000..fac9c06fcc75 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectInterconnectname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_Interconnectname_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class SyncDiagnoseInterconnectInterconnectname { + + public static void main(String[] args) throws Exception { + syncDiagnoseInterconnectInterconnectname(); + } + + public static void syncDiagnoseInterconnectInterconnectname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_Interconnectname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectString.java new file mode 100644 index 000000000000..1c3f279fbcd8 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoseinterconnect/SyncDiagnoseInterconnectString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_String_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class SyncDiagnoseInterconnectString { + + public static void main(String[] args) throws Exception { + syncDiagnoseInterconnectString(); + } + + public static void syncDiagnoseInterconnectString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]").toString(); + DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseInterconnect_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/AsyncDiagnoseNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/AsyncDiagnoseNetwork.java new file mode 100644 index 000000000000..0cdde7e8486e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/AsyncDiagnoseNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class AsyncDiagnoseNetwork { + + public static void main(String[] args) throws Exception { + asyncDiagnoseNetwork(); + } + + public static void asyncDiagnoseNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DiagnoseNetworkRequest request = + DiagnoseNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .build(); + ApiFuture future = + edgeNetworkClient.diagnoseNetworkCallable().futureCall(request); + // Do something. + DiagnoseNetworkResponse response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetwork.java new file mode 100644 index 000000000000..5c141a06cdc2 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class SyncDiagnoseNetwork { + + public static void main(String[] args) throws Exception { + syncDiagnoseNetwork(); + } + + public static void syncDiagnoseNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DiagnoseNetworkRequest request = + DiagnoseNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .build(); + DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkNetworkname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkNetworkname.java new file mode 100644 index 000000000000..5b9aebb57fd4 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkNetworkname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_Networkname_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class SyncDiagnoseNetworkNetworkname { + + public static void main(String[] args) throws Exception { + syncDiagnoseNetworkNetworkname(); + } + + public static void syncDiagnoseNetworkNetworkname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_Networkname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkString.java new file mode 100644 index 000000000000..195629a4f164 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnosenetwork/SyncDiagnoseNetworkString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_String_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class SyncDiagnoseNetworkString { + + public static void main(String[] args) throws Exception { + syncDiagnoseNetworkString(); + } + + public static void syncDiagnoseNetworkString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString(); + DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseNetwork_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/AsyncDiagnoseRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/AsyncDiagnoseRouter.java new file mode 100644 index 000000000000..1f3da227e4f9 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/AsyncDiagnoseRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class AsyncDiagnoseRouter { + + public static void main(String[] args) throws Exception { + asyncDiagnoseRouter(); + } + + public static void asyncDiagnoseRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DiagnoseRouterRequest request = + DiagnoseRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .build(); + ApiFuture future = + edgeNetworkClient.diagnoseRouterCallable().futureCall(request); + // Do something. + DiagnoseRouterResponse response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouter.java new file mode 100644 index 000000000000..91da3acdc031 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest; +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class SyncDiagnoseRouter { + + public static void main(String[] args) throws Exception { + syncDiagnoseRouter(); + } + + public static void syncDiagnoseRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + DiagnoseRouterRequest request = + DiagnoseRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .build(); + DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterRoutername.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterRoutername.java new file mode 100644 index 000000000000..786827a34fbc --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterRoutername.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_Routername_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class SyncDiagnoseRouterRoutername { + + public static void main(String[] args) throws Exception { + syncDiagnoseRouterRoutername(); + } + + public static void syncDiagnoseRouterRoutername() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_Routername_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterString.java new file mode 100644 index 000000000000..2d42a4d5ae56 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/diagnoserouter/SyncDiagnoseRouterString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_String_sync] +import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class SyncDiagnoseRouterString { + + public static void main(String[] args) throws Exception { + syncDiagnoseRouterString(); + } + + public static void syncDiagnoseRouterString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString(); + DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_DiagnoseRouter_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/AsyncGetInterconnect.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/AsyncGetInterconnect.java new file mode 100644 index 000000000000..c6a7a0904289 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/AsyncGetInterconnect.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetInterconnectRequest; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class AsyncGetInterconnect { + + public static void main(String[] args) throws Exception { + asyncGetInterconnect(); + } + + public static void asyncGetInterconnect() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetInterconnectRequest request = + GetInterconnectRequest.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .build(); + ApiFuture future = + edgeNetworkClient.getInterconnectCallable().futureCall(request); + // Do something. + Interconnect response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnect.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnect.java new file mode 100644 index 000000000000..0ef81e0ef1cd --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnect.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetInterconnectRequest; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class SyncGetInterconnect { + + public static void main(String[] args) throws Exception { + syncGetInterconnect(); + } + + public static void syncGetInterconnect() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetInterconnectRequest request = + GetInterconnectRequest.newBuilder() + .setName( + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") + .toString()) + .build(); + Interconnect response = edgeNetworkClient.getInterconnect(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectInterconnectname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectInterconnectname.java new file mode 100644 index 000000000000..f96a6b179d5d --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectInterconnectname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_Interconnectname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class SyncGetInterconnectInterconnectname { + + public static void main(String[] args) throws Exception { + syncGetInterconnectInterconnectname(); + } + + public static void syncGetInterconnectInterconnectname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + InterconnectName name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); + Interconnect response = edgeNetworkClient.getInterconnect(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_Interconnectname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectString.java new file mode 100644 index 000000000000..c19bb2f7477a --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnect/SyncGetInterconnectString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.InterconnectName; + +public class SyncGetInterconnectString { + + public static void main(String[] args) throws Exception { + syncGetInterconnectString(); + } + + public static void syncGetInterconnectString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = + InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]").toString(); + Interconnect response = edgeNetworkClient.getInterconnect(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnect_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/AsyncGetInterconnectAttachment.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/AsyncGetInterconnectAttachment.java new file mode 100644 index 000000000000..8c0aad8608d6 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/AsyncGetInterconnectAttachment.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; + +public class AsyncGetInterconnectAttachment { + + public static void main(String[] args) throws Exception { + asyncGetInterconnectAttachment(); + } + + public static void asyncGetInterconnectAttachment() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .build(); + ApiFuture future = + edgeNetworkClient.getInterconnectAttachmentCallable().futureCall(request); + // Do something. + InterconnectAttachment response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachment.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachment.java new file mode 100644 index 000000000000..622dc8eaac40 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachment.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; + +public class SyncGetInterconnectAttachment { + + public static void main(String[] args) throws Exception { + syncGetInterconnectAttachment(); + } + + public static void syncGetInterconnectAttachment() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder() + .setName( + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString()) + .build(); + InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentInterconnectattachmentname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentInterconnectattachmentname.java new file mode 100644 index 000000000000..1d2c74a687fd --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentInterconnectattachmentname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_Interconnectattachmentname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; + +public class SyncGetInterconnectAttachmentInterconnectattachmentname { + + public static void main(String[] args) throws Exception { + syncGetInterconnectAttachmentInterconnectattachmentname(); + } + + public static void syncGetInterconnectAttachmentInterconnectattachmentname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + InterconnectAttachmentName name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); + InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_Interconnectattachmentname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentString.java new file mode 100644 index 000000000000..a195f4ff009e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getinterconnectattachment/SyncGetInterconnectAttachmentString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.InterconnectAttachmentName; + +public class SyncGetInterconnectAttachmentString { + + public static void main(String[] args) throws Exception { + syncGetInterconnectAttachmentString(); + } + + public static void syncGetInterconnectAttachmentString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = + InterconnectAttachmentName.of( + "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") + .toString(); + InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetInterconnectAttachment_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getlocation/AsyncGetLocation.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..46f72ee54acc --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = edgeNetworkClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetLocation_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getlocation/SyncGetLocation.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..2a463f38b923 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetLocation_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = edgeNetworkClient.getLocation(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetLocation_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/AsyncGetNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/AsyncGetNetwork.java new file mode 100644 index 000000000000..dd9cd83f2648 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/AsyncGetNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetNetwork_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetNetworkRequest; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class AsyncGetNetwork { + + public static void main(String[] args) throws Exception { + asyncGetNetwork(); + } + + public static void asyncGetNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .build(); + ApiFuture future = edgeNetworkClient.getNetworkCallable().futureCall(request); + // Do something. + Network response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetNetwork_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetwork.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetwork.java new file mode 100644 index 000000000000..b7f8b21b1aa3 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetwork.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetNetwork_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetNetworkRequest; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class SyncGetNetwork { + + public static void main(String[] args) throws Exception { + syncGetNetwork(); + } + + public static void syncGetNetwork() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder() + .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) + .build(); + Network response = edgeNetworkClient.getNetwork(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetNetwork_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkNetworkname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkNetworkname.java new file mode 100644 index 000000000000..0a586999cd20 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkNetworkname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetNetwork_Networkname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class SyncGetNetworkNetworkname { + + public static void main(String[] args) throws Exception { + syncGetNetworkNetworkname(); + } + + public static void syncGetNetworkNetworkname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); + Network response = edgeNetworkClient.getNetwork(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetNetwork_Networkname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkString.java new file mode 100644 index 000000000000..1b6525d1aeb2 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getnetwork/SyncGetNetworkString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetNetwork_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.NetworkName; + +public class SyncGetNetworkString { + + public static void main(String[] args) throws Exception { + syncGetNetworkString(); + } + + public static void syncGetNetworkString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString(); + Network response = edgeNetworkClient.getNetwork(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetNetwork_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/AsyncGetRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/AsyncGetRouter.java new file mode 100644 index 000000000000..1330e6cb5fac --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/AsyncGetRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetRouter_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetRouterRequest; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class AsyncGetRouter { + + public static void main(String[] args) throws Exception { + asyncGetRouter(); + } + + public static void asyncGetRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetRouterRequest request = + GetRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .build(); + ApiFuture future = edgeNetworkClient.getRouterCallable().futureCall(request); + // Do something. + Router response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetRouter_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouter.java new file mode 100644 index 000000000000..829f77f09680 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetRouter_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetRouterRequest; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class SyncGetRouter { + + public static void main(String[] args) throws Exception { + syncGetRouter(); + } + + public static void syncGetRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetRouterRequest request = + GetRouterRequest.newBuilder() + .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) + .build(); + Router response = edgeNetworkClient.getRouter(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetRouter_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterRoutername.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterRoutername.java new file mode 100644 index 000000000000..735a355243b6 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterRoutername.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetRouter_Routername_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class SyncGetRouterRoutername { + + public static void main(String[] args) throws Exception { + syncGetRouterRoutername(); + } + + public static void syncGetRouterRoutername() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); + Router response = edgeNetworkClient.getRouter(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetRouter_Routername_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterString.java new file mode 100644 index 000000000000..ba37988e3825 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getrouter/SyncGetRouterString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetRouter_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.RouterName; + +public class SyncGetRouterString { + + public static void main(String[] args) throws Exception { + syncGetRouterString(); + } + + public static void syncGetRouterString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString(); + Router response = edgeNetworkClient.getRouter(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetRouter_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/AsyncGetSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/AsyncGetSubnet.java new file mode 100644 index 000000000000..d7dc568d4698 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/AsyncGetSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetSubnet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetSubnetRequest; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.SubnetName; + +public class AsyncGetSubnet { + + public static void main(String[] args) throws Exception { + asyncGetSubnet(); + } + + public static void asyncGetSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetSubnetRequest request = + GetSubnetRequest.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .build(); + ApiFuture future = edgeNetworkClient.getSubnetCallable().futureCall(request); + // Do something. + Subnet response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetSubnet_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnet.java new file mode 100644 index 000000000000..be2284321b55 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetSubnet_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetSubnetRequest; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.SubnetName; + +public class SyncGetSubnet { + + public static void main(String[] args) throws Exception { + syncGetSubnet(); + } + + public static void syncGetSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetSubnetRequest request = + GetSubnetRequest.newBuilder() + .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) + .build(); + Subnet response = edgeNetworkClient.getSubnet(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetSubnet_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetString.java new file mode 100644 index 000000000000..3bfe4bced599 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetSubnet_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.SubnetName; + +public class SyncGetSubnetString { + + public static void main(String[] args) throws Exception { + syncGetSubnetString(); + } + + public static void syncGetSubnetString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString(); + Subnet response = edgeNetworkClient.getSubnet(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetSubnet_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetSubnetname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetSubnetname.java new file mode 100644 index 000000000000..1525c4b522e8 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getsubnet/SyncGetSubnetSubnetname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetSubnet_Subnetname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.SubnetName; + +public class SyncGetSubnetSubnetname { + + public static void main(String[] args) throws Exception { + syncGetSubnetSubnetname(); + } + + public static void syncGetSubnetSubnetname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); + Subnet response = edgeNetworkClient.getSubnet(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetSubnet_Subnetname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/AsyncGetZone.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/AsyncGetZone.java new file mode 100644 index 000000000000..9ef1fb9182d2 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/AsyncGetZone.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetZone_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetZoneRequest; +import com.google.cloud.edgenetwork.v1.Zone; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncGetZone { + + public static void main(String[] args) throws Exception { + asyncGetZone(); + } + + public static void asyncGetZone() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetZoneRequest request = + GetZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .build(); + ApiFuture future = edgeNetworkClient.getZoneCallable().futureCall(request); + // Do something. + Zone response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetZone_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZone.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZone.java new file mode 100644 index 000000000000..dd8ff39f8a6d --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZone.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetZone_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.GetZoneRequest; +import com.google.cloud.edgenetwork.v1.Zone; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncGetZone { + + public static void main(String[] args) throws Exception { + syncGetZone(); + } + + public static void syncGetZone() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + GetZoneRequest request = + GetZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .build(); + Zone response = edgeNetworkClient.getZone(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetZone_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneString.java new file mode 100644 index 000000000000..004642f66597 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetZone_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Zone; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncGetZoneString { + + public static void main(String[] args) throws Exception { + syncGetZoneString(); + } + + public static void syncGetZoneString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + Zone response = edgeNetworkClient.getZone(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetZone_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneZonename.java new file mode 100644 index 000000000000..6118b3f852d0 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/getzone/SyncGetZoneZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_GetZone_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Zone; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncGetZoneZonename { + + public static void main(String[] args) throws Exception { + syncGetZoneZonename(); + } + + public static void syncGetZoneZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Zone response = edgeNetworkClient.getZone(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_GetZone_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/AsyncInitializeZone.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/AsyncInitializeZone.java new file mode 100644 index 000000000000..8bc1f07509c3 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/AsyncInitializeZone.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_InitializeZone_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InitializeZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncInitializeZone { + + public static void main(String[] args) throws Exception { + asyncInitializeZone(); + } + + public static void asyncInitializeZone() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + InitializeZoneRequest request = + InitializeZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .build(); + ApiFuture future = + edgeNetworkClient.initializeZoneCallable().futureCall(request); + // Do something. + InitializeZoneResponse response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_InitializeZone_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZone.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZone.java new file mode 100644 index 000000000000..57e87d2e3ad6 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZone.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_InitializeZone_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InitializeZoneRequest; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncInitializeZone { + + public static void main(String[] args) throws Exception { + syncInitializeZone(); + } + + public static void syncInitializeZone() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + InitializeZoneRequest request = + InitializeZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .build(); + InitializeZoneResponse response = edgeNetworkClient.initializeZone(request); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_InitializeZone_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneString.java new file mode 100644 index 000000000000..dfd18d29ea39 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_InitializeZone_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncInitializeZoneString { + + public static void main(String[] args) throws Exception { + syncInitializeZoneString(); + } + + public static void syncInitializeZoneString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + InitializeZoneResponse response = edgeNetworkClient.initializeZone(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_InitializeZone_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneZonename.java new file mode 100644 index 000000000000..07091bcbe01e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/initializezone/SyncInitializeZoneZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_InitializeZone_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InitializeZoneResponse; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncInitializeZoneZonename { + + public static void main(String[] args) throws Exception { + syncInitializeZoneZonename(); + } + + public static void syncInitializeZoneZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + InitializeZoneResponse response = edgeNetworkClient.initializeZone(name); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_InitializeZone_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachments.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachments.java new file mode 100644 index 000000000000..a502d1971005 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachments.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncListInterconnectAttachments { + + public static void main(String[] args) throws Exception { + asyncListInterconnectAttachments(); + } + + public static void asyncListInterconnectAttachments() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + edgeNetworkClient.listInterconnectAttachmentsPagedCallable().futureCall(request); + // Do something. + for (InterconnectAttachment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachmentsPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachmentsPaged.java new file mode 100644 index 000000000000..050516b6c82f --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/AsyncListInterconnectAttachmentsPaged.java @@ -0,0 +1,64 @@ +/* + * 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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.common.base.Strings; + +public class AsyncListInterconnectAttachmentsPaged { + + public static void main(String[] args) throws Exception { + asyncListInterconnectAttachmentsPaged(); + } + + public static void asyncListInterconnectAttachmentsPaged() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListInterconnectAttachmentsResponse response = + edgeNetworkClient.listInterconnectAttachmentsCallable().call(request); + for (InterconnectAttachment element : response.getInterconnectAttachmentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachments.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachments.java new file mode 100644 index 000000000000..0fd2a17ede32 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachments.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListInterconnectAttachments { + + public static void main(String[] args) throws Exception { + syncListInterconnectAttachments(); + } + + public static void syncListInterconnectAttachments() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (InterconnectAttachment element : + edgeNetworkClient.listInterconnectAttachments(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsString.java new file mode 100644 index 000000000000..f9b65def919d --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListInterconnectAttachmentsString { + + public static void main(String[] args) throws Exception { + syncListInterconnectAttachmentsString(); + } + + public static void syncListInterconnectAttachmentsString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + for (InterconnectAttachment element : + edgeNetworkClient.listInterconnectAttachments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsZonename.java new file mode 100644 index 000000000000..27c5fc2bed96 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnectattachments/SyncListInterconnectAttachmentsZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.InterconnectAttachment; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListInterconnectAttachmentsZonename { + + public static void main(String[] args) throws Exception { + syncListInterconnectAttachmentsZonename(); + } + + public static void syncListInterconnectAttachmentsZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + for (InterconnectAttachment element : + edgeNetworkClient.listInterconnectAttachments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnectAttachments_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnects.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnects.java new file mode 100644 index 000000000000..84f991f60f94 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnects.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncListInterconnects { + + public static void main(String[] args) throws Exception { + asyncListInterconnects(); + } + + public static void asyncListInterconnects() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + edgeNetworkClient.listInterconnectsPagedCallable().futureCall(request); + // Do something. + for (Interconnect element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnectsPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnectsPaged.java new file mode 100644 index 000000000000..1ca6e074d145 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/AsyncListInterconnectsPaged.java @@ -0,0 +1,64 @@ +/* + * 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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ListInterconnectsResponse; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.common.base.Strings; + +public class AsyncListInterconnectsPaged { + + public static void main(String[] args) throws Exception { + asyncListInterconnectsPaged(); + } + + public static void asyncListInterconnectsPaged() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListInterconnectsResponse response = + edgeNetworkClient.listInterconnectsCallable().call(request); + for (Interconnect element : response.getInterconnectsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnects.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnects.java new file mode 100644 index 000000000000..b2a3165b609c --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnects.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListInterconnects { + + public static void main(String[] args) throws Exception { + syncListInterconnects(); + } + + public static void syncListInterconnects() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Interconnect element : edgeNetworkClient.listInterconnects(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsString.java new file mode 100644 index 000000000000..e7492a64184b --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListInterconnectsString { + + public static void main(String[] args) throws Exception { + syncListInterconnectsString(); + } + + public static void syncListInterconnectsString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + for (Interconnect element : edgeNetworkClient.listInterconnects(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsZonename.java new file mode 100644 index 000000000000..1aea13cc6525 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listinterconnects/SyncListInterconnectsZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Interconnect; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListInterconnectsZonename { + + public static void main(String[] args) throws Exception { + syncListInterconnectsZonename(); + } + + public static void syncListInterconnectsZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + for (Interconnect element : edgeNetworkClient.listInterconnects(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListInterconnects_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/AsyncListLocations.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..220511b652d3 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + edgeNetworkClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListLocations_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/AsyncListLocationsPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..14114329d872 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListLocations_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = edgeNetworkClient.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 edgenetwork_v1_generated_EdgeNetwork_ListLocations_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/SyncListLocations.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..6ced26576ae3 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListLocations_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : edgeNetworkClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListLocations_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworks.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworks.java new file mode 100644 index 000000000000..9239fdd81607 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworks.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListNetworks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncListNetworks { + + public static void main(String[] args) throws Exception { + asyncListNetworks(); + } + + public static void asyncListNetworks() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = edgeNetworkClient.listNetworksPagedCallable().futureCall(request); + // Do something. + for (Network element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListNetworks_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworksPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworksPaged.java new file mode 100644 index 000000000000..35d152efcf29 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/AsyncListNetworksPaged.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListNetworks_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.ListNetworksResponse; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.common.base.Strings; + +public class AsyncListNetworksPaged { + + public static void main(String[] args) throws Exception { + asyncListNetworksPaged(); + } + + public static void asyncListNetworksPaged() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListNetworksResponse response = edgeNetworkClient.listNetworksCallable().call(request); + for (Network element : response.getNetworksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListNetworks_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworks.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworks.java new file mode 100644 index 000000000000..c6bc6d5751b7 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworks.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListNetworks_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListNetworksRequest; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListNetworks { + + public static void main(String[] args) throws Exception { + syncListNetworks(); + } + + public static void syncListNetworks() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Network element : edgeNetworkClient.listNetworks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListNetworks_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksString.java new file mode 100644 index 000000000000..17bedb623823 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListNetworks_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListNetworksString { + + public static void main(String[] args) throws Exception { + syncListNetworksString(); + } + + public static void syncListNetworksString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + for (Network element : edgeNetworkClient.listNetworks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListNetworks_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksZonename.java new file mode 100644 index 000000000000..f8c04c977799 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listnetworks/SyncListNetworksZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListNetworks_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Network; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListNetworksZonename { + + public static void main(String[] args) throws Exception { + syncListNetworksZonename(); + } + + public static void syncListNetworksZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + for (Network element : edgeNetworkClient.listNetworks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListNetworks_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRouters.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRouters.java new file mode 100644 index 000000000000..48165b864ad9 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRouters.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListRouters_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncListRouters { + + public static void main(String[] args) throws Exception { + asyncListRouters(); + } + + public static void asyncListRouters() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = edgeNetworkClient.listRoutersPagedCallable().futureCall(request); + // Do something. + for (Router element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListRouters_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRoutersPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRoutersPaged.java new file mode 100644 index 000000000000..eb5d8480a78b --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/AsyncListRoutersPaged.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListRouters_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.ListRoutersResponse; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.common.base.Strings; + +public class AsyncListRoutersPaged { + + public static void main(String[] args) throws Exception { + asyncListRoutersPaged(); + } + + public static void asyncListRoutersPaged() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRoutersResponse response = edgeNetworkClient.listRoutersCallable().call(request); + for (Router element : response.getRoutersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListRouters_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRouters.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRouters.java new file mode 100644 index 000000000000..7f5abcb20254 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRouters.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListRouters_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListRoutersRequest; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListRouters { + + public static void main(String[] args) throws Exception { + syncListRouters(); + } + + public static void syncListRouters() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Router element : edgeNetworkClient.listRouters(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListRouters_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersString.java new file mode 100644 index 000000000000..9befb32c3edc --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListRouters_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListRoutersString { + + public static void main(String[] args) throws Exception { + syncListRoutersString(); + } + + public static void syncListRoutersString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + for (Router element : edgeNetworkClient.listRouters(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListRouters_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersZonename.java new file mode 100644 index 000000000000..40d0908c4290 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listrouters/SyncListRoutersZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListRouters_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListRoutersZonename { + + public static void main(String[] args) throws Exception { + syncListRoutersZonename(); + } + + public static void syncListRoutersZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + for (Router element : edgeNetworkClient.listRouters(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListRouters_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnets.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnets.java new file mode 100644 index 000000000000..d9845f54972e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnets.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListSubnets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class AsyncListSubnets { + + public static void main(String[] args) throws Exception { + asyncListSubnets(); + } + + public static void asyncListSubnets() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListSubnetsRequest request = + ListSubnetsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = edgeNetworkClient.listSubnetsPagedCallable().futureCall(request); + // Do something. + for (Subnet element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListSubnets_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnetsPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnetsPaged.java new file mode 100644 index 000000000000..d135a191241f --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/AsyncListSubnetsPaged.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListSubnets_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.ListSubnetsResponse; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; +import com.google.common.base.Strings; + +public class AsyncListSubnetsPaged { + + public static void main(String[] args) throws Exception { + asyncListSubnetsPaged(); + } + + public static void asyncListSubnetsPaged() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListSubnetsRequest request = + ListSubnetsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSubnetsResponse response = edgeNetworkClient.listSubnetsCallable().call(request); + for (Subnet element : response.getSubnetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListSubnets_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnets.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnets.java new file mode 100644 index 000000000000..6d68e8370616 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnets.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListSubnets_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListSubnetsRequest; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListSubnets { + + public static void main(String[] args) throws Exception { + syncListSubnets(); + } + + public static void syncListSubnets() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListSubnetsRequest request = + ListSubnetsRequest.newBuilder() + .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Subnet element : edgeNetworkClient.listSubnets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListSubnets_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsString.java new file mode 100644 index 000000000000..d0a1a4f3c77a --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListSubnets_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListSubnetsString { + + public static void main(String[] args) throws Exception { + syncListSubnetsString(); + } + + public static void syncListSubnetsString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + for (Subnet element : edgeNetworkClient.listSubnets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListSubnets_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsZonename.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsZonename.java new file mode 100644 index 000000000000..4c9f35dc4011 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listsubnets/SyncListSubnetsZonename.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListSubnets_Zonename_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.ZoneName; + +public class SyncListSubnetsZonename { + + public static void main(String[] args) throws Exception { + syncListSubnetsZonename(); + } + + public static void syncListSubnetsZonename() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + for (Subnet element : edgeNetworkClient.listSubnets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListSubnets_Zonename_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZones.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZones.java new file mode 100644 index 000000000000..18df86d498aa --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZones.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListZones_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.LocationName; +import com.google.cloud.edgenetwork.v1.Zone; + +public class AsyncListZones { + + public static void main(String[] args) throws Exception { + asyncListZones(); + } + + public static void asyncListZones() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = edgeNetworkClient.listZonesPagedCallable().futureCall(request); + // Do something. + for (Zone element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListZones_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZonesPaged.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZonesPaged.java new file mode 100644 index 000000000000..98c22c3a0139 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/AsyncListZonesPaged.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListZones_Paged_async] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.ListZonesResponse; +import com.google.cloud.edgenetwork.v1.LocationName; +import com.google.cloud.edgenetwork.v1.Zone; +import com.google.common.base.Strings; + +public class AsyncListZonesPaged { + + public static void main(String[] args) throws Exception { + asyncListZonesPaged(); + } + + public static void asyncListZonesPaged() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListZonesResponse response = edgeNetworkClient.listZonesCallable().call(request); + for (Zone element : response.getZonesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListZones_Paged_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZones.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZones.java new file mode 100644 index 000000000000..6b7d6fa766be --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZones.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListZones_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.ListZonesRequest; +import com.google.cloud.edgenetwork.v1.LocationName; +import com.google.cloud.edgenetwork.v1.Zone; + +public class SyncListZones { + + public static void main(String[] args) throws Exception { + syncListZones(); + } + + public static void syncListZones() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Zone element : edgeNetworkClient.listZones(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListZones_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesLocationname.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesLocationname.java new file mode 100644 index 000000000000..d3b46515b53e --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesLocationname.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListZones_Locationname_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.LocationName; +import com.google.cloud.edgenetwork.v1.Zone; + +public class SyncListZonesLocationname { + + public static void main(String[] args) throws Exception { + syncListZonesLocationname(); + } + + public static void syncListZonesLocationname() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Zone element : edgeNetworkClient.listZones(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListZones_Locationname_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesString.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesString.java new file mode 100644 index 000000000000..1a08dacbfc41 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/listzones/SyncListZonesString.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_ListZones_String_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.LocationName; +import com.google.cloud.edgenetwork.v1.Zone; + +public class SyncListZonesString { + + public static void main(String[] args) throws Exception { + syncListZonesString(); + } + + public static void syncListZonesString() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Zone element : edgeNetworkClient.listZones(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_ListZones_String_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouter.java new file mode 100644 index 000000000000..bded4b2d9f36 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateRouter { + + public static void main(String[] args) throws Exception { + asyncUpdateRouter(); + } + + public static void asyncUpdateRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRouter(Router.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.updateRouterCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouterLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouterLRO.java new file mode 100644 index 000000000000..a4c403ef0e10 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/AsyncUpdateRouterLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateRouterLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateRouterLRO(); + } + + public static void asyncUpdateRouterLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRouter(Router.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.updateRouterOperationCallable().futureCall(request); + // Do something. + Router response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouter.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouter.java new file mode 100644 index 000000000000..63d6adcb8602 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouter.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.cloud.edgenetwork.v1.UpdateRouterRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateRouter { + + public static void main(String[] args) throws Exception { + syncUpdateRouter(); + } + + public static void syncUpdateRouter() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + UpdateRouterRequest request = + UpdateRouterRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRouter(Router.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Router response = edgeNetworkClient.updateRouterAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouterRouterFieldmask.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouterRouterFieldmask.java new file mode 100644 index 000000000000..d36e8e8a212a --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updaterouter/SyncUpdateRouterRouterFieldmask.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_RouterFieldmask_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Router; +import com.google.protobuf.FieldMask; + +public class SyncUpdateRouterRouterFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateRouterRouterFieldmask(); + } + + public static void syncUpdateRouterRouterFieldmask() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + Router router = Router.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Router response = edgeNetworkClient.updateRouterAsync(router, updateMask).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateRouter_RouterFieldmask_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnet.java new file mode 100644 index 000000000000..b814a8486156 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSubnet { + + public static void main(String[] args) throws Exception { + asyncUpdateSubnet(); + } + + public static void asyncUpdateSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + UpdateSubnetRequest request = + UpdateSubnetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSubnet(Subnet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = edgeNetworkClient.updateSubnetCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnetLRO.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnetLRO.java new file mode 100644 index 000000000000..952d9422d338 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/AsyncUpdateSubnetLRO.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.OperationMetadata; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSubnetLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSubnetLRO(); + } + + public static void asyncUpdateSubnetLRO() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + UpdateSubnetRequest request = + UpdateSubnetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSubnet(Subnet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + edgeNetworkClient.updateSubnetOperationCallable().futureCall(request); + // Do something. + Subnet response = future.get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_LRO_async] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnet.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnet.java new file mode 100644 index 000000000000..7c40788c5e80 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnet.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSubnet { + + public static void main(String[] args) throws Exception { + syncUpdateSubnet(); + } + + public static void syncUpdateSubnet() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + UpdateSubnetRequest request = + UpdateSubnetRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSubnet(Subnet.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Subnet response = edgeNetworkClient.updateSubnetAsync(request).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnetSubnetFieldmask.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnetSubnetFieldmask.java new file mode 100644 index 000000000000..0c6e3bbd7ca4 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetwork/updatesubnet/SyncUpdateSubnetSubnetFieldmask.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_SubnetFieldmask_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkClient; +import com.google.cloud.edgenetwork.v1.Subnet; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSubnetSubnetFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSubnetSubnetFieldmask(); + } + + public static void syncUpdateSubnetSubnetFieldmask() 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { + Subnet subnet = Subnet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Subnet response = edgeNetworkClient.updateSubnetAsync(subnet, updateMask).get(); + } + } +} +// [END edgenetwork_v1_generated_EdgeNetwork_UpdateSubnet_SubnetFieldmask_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetworksettings/initializezone/SyncInitializeZone.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetworksettings/initializezone/SyncInitializeZone.java new file mode 100644 index 000000000000..6b2eceefa985 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/edgenetworksettings/initializezone/SyncInitializeZone.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.edgenetwork.v1.samples; + +// [START edgenetwork_v1_generated_EdgeNetworkSettings_InitializeZone_sync] +import com.google.cloud.edgenetwork.v1.EdgeNetworkSettings; +import java.time.Duration; + +public class SyncInitializeZone { + + public static void main(String[] args) throws Exception { + syncInitializeZone(); + } + + public static void syncInitializeZone() 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 + EdgeNetworkSettings.Builder edgeNetworkSettingsBuilder = EdgeNetworkSettings.newBuilder(); + edgeNetworkSettingsBuilder + .initializeZoneSettings() + .setRetrySettings( + edgeNetworkSettingsBuilder + .initializeZoneSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + EdgeNetworkSettings edgeNetworkSettings = edgeNetworkSettingsBuilder.build(); + } +} +// [END edgenetwork_v1_generated_EdgeNetworkSettings_InitializeZone_sync] diff --git a/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/stub/edgenetworkstubsettings/initializezone/SyncInitializeZone.java b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/stub/edgenetworkstubsettings/initializezone/SyncInitializeZone.java new file mode 100644 index 000000000000..9108c748b9c0 --- /dev/null +++ b/java-edgenetwork/samples/snippets/generated/com/google/cloud/edgenetwork/v1/stub/edgenetworkstubsettings/initializezone/SyncInitializeZone.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.edgenetwork.v1.stub.samples; + +// [START edgenetwork_v1_generated_EdgeNetworkStubSettings_InitializeZone_sync] +import com.google.cloud.edgenetwork.v1.stub.EdgeNetworkStubSettings; +import java.time.Duration; + +public class SyncInitializeZone { + + public static void main(String[] args) throws Exception { + syncInitializeZone(); + } + + public static void syncInitializeZone() 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 + EdgeNetworkStubSettings.Builder edgeNetworkSettingsBuilder = + EdgeNetworkStubSettings.newBuilder(); + edgeNetworkSettingsBuilder + .initializeZoneSettings() + .setRetrySettings( + edgeNetworkSettingsBuilder + .initializeZoneSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + EdgeNetworkStubSettings edgeNetworkSettings = edgeNetworkSettingsBuilder.build(); + } +} +// [END edgenetwork_v1_generated_EdgeNetworkStubSettings_InitializeZone_sync] diff --git a/pom.xml b/pom.xml index 00577f0f5945..c25929c23eb7 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,7 @@ java-dns java-document-ai java-domains + java-edgenetwork java-enterpriseknowledgegraph java-errorreporting java-essential-contacts diff --git a/versions.txt b/versions.txt index 22a3705f74b6..6bb1b6b247f6 100644 --- a/versions.txt +++ b/versions.txt @@ -702,3 +702,6 @@ grpc-google-cloud-telcoautomation-v1alpha1:0.1.0:0.2.0-SNAPSHOT google-cloud-securesourcemanager:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-securesourcemanager-v1:0.1.0:0.2.0-SNAPSHOT grpc-google-cloud-securesourcemanager-v1:0.1.0:0.2.0-SNAPSHOT +google-cloud-edgenetwork:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-edgenetwork-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-edgenetwork-v1:0.0.0:0.0.1-SNAPSHOT From 3cdc0b93d2a295dfc049eb0f8e8865bd39475e67 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 12 Dec 2023 00:38:25 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml | 2 +- java-edgenetwork/google-cloud-edgenetwork/pom.xml | 4 ++-- java-edgenetwork/pom.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml b/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml index 8ccc307f870f..43fef5581c1f 100644 --- a/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml +++ b/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud diff --git a/java-edgenetwork/google-cloud-edgenetwork/pom.xml b/java-edgenetwork/google-cloud-edgenetwork/pom.xml index 2f7fb462f93b..378d98792874 100644 --- a/java-edgenetwork/google-cloud-edgenetwork/pom.xml +++ b/java-edgenetwork/google-cloud-edgenetwork/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -110,4 +110,4 @@ test - \ No newline at end of file + diff --git a/java-edgenetwork/pom.xml b/java-edgenetwork/pom.xml index fa458c2ac188..aacdb88d91de 100644 --- a/java-edgenetwork/pom.xml +++ b/java-edgenetwork/pom.xml @@ -50,4 +50,5 @@ proto-google-cloud-edgenetwork-v1 google-cloud-edgenetwork-bom - + + From ba082334be38bd772041aae2adfa05f2a9be7ee5 Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Wed, 3 Jan 2024 17:06:12 +0000 Subject: [PATCH 3/4] update google-cloud-java-jar-parent version to 1.27.0-SNAPSHOT --- java-edgenetwork/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-edgenetwork/pom.xml b/java-edgenetwork/pom.xml index aacdb88d91de..3a507d2c4505 100644 --- a/java-edgenetwork/pom.xml +++ b/java-edgenetwork/pom.xml @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.26.0-SNAPSHOT + 1.27.0-SNAPSHOT ../google-cloud-jar-parent/pom.xml From 1e834c9e7ee5ca36bc05a15cba1bd9c44d8a299d Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Wed, 3 Jan 2024 17:16:09 +0000 Subject: [PATCH 4/4] update parent pom version in google-cloud-edgenetwork-bom --- java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml b/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml index 43fef5581c1f..66b2fbfbba69 100644 --- a/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml +++ b/java-edgenetwork/google-cloud-edgenetwork-bom/pom.xml @@ -9,7 +9,7 @@ com.google.cloud google-cloud-pom-parent - 1.26.0-SNAPSHOT + 1.27.0-SNAPSHOT ../../google-cloud-pom-parent/pom.xml